Started refactoring.
The query descriptor now supports all operations again.