First draft of server and client