Client refactor