Added templating support