Added better templating