Make program exit edit mode after delete / search. Rename some methods in StateManager.