True undo/redo support

closes #13