moved input handling to another file, cleaned up game.js