Code improvements in model rendering