Optimizing model definitions