Clean up. Included leastsq in simulation object.