client no longer crashes on game end (or recognizes it), started refactoring