First implementation of server.