cleaned up the dom.js module