Moved out client implementation