Improved whitespace handling. Added automatic paragraphs generation