Created more or less all the code needed to run the server "ish". Alot of ugly code beware! Created in a hurry!