Added fmod to unbreak sin, and fixed some style issues.