minor format changes
disabled or removed some #warnings
try to fix some type warnings
converted pi to M_PI
converted pi * 0.5 to M_PI_2
converted pi * 0.25 to M_PI_4
converted pi / 2.0 to M_PI_2
converted pi/4.0 to M_PI_4