Clean up server and client code.