Revert "somewhat finished code for "fit" functions"

This reverts commit e10fe8e6c2bfe275fb1515aa9efba43a77d2a60e.