Added support for sorting of query sets (still experimental)