Adding sensible undo