added tag support and templating