Added some changes for the factory into game.js