fix order of model definitions
Merge branch 'afsin' into matt-bbintegration
case fix.