#18 using options.template if available
#18 Adding markdown template
#18 optionally looking up script tags (to support other template types)
#19 checking template instance before executing as a function