Hides undo/redo menu buttons when there is nothing to undo/redo. Adds safer KVO observer removal.
Adds safer KVO observers removal