Refactoring client structure