using middleclass and stateful, the game now supports game states. Still poorly commented. On it, I promise.