General refactor including Removing the singleton nature of the server.