Completed server and client classes