Debugging

I fixed a lot of bugs, but there's still a problem with the way we are
using curve_fit. I have no idea how it works.