made template name building dynamic, added minification