Improve doc of fitting algo.
Some code cleanup.