Refactored the parser to remove the need for a paragraph object, and to improve clarity.