Implemented undo, saving and loading. Many other related and unrelated
minor changes (see CHANGES).