Refactoring Game.js