rework of code, fixes some bugs too with new games not resetting game state
Merge branch 'refactor'