Used cajon.js to have all commonJS modules.
changed requirejs to require.
A bunch of refactoring into dom.js.