Changes to embed templates into js