Reorganized, ready for curve_fit