Turned off quote-replacement.
Moved sorting to client.
Refactorings.