Reorganize the client API.