Moved tokens to the end of quieries.

Not yet tested.