Move some fitting into model class