cleanup sorting to (almost) get rid of the old SORT_METHOD_FOO
Merge pull request #2959 from Montellese/sorting_cleanup

cleanup sorting to (almost) get rid of the old SORT_METHOD_FOO