Changes to code for multiclass models