Clean up and add documentation to server files