Parse for memory added. Also added swap of spaces/newline logic.