Sorting: fixing sort signature & docs