Moved InQuery to own file added TODO