Refactored the parallelized bits, still broken though.