restructured templates for less redundancy