Cleanup server code.