Restructured templating system