Improve logic to delete comments.