Index: src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp	(revision dcbb5dac817f661e01dae1a9436a1ec9bb379493)
+++ src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp	(revision 2ab6b6fe93bbcbee3b2b87e40ef236d5a2c472c8)
@@ -54,9 +54,8 @@
  *
  * @param _graph instance of Graph containing keyset of each fragment
- * @param _mol molecule as reference
- */
-ExportGraph_ToFiles::ExportGraph_ToFiles(const Graph &_graph, molecule *&_mol, const enum HydrogenSaturation _saturation) :
+ * @param saturation whether to saturate dangling bonds with hydrogen or not
+ */
+ExportGraph_ToFiles::ExportGraph_ToFiles(const Graph &_graph, const enum HydrogenSaturation _saturation) :
 		ExportGraph(_graph),
-		mol(_mol),
 		BondFragments(World::getPointer()),
 		saturation(_saturation)
@@ -107,5 +106,5 @@
   // store force index reference file
   {
-    SortIndex_t SortIndex(mol);
+    SortIndex_t SortIndex;
     BondFragments.StoreForcesFile(prefix, SortIndex);
   }
@@ -113,10 +112,4 @@
   // store keysets file
   TotalGraph.StoreKeySetFile(prefix);
-
-  {
-    // store Adjacency file
-    std::string filename = prefix + ADJACENCYFILE;
-    mol->StoreAdjacencyToFile(filename);
-  }
 
   // store Hydrogen saturation correction file
@@ -137,5 +130,5 @@
     LOG(2, "DEBUG: Fragment No." << (*runner).second.first << " with TEFactor "
     		<< (*runner).second.second << ".");
-    BondFragments.insert(StoreFragmentFromKeySet(mol, test, World::getInstance().getConfig()));
+    BondFragments.insert(StoreFragmentFromKeySet(test, World::getInstance().getConfig()));
     ++count;
   }
@@ -147,10 +140,9 @@
  * First creates the minimal set of atoms from the KeySet, then creates the bond structure from the complete
  * molecule and adds missing hydrogen where bonds were cut.
- * \param *mol reference molecule
  * \param &Leaflet pointer to KeySet structure
  * \param IsAngstroem whether we have Ansgtroem or bohrradius
  * \return pointer to constructed molecule
  */
-molecule * ExportGraph_ToFiles::StoreFragmentFromKeySet(molecule *mol, KeySet &Leaflet, bool IsAngstroem)
+molecule * ExportGraph_ToFiles::StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem)
 {
   Info info(__func__);
@@ -158,8 +150,8 @@
   molecule *Leaf = World::getInstance().createMolecule();
 
-  StoreFragmentFromKeySet_Init(mol, Leaf, Leaflet, SonList);
+  StoreFragmentFromKeySet_Init(Leaf, Leaflet, SonList);
   // create the bonds between all: Make it an induced subgraph and add hydrogen
 //  LOG(2, "Creating bonds from father graph (i.e. induced subgraph creation).");
-  CreateInducedSubgraphOfFragment(mol, Leaf, SonList, IsAngstroem);
+  CreateInducedSubgraphOfFragment(Leaf, SonList, IsAngstroem);
 
   //Leaflet->Leaf->ScanForPeriodicCorrection(out);
@@ -168,5 +160,4 @@
 
 /** Initializes some value for putting fragment of \a *mol into \a *Leaf.
- * \param *mol total molecule
  * \param *Leaf fragment molecule
  * \param &Leaflet pointer to KeySet structure
@@ -174,12 +165,13 @@
  * \return number of atoms in fragment
  */
-int ExportGraph_ToFiles::StoreFragmentFromKeySet_Init(molecule *mol, molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList)
+int ExportGraph_ToFiles::StoreFragmentFromKeySet_Init(molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList)
 {
   atom *FatherOfRunner = NULL;
 
   // first create the minimal set of atoms from the KeySet
+  World &world = World::getInstance();
   int size = 0;
   for(KeySet::const_iterator runner = Leaflet.begin(); runner != Leaflet.end(); runner++) {
-    FatherOfRunner = mol->FindAtom((*runner));  // find the id
+    FatherOfRunner = world.getAtom(AtomById(*runner));  // find the id
     SonList.insert( std::make_pair(FatherOfRunner->getNr(), Leaf->AddCopyAtom(FatherOfRunner) ) );
     size++;
@@ -189,11 +181,9 @@
 
 /** Creates an induced subgraph out of a fragmental key set, adding bonds and hydrogens (if treated specially).
- * \param *out output stream for debugging messages
- * \param *mol total molecule
  * \param *Leaf fragment molecule
  * \param IsAngstroem whether we have Ansgtroem or bohrradius
- * \param SonList list which atom of \a *Leaf is a son of which atom in \a *mol
- */
-void ExportGraph_ToFiles::CreateInducedSubgraphOfFragment(molecule *mol, molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem)
+ * \param SonList list which atom of \a *Leaf is another atom's son
+ */
+void ExportGraph_ToFiles::CreateInducedSubgraphOfFragment(molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem)
 {
   bool LonelyFlag = false;
Index: src/Fragmentation/Exporters/ExportGraph_ToFiles.hpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToFiles.hpp	(revision dcbb5dac817f661e01dae1a9436a1ec9bb379493)
+++ src/Fragmentation/Exporters/ExportGraph_ToFiles.hpp	(revision 2ab6b6fe93bbcbee3b2b87e40ef236d5a2c472c8)
@@ -22,4 +22,5 @@
 
 class ListOfLocalAtoms_t;
+class molecule;
 
 /** ExportGraph_ToFiles implements an ExportGraph as storing all fragmentary
@@ -29,5 +30,5 @@
 {
 public:
-	ExportGraph_ToFiles(const Graph &_graph, molecule *&_mol, const enum HydrogenSaturation _saturation);
+	ExportGraph_ToFiles(const Graph &_graph, const enum HydrogenSaturation _saturation);
 	virtual ~ExportGraph_ToFiles();
 
@@ -45,11 +46,9 @@
 
 	void prepareMolecule();
-  molecule * StoreFragmentFromKeySet(molecule *mol, KeySet &Leaflet, bool IsAngstroem);
-  int StoreFragmentFromKeySet_Init(molecule *mol, molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList);
-  void CreateInducedSubgraphOfFragment(molecule *mol, molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem);
+  molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem);
+  int StoreFragmentFromKeySet_Init(molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList);
+  void CreateInducedSubgraphOfFragment(molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem);
 
 private:
-  //!> molecule as reference
-  molecule *mol;
   //!> internal list of created molecules
 	MoleculeListClass BondFragments;
