Improve groups and groupsNotIn, adding named parameters