Improved model code layout