Added server and client functionality to client