Convert main page to use DOM.