Remove hoisted function from Query constructor