ParallelQuery refactoring