remove unnecessary structure from the DOM