adding missing / removing unnecessary closing tags