Use smartrep for undo/redo