Finished game engine

Major clean up of game engine.