CLEANUP: moves javascript from header into game.js