Reformat code
Fix framerate issues
Refactored code to be in a different javascript file
Merge pull request #1 from 0xc355/master

Fixed some code for ya