Moved js to game.js
Moved some code around.