Refactoring GroupsController