Adding support for defining custom html template.