Compartmentalized the templating.