Fix for Mac OS flags.
Fixed initializer order.
Set the limit of frames to 60.
cmath include added.