First implementation of the client with tests