Bugfix with empty paragraphs, PEP8 cleanups.