Tidied up Server to work more appropriately