added template.createEnvironment(), .safeContext(). Enforces DRY.