First fully working version of server