Extracting the client of the server class into a client class