Change the undo API a bit