Basic functionality working for the Server

No networking yet :(
This will probably be the source of quite a few bugs until we fix it.