factored GameView window management stuff out into window.js