Refactoring functions for new users/groups