Refactor Client