Refactor client code.