Some refactoring of ParallelScanOperation.