Fix issue causing nodes to be inserted from last to first when templating.
Add wrapper for working with elements similar to how you'd work with the shadow dom.