Cleanup and fpsmeter

* Added forked version of fpsmeter for browserify.
* Code cleanup.