Fixed multiprocessing. Introduced scipy minimization