Make query handling a category
Thanks @KeithDuncan for the suggestion