Fixed #6214 -- Added some small optimisations to model class initialisation.