Lots more progress towards actually being able to save documents. Even some rudimentary undo is in place. This is the last commit before I do some pretty serious renaming.