Code cleanup in group memberships library