Tidy server code and begin to clean up other content