Fixed problem with template escaping for HTML.
Added some QOS.