Extracted comparator from concept sorter.