Refactored mock-client