Basic server.
Merge server and client code.