Major improvements to the game engine