replaced haxe.Template with more powerful thx.tpl