Graininess happens when the fats in shea and other butters melt and then cool slowly, so they recrystallize into larger crystals that you can feel. It's harmless and melts on skin, but it feels gritty. The fix is to melt the butter completely, hold it hot for a while so all crystals are gone, then cool it quickly.