Refactor the client interface