Manage membergroups refactoring