refactored a bit of instanstiateDOMStuff
Revert "refactored a bit of instanstiateDOMStuff" because it caused a problem and wasn't really necessary

This reverts commit 364699856211d6f8f13b258de5f13252720ef517.