Refactoring activity_group