Extracted parallelization code.
Parallelized tenFold.