Factored out end of game code and organized instance variables into model and view categories