Moved a lot of state to the server