Implemented new fitting algorithms (issue #71)