Fix spacing and make the DOM valid.