Simplify parameters and improve parallelization.