Wrap dom API access in helpers

Wrap calls to `appendChild` and `cloneNode` in dom helpers