Remove superfluous closing tags