Wrapped everything from game.js in an anonymous function and added a few comments