kwargs for curve_fit, small fixes to levenberg_marquardt