Fix spelling in docs
Fix sorting query dictionary.

In dict update method, results are ordered differently
in Python version 2 and version 3. Using SortedDict
to have the same behaviour.