Undo/redo added and refactored add/remove directory.