Moved most of the DOM stuff to another module.
Moved DOM stuff to this file.
Wondering if I should have used a framework.