Naive implementation of parallelization; Minor bug fix