Add support for forcing a certain sorting
Add support for using a custom sorting function