Updated the game engine. Most of the code is yet to be documented.