Refactor client.
Refactor client.