Changes to optimize the server and add more functionality.