Issue #310 formatting destroyed

This is an attempt to fix issue #310. I removed the extra parsing the code was doing while reading and write the note content and added a test for it.