More work on undo/redo and generic file view