cleaned up the QueryGeneratorHelper class