Refactored code so that model params are nested inside fitter