remove trailing comments