Basic code enhancements in model