move a lot of code out of game.js in favor of event driven effects