First cut of Query object

Hi Jasper, here is the Query object, finally.