Refactoring the DOM for easier manipulation.