Refactoring clients controller