refactoring the API a bit, adding EmbeddedResourceTemplateLoader.