Cleaning up the server code.