Added ordering in the querystring

Now all unit tests pass with flying colours :-)