Added better handling of newline as paragraphs.