Refactored client.