rearrange QueryGenerationFactories