Moved some functions to Tools.
Began work on game state server-side.