Added in ability to pass custom html templates.