Combined packGroups, removeEmptyGroups in Exchanger.