Changed location of game.js and optimized the code