Index: src/Actions/CommandAction/BondLengthTableAction.cpp
===================================================================
--- src/Actions/CommandAction/BondLengthTableAction.cpp	(revision 5309ba2259d81aba279e4520a5ebc51c898d8b75)
+++ src/Actions/CommandAction/BondLengthTableAction.cpp	(revision f71bafdd0857cf18158866b8a7878c1b33d586b6)
@@ -45,26 +45,23 @@
   DoLog(0) && (Log() << Verbose(0) << "Using " << params.BondGraphFileName << " as bond length table." << endl);
   config *configuration = World::getInstance().getConfig();
-  BondGraph *OldBG;
-  if (configuration->BG != NULL) {
-    OldBG = configuration->BG;
-    DoLog(0) && (Log() << Verbose(0) << "There is a bond length table already present." << endl);
-  }
-  configuration->BG = new BondGraph(configuration->GetIsAngstroem());
+  BondGraph *OldBG = World::getInstance().getBondGraph();
+
+  BondGraph *BG = new BondGraph(configuration->GetIsAngstroem());
   if ((!params.BondGraphFileName.empty())
       && boost::filesystem::exists(params.BondGraphFileName)) {
     std::ifstream input(params.BondGraphFileName.string().c_str());
-    if ((input.good()) && (configuration->BG->LoadBondLengthTable(input))) {
+    if ((input.good()) && (BG->LoadBondLengthTable(input))) {
       DoLog(0) && (Log() << Verbose(0) << "Bond length table parsed successfully." << endl);
       input.close();
-      return Action::state_ptr(new CommandBondLengthTableState(*OldBG, params));
+      CommandBondLengthTableState *state = new CommandBondLengthTableState(*OldBG, params);
+      World::getInstance().setBondGraph(BG);  // Changes OldBG, hence have to copy beforehand
+      return Action::state_ptr(state);
     } else {
       DoeLog(1) && (eLog()<< Verbose(1) << "Bond length table parsing failed." << endl);
       input.close();
-      configuration->BG = new BondGraph(*OldBG);
       return Action::failure;
     }
   } else {
     DoeLog(1) && (eLog()<< Verbose(1) << "Bond length table loading failed." << endl);
-    configuration->BG = new BondGraph(*OldBG);
     return Action::failure;
   }
@@ -74,9 +71,9 @@
   CommandBondLengthTableState *state = assert_cast<CommandBondLengthTableState*>(_state.get());
 
-  config *configuration = World::getInstance().getConfig();
-  BondGraph *OldBG = new BondGraph(*configuration->BG);
-  configuration->BG = new BondGraph(state->OldBG);
+  BondGraph *OldBG = World::getInstance().getBondGraph();
+  CommandBondLengthTableState *restate = new CommandBondLengthTableState(*OldBG, params);
+  World::getInstance().setBondGraph(new BondGraph(state->OldBG));  // Changes OldBG, hence have to copy beforehand
 
-  return Action::state_ptr(new CommandBondLengthTableState(*OldBG,params));
+  return Action::state_ptr(restate);
 }
 
@@ -84,9 +81,9 @@
   CommandBondLengthTableState *state = assert_cast<CommandBondLengthTableState*>(_state.get());
 
-  config *configuration = World::getInstance().getConfig();
-  BondGraph *OldBG = new BondGraph(*configuration->BG);
-  configuration->BG = new BondGraph(state->OldBG);
+  BondGraph *OldBG = World::getInstance().getBondGraph();
+  CommandBondLengthTableState *restate = new CommandBondLengthTableState(*OldBG, params);
+  World::getInstance().setBondGraph(new BondGraph(state->OldBG));  // Changes OldBG, hence have to copy beforehand
 
-  return Action::state_ptr(new CommandBondLengthTableState(*OldBG,params));
+  return Action::state_ptr(restate);
 }
 
Index: src/Actions/FragmentationAction/ConstructBondGraphAction.cpp
===================================================================
--- src/Actions/FragmentationAction/ConstructBondGraphAction.cpp	(revision 5309ba2259d81aba279e4520a5ebc51c898d8b75)
+++ src/Actions/FragmentationAction/ConstructBondGraphAction.cpp	(revision f71bafdd0857cf18158866b8a7878c1b33d586b6)
@@ -56,5 +56,5 @@
 
   config *configuration = World::getInstance().getConfig();
-  BondGraph *BG = configuration->BG;
+  BondGraph *BG = World::getInstance().getBondGraph();
   ASSERT(BG != NULL, "FragmentationConstructBondGraphAction: BondGraph is NULL.");
   double BondDistance = BG->getMaxDistance();
Index: src/Actions/FragmentationAction/DepthFirstSearchAction.cpp
===================================================================
--- src/Actions/FragmentationAction/DepthFirstSearchAction.cpp	(revision 5309ba2259d81aba279e4520a5ebc51c898d8b75)
+++ src/Actions/FragmentationAction/DepthFirstSearchAction.cpp	(revision f71bafdd0857cf18158866b8a7878c1b33d586b6)
@@ -52,9 +52,9 @@
   std::deque<bond *> *BackEdgeStack = NULL;
   std::deque<bond *> *LocalBackEdgeStack = NULL;
-  BondGraph *BG = World::getInstance().getConfig()->BG;
+  BondGraph *BG = World::getInstance().getBondGraph();
   if (BG != NULL)
     mol->CreateAdjacencyList(params.distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::BondLengthMatrixMinMaxDistance, BG);
   else
-    mol->CreateAdjacencyList(params.distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, BG);
+    mol->CreateAdjacencyList(params.distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
   Subgraphs = mol->DepthFirstSearchAnalysis(BackEdgeStack);
   if (Subgraphs != NULL) {
Index: src/Actions/FragmentationAction/SubgraphDissectionAction.cpp
===================================================================
--- src/Actions/FragmentationAction/SubgraphDissectionAction.cpp	(revision 5309ba2259d81aba279e4520a5ebc51c898d8b75)
+++ src/Actions/FragmentationAction/SubgraphDissectionAction.cpp	(revision f71bafdd0857cf18158866b8a7878c1b33d586b6)
@@ -91,13 +91,8 @@
   // 1. create the bond structure of the single molecule
   if (BondCount == 0) {
-    config * const configuration = World::getInstance().getConfig();
-    if ((configuration->BG != NULL)) {
-      if (!configuration->BG->ConstructBondGraph(mol)) {
-        World::getInstance().destroyMolecule(mol);
-        DoeLog(1) && (eLog()<< Verbose(1) << "There are no bonds." << endl);
-        return Action::failure;
-      }
-    } else {
-      DoeLog(1) && (eLog()<< Verbose(1) << "There is no BondGraph class present to create bonds." << endl);
+    BondGraph *BG = World::getInstance().getBondGraph();
+    if (!BG->ConstructBondGraph(mol)) {
+      World::getInstance().destroyMolecule(mol);
+      DoeLog(1) && (eLog()<< Verbose(1) << "There are no bonds." << endl);
       return Action::failure;
     }
Index: src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp
===================================================================
--- src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp	(revision 5309ba2259d81aba279e4520a5ebc51c898d8b75)
+++ src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp	(revision f71bafdd0857cf18158866b8a7878c1b33d586b6)
@@ -73,5 +73,5 @@
   molecule *filler = World::getInstance().getMolecule(MoleculeByOrder(-1)); // get last molecule
   filler->SetNameFromFilename(params.fillername.string().c_str());
-  World::getInstance().getConfig()->BG->ConstructBondGraph(filler);
+  World::getInstance().getBondGraph()->ConstructBondGraph(filler);
 
   // call routine
Index: src/Actions/MoleculeAction/FillWithMoleculeAction.cpp
===================================================================
--- src/Actions/MoleculeAction/FillWithMoleculeAction.cpp	(revision 5309ba2259d81aba279e4520a5ebc51c898d8b75)
+++ src/Actions/MoleculeAction/FillWithMoleculeAction.cpp	(revision f71bafdd0857cf18158866b8a7878c1b33d586b6)
@@ -68,5 +68,22 @@
   molecule *filler = World::getInstance().getMolecule(MoleculeByOrder(-1)); // get last molecule
   filler->SetNameFromFilename(params.fillername.string().c_str());
-  World::getInstance().getConfig()->BG->ConstructBondGraph(filler);
+  molecule *Filling = NULL;
+//    atom *first = NULL, *second = NULL, *third = NULL;
+//    first = World::getInstance().createAtom();
+//    first->type = World::getInstance().getPeriode()->FindElement(1);
+//    first->x = Vector(0.441, -0.143, 0.);
+//    filler->AddAtom(first);
+//    second = World::getInstance().createAtom();
+//    second->type = World::getInstance().getPeriode()->FindElement(1);
+//    second->x = Vector(-0.464, 1.137, 0.0);
+//    filler->AddAtom(second);
+//    third = World::getInstance().createAtom();
+//    third->type = World::getInstance().getPeriode()->FindElement(8);
+//    third->x = Vector(-0.464, 0.177, 0.);
+//    filler->AddAtom(third);
+//    filler->AddBond(first, third, 1);
+//    filler->AddBond(second, third, 1);
+  World::getInstance().getBondGraph()->ConstructBondGraph(filler);
+//    filler->SetNameFromFilename("water");
   // TODO: Remove the erasure of molecule when saving does not depend on them anymore.
   World::getInstance().getMolecules()->erase(filler); // remove it, Parser adds it automatically
Index: src/Actions/MoleculeAction/SaveAdjacencyAction.cpp
===================================================================
--- src/Actions/MoleculeAction/SaveAdjacencyAction.cpp	(revision 5309ba2259d81aba279e4520a5ebc51c898d8b75)
+++ src/Actions/MoleculeAction/SaveAdjacencyAction.cpp	(revision f71bafdd0857cf18158866b8a7878c1b33d586b6)
@@ -49,5 +49,5 @@
     mol = iter->second;
     DoLog(0) && (Log() << Verbose(0) << "Storing adjacency to path " << params.adjacencyfile << "." << endl);
-    World::getInstance().getConfig()->BG->ConstructBondGraph(mol);
+    World::getInstance().getBondGraph()->ConstructBondGraph(mol);
     // TODO: sollte stream nicht filename benutzen, besser fuer unit test
     mol->StoreAdjacencyToFile(params.adjacencyfile.leaf(), params.adjacencyfile.branch_path().string());
Index: src/Actions/MoleculeAction/SaveBondsAction.cpp
===================================================================
--- src/Actions/MoleculeAction/SaveBondsAction.cpp	(revision 5309ba2259d81aba279e4520a5ebc51c898d8b75)
+++ src/Actions/MoleculeAction/SaveBondsAction.cpp	(revision f71bafdd0857cf18158866b8a7878c1b33d586b6)
@@ -49,5 +49,5 @@
     mol = iter->second;
     DoLog(0) && (Log() << Verbose(0) << "Storing bonds to path " << params.bondsfile << "." << endl);
-    World::getInstance().getConfig()->BG->ConstructBondGraph(mol);
+    World::getInstance().getBondGraph()->ConstructBondGraph(mol);
     // TODO: sollte stream, nicht filenamen direkt nutzen, besser fuer unit tests
     mol->StoreBondsToFile(params.bondsfile.leaf(), params.bondsfile.branch_path().string());
