Bug fixes and code improvements
#27: This is not a clean commit.  Refactoring the document model classes some.  Got the length attribute working for a bit, but the cursor location wasn't changing when text was appended.  The refactor should help with this when it's done.