Refactoring code to make resources for group_memberships singular