Added curve finding in parallel.
Fixed problems with forking.