Move some server parts from ServerClientDemo into Server.