Moved reference to keys out of runGame
Moved game-independent client logic to own js file