undo-redo and logging added.