Fittingcomposition

Rewrite the Fitting class to use composition over inheritance. This should allow it to be more versatile/extensible.