Improved handling of model formulae

Formulae and model data now returned correctly for all model classes