added debug messages and fixed weird error when no changes were made
Fixed error when italics were not complete
Fixed strange result bug and fixed header newline insertion
Added a markdown file for testing