Refactoring of custom model render code.