Add default parameters, remove TemplateOptions, move Environment to outer namespace.