Compiled all scripts into game.js to get it to work without race conditions