Fine tune sortGroup method in SortTool class