Index: src/Actions/FragmentationAction/DepthFirstSearchAction.cpp
===================================================================
--- src/Actions/FragmentationAction/DepthFirstSearchAction.cpp	(revision 2dfeeb72918023992c28db24bd7a07782516893b)
+++ src/Actions/FragmentationAction/DepthFirstSearchAction.cpp	(revision f394a631235ecfc70559d4b69abfc161fe834ab2)
@@ -27,5 +27,5 @@
 #include "UIElements/UIFactory.hpp"
 #include "UIElements/Dialog.hpp"
-#include "Actions/MapOfActions.hpp"
+#include "UIElements/ValueStorage.hpp"
 
 const char FragmentationDepthFirstSearchAction::NAME[] = "depth-first-search";
@@ -38,66 +38,61 @@
 {}
 
+Dialog* FragmentationDepthFirstSearchAction::createDialog() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  dialog->queryDouble(NAME, ValueStorage::getInstance().getDescription(NAME));
+
+  return dialog;
+}
+
 Action::state_ptr FragmentationDepthFirstSearchAction::performCall() {
-  Dialog *dialog = UIFactory::getInstance().makeDialog();
   double distance;
 
-  dialog->queryDouble(NAME, &distance, MapOfActions::getInstance().getDescription(NAME));
+  ValueStorage::getInstance().queryCurrentValue(NAME, distance);
 
-  if(dialog->display()) {
-    DoLog(1) && (Log() << Verbose(1) << "Depth-First-Search Analysis." << endl);
-    molecule * const mol = World::getInstance().getMolecule(MoleculeById(0));
-    MoleculeLeafClass *Subgraphs = NULL;      // list of subgraphs from DFS analysis
-    int *MinimumRingSize = new int[mol->getAtomCount()];
-    atom **ListOfAtoms = NULL;
-    class StackClass<bond *> *BackEdgeStack = NULL;
-    class StackClass<bond *> *LocalBackEdgeStack = NULL;
-    mol->CreateAdjacencyList(distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
-    Subgraphs = mol->DepthFirstSearchAnalysis(BackEdgeStack);
-    if (Subgraphs != NULL) {
-      int FragmentCounter = 0;
-      while (Subgraphs->next != NULL) {
-        Subgraphs = Subgraphs->next;
-        ListOfAtoms = NULL;
-        Subgraphs->FillBondStructureFromReference(mol, ListOfAtoms, false);  // we want to keep the created ListOfLocalAtoms
-        LocalBackEdgeStack = new StackClass<bond *> (Subgraphs->Leaf->BondCount);
-        Subgraphs->Leaf->PickLocalBackEdges(ListOfAtoms, BackEdgeStack, LocalBackEdgeStack);
-        Subgraphs->Leaf->CyclicStructureAnalysis(LocalBackEdgeStack, MinimumRingSize);
-        delete(LocalBackEdgeStack);
-        delete(Subgraphs->previous);
-        delete[](ListOfAtoms);  // and here we remove it
-        FragmentCounter++;
-      }
-      delete(Subgraphs);
+  DoLog(1) && (Log() << Verbose(1) << "Depth-First-Search Analysis." << endl);
+  molecule * const mol = World::getInstance().getMolecule(MoleculeById(0));
+  MoleculeLeafClass *Subgraphs = NULL;      // list of subgraphs from DFS analysis
+  int *MinimumRingSize = new int[mol->getAtomCount()];
+  atom **ListOfAtoms = NULL;
+  class StackClass<bond *> *BackEdgeStack = NULL;
+  class StackClass<bond *> *LocalBackEdgeStack = NULL;
+  mol->CreateAdjacencyList(distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
+  Subgraphs = mol->DepthFirstSearchAnalysis(BackEdgeStack);
+  if (Subgraphs != NULL) {
+    int FragmentCounter = 0;
+    while (Subgraphs->next != NULL) {
+      Subgraphs = Subgraphs->next;
+      ListOfAtoms = NULL;
+      Subgraphs->FillBondStructureFromReference(mol, ListOfAtoms, false);  // we want to keep the created ListOfLocalAtoms
+      LocalBackEdgeStack = new StackClass<bond *> (Subgraphs->Leaf->BondCount);
+      Subgraphs->Leaf->PickLocalBackEdges(ListOfAtoms, BackEdgeStack, LocalBackEdgeStack);
+      Subgraphs->Leaf->CyclicStructureAnalysis(LocalBackEdgeStack, MinimumRingSize);
+      delete(LocalBackEdgeStack);
+      delete(Subgraphs->previous);
+      delete[](ListOfAtoms);  // and here we remove it
+      FragmentCounter++;
     }
-    delete(BackEdgeStack);
-    delete[](MinimumRingSize);
-    delete dialog;
-    return Action::success;
-  } else {
-    delete dialog;
-    return Action::failure;
+    delete(Subgraphs);
   }
+  delete(BackEdgeStack);
+  delete[](MinimumRingSize);
+  return Action::success;
 }
 
 Action::state_ptr FragmentationDepthFirstSearchAction::performUndo(Action::state_ptr _state) {
-//  ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get());
-
-  return Action::failure;
-//  string newName = state->mol->getName();
-//  state->mol->setName(state->lastName);
-//
-//  return Action::state_ptr(new ParserLoadXyzState(state->mol,newName));
+  return Action::success;
 }
 
 Action::state_ptr FragmentationDepthFirstSearchAction::performRedo(Action::state_ptr _state){
-  return Action::failure;
+  return Action::success;
 }
 
 bool FragmentationDepthFirstSearchAction::canUndo() {
-  return false;
+  return true;
 }
 
 bool FragmentationDepthFirstSearchAction::shouldUndo() {
-  return false;
+  return true;
 }
 
Index: src/Actions/FragmentationAction/DepthFirstSearchAction.hpp
===================================================================
--- src/Actions/FragmentationAction/DepthFirstSearchAction.hpp	(revision 2dfeeb72918023992c28db24bd7a07782516893b)
+++ src/Actions/FragmentationAction/DepthFirstSearchAction.hpp	(revision f394a631235ecfc70559d4b69abfc161fe834ab2)
@@ -21,4 +21,5 @@
   virtual const std::string getName();
 private:
+  virtual Dialog * createDialog();
   virtual Action::state_ptr performCall();
   virtual Action::state_ptr performUndo(Action::state_ptr);
