Cleanup server code