Fixed a bug at delete paragraphs. Added comments.