Search and undo improvements