removes redundant end comment block