requestAnimationFrame drawing logic implemented

Separated most of the drawing logic from the main loop, using
requestAnimationFrame. This should help with experiencing low fps -
should feel more natural and not as gamebreaking.

TODO: cross-browser support