Moving stuff around

Preparing for changes in Query object