code cleanup: game.js and validate.js