Added Game and a large chunk of misc StateEngine code.