Added undo modification support.