Clean up server code.