Moved the JS to it's own file (engine.js)
Fixing indentation and brace placement for Emacs JS mode