Fixed ending tags and added changes through DOM.