Created new SortedGrouping to move the group order from the Grouping
Minor changes for SortedGrouping