Move ApiQueryGeneratorBase to it's own file