Index: src/Actions/AnalysisAction/PairCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/PairCorrelationAction.cpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/Actions/AnalysisAction/PairCorrelationAction.cpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -41,5 +41,5 @@
   Dialog *dialog = UIFactory::getInstance().makeDialog();
 
-  dialog->queryElement("elements", ValueStorage::getInstance().getDescription("elements"));
+  dialog->queryElements("elements", ValueStorage::getInstance().getDescription("elements"));
   dialog->queryDouble("bin-start", ValueStorage::getInstance().getDescription("bin-start"));
   dialog->queryDouble("bin-width", ValueStorage::getInstance().getDescription("bin-width"));
@@ -67,5 +67,4 @@
   Vector Point;
   BinPairMap *binmap = NULL;
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
 
   // obtain information
@@ -82,8 +81,9 @@
   binoutput.open(binoutputname.c_str());
   PairCorrelationMap *correlationmap = NULL;
+  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
   if (periodic)
-    correlationmap = PeriodicPairCorrelation(World::getInstance().getMolecules(), elements, ranges);
+    correlationmap = PeriodicPairCorrelation(molecules, elements, ranges);
   else
-    correlationmap = PairCorrelation(World::getInstance().getMolecules(), elements);
+    correlationmap = PairCorrelation(molecules, elements);
   OutputPairCorrelation(&output, correlationmap);
   binmap = BinData( correlationmap, BinWidth, BinStart, BinEnd );
Index: src/Actions/AnalysisAction/PointCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/PointCorrelationAction.cpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/Actions/AnalysisAction/PointCorrelationAction.cpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -42,5 +42,5 @@
 
   dialog->queryVector("position", false, ValueStorage::getInstance().getDescription("position"));
-  dialog->queryElement("elements", ValueStorage::getInstance().getDescription("elements"));
+  dialog->queryElements("elements", ValueStorage::getInstance().getDescription("elements"));
   dialog->queryDouble("bin-start", ValueStorage::getInstance().getDescription("bin-start"));
   dialog->queryDouble("bin-width", ValueStorage::getInstance().getDescription("bin-width"));
@@ -68,5 +68,4 @@
   Vector Point;
   BinPairMap *binmap = NULL;
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
 
   // obtain information
@@ -85,4 +84,7 @@
   cout << "Point to correlate to is  " << Point << endl;
   CorrelationToPointMap *correlationmap = NULL;
+  for(std::vector< element *>::iterator iter = elements.begin(); iter != elements.end(); ++iter)
+    cout << "element is " << (*iter)->symbol << endl;
+  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
   if (periodic)
     correlationmap  = PeriodicCorrelationToPoint(molecules, elements, &Point, ranges);
Index: src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -42,5 +42,5 @@
 
   dialog->queryMolecule("molecule-by-id", ValueStorage::getInstance().getDescription("molecule-by-id"));
-  dialog->queryElement("elements", ValueStorage::getInstance().getDescription("elements"));
+  dialog->queryElements("elements", ValueStorage::getInstance().getDescription("elements"));
   dialog->queryDouble("bin-start", ValueStorage::getInstance().getDescription("bin-start"));
   dialog->queryDouble("bin-width", ValueStorage::getInstance().getDescription("bin-width"));
@@ -68,5 +68,4 @@
   Vector Point;
   BinPairMap *binmap = NULL;
-  MoleculeListClass *molecules = World::getInstance().getMolecules();
 
   // obtain information
@@ -97,11 +96,6 @@
   const LinkedCell *LCList = NULL;
   // find biggest molecule
-  int counter  = molecules->ListOfMolecules.size();
-  bool *Actives = new bool[counter];
-  counter = 0;
-  for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
-    Actives[counter++] = (*BigFinder)->ActiveFlag;
-    (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
-  }
+  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
+  int counter  = molecules.size();
   LCList = new LinkedCell(Boundary, LCWidth);
   FindNonConvexBorder(Boundary, TesselStruct, LCList, radius, NULL);
@@ -113,10 +107,4 @@
   delete LCList;
   OutputCorrelationToSurface(&output, surfacemap);
-  // re-set ActiveFlag
-  counter = 0;
-  for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
-    (*BigFinder)->ActiveFlag = Actives[counter++];
-  }
-  delete[] Actives;
   // check whether radius was appropriate
   {
Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/Actions/MapOfActions.cpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -196,6 +196,7 @@
   DescriptionMap["output"] = "write output files";
   DescriptionMap["set-output"] = "specify output formats";
-  DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements, element and point or element and surface";
+  DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements";
   DescriptionMap["parse-xyz"] = "parse xyz file into World";
+  DescriptionMap["point-correlation"] = "pair correlation analysis between element and point";
   DescriptionMap["principal-axis-system"] = "calculate the principal axis system of the specified molecule";
   DescriptionMap["remove-atom"] = "remove a specified atom";
@@ -211,4 +212,5 @@
   DescriptionMap["set-output"] = "specify output formats";
   DescriptionMap["subgraph-dissect"] = "dissect the molecular system into molecules representing disconnected subgraphs";
+  DescriptionMap["surface-correlation"] = "pair correlation analysis between element and surface";
   DescriptionMap["suspend-in-water"] = "suspend the given molecule in water such that in the domain the mean density is as specified";
   DescriptionMap["translate-mol"] = "translate molecule by given vector";
@@ -234,5 +236,4 @@
   DescriptionMap["MaxDistance"] = "maximum distance in space";
   DescriptionMap["molecule-by-id"] = "index of a molecule";
-  DescriptionMap["molecule-by-name"] = "name of a molecule";
   DescriptionMap["nonconvex-file"] = "filename of the non-convex envelope";
   DescriptionMap["order"] = "order of a discretization, dissection, ...";
@@ -271,5 +272,5 @@
   ShortFormMap["nonconvex-envelope"] = "N";
 //  ShortFormMap["output"] = "o";
-  ShortFormMap["pair-correlation"] = "C";
+//  ShortFormMap["pair-correlation"] = "C";
   ShortFormMap["parse-xyz"] = "p";
   ShortFormMap["remove-atom"] = "r";
@@ -312,5 +313,6 @@
   TypeMap["output"] = &typeid(void);
   TypeMap["parse-xyz"] = &typeid(std::string);
-  TypeMap["pair-correlation"] = &typeid(std::string);
+  TypeMap["pair-correlation"] = &typeid(void);
+  TypeMap["point-correlation"] = &typeid(void);
   TypeMap["principal-axis-system"] = &typeid(molecule);
   TypeMap["remove-atom"] = &typeid(void);
@@ -325,4 +327,5 @@
   TypeMap["set-output"] = &typeid(std::vector<std::string>);
   TypeMap["subgraph-dissect"] = &typeid(void);
+  TypeMap["surface-correlation"] = &typeid(void);
   TypeMap["suspend-in-water"] = &typeid(double);
   TypeMap["translate-mol"] = &typeid(VectorValue);
@@ -346,4 +349,5 @@
   TypeMap["lengths"] = &typeid(VectorValue);
   TypeMap["MaxDistance"] = &typeid(double);
+  TypeMap["molecule-by-id"] = &typeid(molecule);
   TypeMap["nonconvex-file"] = &typeid(std::string);
   TypeMap["order"] = &typeid(int);
@@ -382,6 +386,4 @@
   CurrentValue["bin-width"] = "0.5";
   CurrentValue["fastparsing"] = "0";
-  CurrentValue["atom-by-id"] = "-1";
-  CurrentValue["molecule-by-id"] = "-1";
   CurrentValue["periodic"] = "0";
 
@@ -399,4 +401,6 @@
   MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "molecular-volume") );
   MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "pair-correlation") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "point-correlation") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "surface-correlation") );
   MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "principal-axis-system") );
 
@@ -478,4 +482,5 @@
 	generic.insert("pair-correlation");
 	generic.insert("parse-xyz");
+  generic.insert("point-correlation");
 //  generic.insert("principal-axis-system");
   generic.insert("remove-atom");
@@ -494,4 +499,5 @@
   generic.insert("set-output");
 	generic.insert("subgraph-dissect");
+  generic.insert("surface-correlation");
   generic.insert("suspend-in-water");
   generic.insert("translate-mol");
@@ -522,4 +528,5 @@
   hidden.insert("lengths");
   hidden.insert("MaxDistance");
+  hidden.insert("molecule-by-id");
   hidden.insert("nonconvex-file");
   hidden.insert("order");
@@ -624,8 +631,10 @@
     CurrentValue.erase(name);
     while (!stream.fail()) {
-      stream >> atomID;
+      stream >> atomID >> ws;
       Walker = World::getInstance().getAtom(AtomById(atomID));
       if (Walker != NULL)
         _T.push_back(Walker);
+      atomID = -1;
+      Walker = NULL;
     }
   } else
@@ -643,8 +652,9 @@
     CurrentValue.erase(name);
     while (!stream.fail()) {
-      stream >> Z;
+      stream >> Z >> ws;
       elemental = World::getInstance().getPeriode()->FindElement(Z);
       if (elemental != NULL)
         _T.push_back(elemental);
+      Z = -1;
     }
   } else
@@ -662,8 +672,10 @@
     CurrentValue.erase(name);
     while (!stream.fail()) {
-      stream >> molID;
+      stream >> molID >> ws;
       mol = World::getInstance().getMolecule(MoleculeById(molID));
       if (mol != NULL)
         _T.push_back(mol);
+      molID = -1;
+      mol = NULL;
     }
   } else
@@ -842,5 +854,5 @@
     for (set<string>::iterator OptionRunner = ListRunner->first->begin(); OptionRunner != ListRunner->first->end(); ++OptionRunner) {
       if (hasValue(*OptionRunner)) {
-        DoLog(0) && (Log() << Verbose(0) << "Adding option " << *OptionRunner << " with type " << TypeMap[*OptionRunner]->name() << " to CommandLineParser." << endl);
+        DoLog(1) && (Log() << Verbose(1) << "Adding option " << *OptionRunner << " with type " << TypeMap[*OptionRunner]->name() << " to CommandLineParser." << endl);
            switch(TypeEnumMap[TypeMap[*OptionRunner]]) {
           default:
Index: src/analysis_correlation.cpp
===================================================================
--- src/analysis_correlation.cpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/analysis_correlation.cpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -28,9 +28,9 @@
 /** Calculates the pair correlation between given elements.
  * Note given element order is unimportant (i.e. g(Si, O) === g(O, Si))
- * \param *molecules list of molecules structure
+ * \param *molecules vector of molecules
  * \param &elements vector of elements to correlate
  * \return Map of doubles with values the pair of the two atoms.
  */
-PairCorrelationMap *PairCorrelation(MoleculeListClass * const &molecules, const std::vector<element *> &elements)
+PairCorrelationMap *PairCorrelation(std::vector<molecule *> &molecules, const std::vector<element *> &elements)
 {
   Info FunctionInfo(__func__);
@@ -39,9 +39,9 @@
   Box &domain = World::getInstance().getDomain();
 
-  if (molecules->ListOfMolecules.empty()) {
+  if (molecules.empty()) {
     DoeLog(1) && (eLog()<< Verbose(1) <<"No molecule given." << endl);
     return outmap;
   }
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++)
     (*MolWalker)->doCountAtoms();
 
@@ -64,24 +64,19 @@
 
   outmap = new PairCorrelationMap;
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++){
-    if ((*MolWalker)->ActiveFlag) {
-      DoeLog(2) && (eLog()<< Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
-      eLog() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl;
-      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
-        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
-        for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++){
-          if ((*MolOtherWalker)->ActiveFlag) {
-            DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);
-            for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {
-              DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);
-              if ((*iter)->getId() < (*runner)->getId()){
-                for (set <pair<element *, element *> >::iterator PairRunner = PairsOfElements.begin(); PairRunner != PairsOfElements.end(); ++PairRunner)
-                  if ((PairRunner->first == (**iter).type) && (PairRunner->second == (**runner).type)) {
-                    distance = domain.periodicDistance(*(*iter)->node,*(*runner)->node);
-                    //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl;
-                    outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) );
-                  }
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++){
+    DoLog(2) && (Log()<< Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
+    for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
+      DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
+      for (std::vector<molecule *>::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules.end(); MolOtherWalker++){
+        DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);
+        for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {
+          DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);
+          if ((*iter)->getId() < (*runner)->getId()){
+            for (set <pair<element *, element *> >::iterator PairRunner = PairsOfElements.begin(); PairRunner != PairsOfElements.end(); ++PairRunner)
+              if ((PairRunner->first == (**iter).type) && (PairRunner->second == (**runner).type)) {
+                distance = domain.periodicDistance(*(*iter)->node,*(*runner)->node);
+                //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl;
+                outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) );
               }
-            }
           }
         }
@@ -99,5 +94,5 @@
  * \return Map of doubles with values the pair of the two atoms.
  */
-PairCorrelationMap *PeriodicPairCorrelation(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const int ranges[NDIM] )
+PairCorrelationMap *PeriodicPairCorrelation(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const int ranges[NDIM] )
 {
   Info FunctionInfo(__func__);
@@ -111,9 +106,9 @@
   Vector periodicOtherX;
 
-  if (molecules->ListOfMolecules.empty()) {
+  if (molecules.empty()) {
     DoeLog(1) && (eLog()<< Verbose(1) <<"No molecule given." << endl);
     return outmap;
   }
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++)
     (*MolWalker)->doCountAtoms();
 
@@ -136,42 +131,37 @@
 
   outmap = new PairCorrelationMap;
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++){
-    if ((*MolWalker)->ActiveFlag) {
-      Matrix FullMatrix = World::getInstance().getDomain().getM();
-      Matrix FullInverseMatrix = World::getInstance().getDomain().getMinv();
-      DoeLog(2) && (eLog()<< Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
-      eLog() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl;
-      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
-        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
-        periodicX = FullInverseMatrix * (*(*iter)->node); // x now in [0,1)^3
-        // go through every range in xyz and get distance
-        for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
-          for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
-            for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
-              checkX = FullMatrix * (Vector(n[0], n[1], n[2]) + periodicX);
-              for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++){
-                if ((*MolOtherWalker)->ActiveFlag) {
-                  DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);
-                  for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {
-                    DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);
-                    if ((*iter)->getId() < (*runner)->getId()){
-                      for (set <pair<element *, element *> >::iterator PairRunner = PairsOfElements.begin(); PairRunner != PairsOfElements.end(); ++PairRunner)
-                        if ((PairRunner->first == (**iter).type) && (PairRunner->second == (**runner).type)) {
-                          periodicOtherX = FullInverseMatrix * (*(*runner)->node); // x now in [0,1)^3
-                          // go through every range in xyz and get distance
-                          for (Othern[0]=-ranges[0]; Othern[0] <= ranges[0]; Othern[0]++)
-                            for (Othern[1]=-ranges[1]; Othern[1] <= ranges[1]; Othern[1]++)
-                              for (Othern[2]=-ranges[2]; Othern[2] <= ranges[2]; Othern[2]++) {
-                                checkOtherX = FullMatrix * (Vector(Othern[0], Othern[1], Othern[2]) + periodicOtherX);
-                                distance = checkX.distance(checkOtherX);
-                                //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl;
-                                outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) );
-                              }
-                        }
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++){
+    Matrix FullMatrix = World::getInstance().getDomain().getM();
+    Matrix FullInverseMatrix = World::getInstance().getDomain().getMinv();
+    DoLog(2) && (Log()<< Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
+    for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
+      DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
+      periodicX = FullInverseMatrix * (*(*iter)->node); // x now in [0,1)^3
+      // go through every range in xyz and get distance
+      for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
+        for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
+          for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
+            checkX = FullMatrix * (Vector(n[0], n[1], n[2]) + periodicX);
+            for (std::vector<molecule *>::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules.end(); MolOtherWalker++){
+                DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl);
+                for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) {
+                  DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl);
+                  if ((*iter)->getId() < (*runner)->getId()){
+                    for (set <pair<element *, element *> >::iterator PairRunner = PairsOfElements.begin(); PairRunner != PairsOfElements.end(); ++PairRunner)
+                      if ((PairRunner->first == (**iter).type) && (PairRunner->second == (**runner).type)) {
+                        periodicOtherX = FullInverseMatrix * (*(*runner)->node); // x now in [0,1)^3
+                        // go through every range in xyz and get distance
+                        for (Othern[0]=-ranges[0]; Othern[0] <= ranges[0]; Othern[0]++)
+                          for (Othern[1]=-ranges[1]; Othern[1] <= ranges[1]; Othern[1]++)
+                            for (Othern[2]=-ranges[2]; Othern[2] <= ranges[2]; Othern[2]++) {
+                              checkOtherX = FullMatrix * (Vector(Othern[0], Othern[1], Othern[2]) + periodicOtherX);
+                              distance = checkX.distance(checkOtherX);
+                              //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl;
+                              outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) );
+                            }
+                      }
                     }
                   }
                 }
-              }
-            }
       }
     }
@@ -187,5 +177,5 @@
  * \return Map of dobules with values as pairs of atom and the vector
  */
-CorrelationToPointMap *CorrelationToPoint(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Vector *point )
+CorrelationToPointMap *CorrelationToPoint(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const Vector *point )
 {
   Info FunctionInfo(__func__);
@@ -194,24 +184,23 @@
   Box &domain = World::getInstance().getDomain();
 
-  if (molecules->ListOfMolecules.empty()) {
+  if (molecules.empty()) {
     DoLog(1) && (Log() << Verbose(1) <<"No molecule given." << endl);
     return outmap;
   }
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++)
     (*MolWalker)->doCountAtoms();
   outmap = new CorrelationToPointMap;
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
-    if ((*MolWalker)->ActiveFlag) {
-      DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
-      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
-        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
-        for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
-          if ((*type == NULL) || ((*iter)->type == *type)) {
-            distance = domain.periodicDistance(*(*iter)->node,*point);
-            DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
-            outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ((*iter), point) ) );
-          }
-      }
-    }
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++) {
+    DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
+    for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
+      DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
+      for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
+        if ((*type == NULL) || ((*iter)->type == *type)) {
+          distance = domain.periodicDistance(*(*iter)->node,*point);
+          DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
+          outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ((*iter), point) ) );
+        }
+    }
+  }
 
   return outmap;
@@ -225,5 +214,5 @@
  * \return Map of dobules with values as pairs of atom and the vector
  */
-CorrelationToPointMap *PeriodicCorrelationToPoint(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Vector *point, const int ranges[NDIM] )
+CorrelationToPointMap *PeriodicCorrelationToPoint(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const Vector *point, const int ranges[NDIM] )
 {
   Info FunctionInfo(__func__);
@@ -234,33 +223,32 @@
   Vector checkX;
 
-  if (molecules->ListOfMolecules.empty()) {
+  if (molecules.empty()) {
     DoLog(1) && (Log() << Verbose(1) <<"No molecule given." << endl);
     return outmap;
   }
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++)
     (*MolWalker)->doCountAtoms();
   outmap = new CorrelationToPointMap;
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
-    if ((*MolWalker)->ActiveFlag) {
-      Matrix FullMatrix = World::getInstance().getDomain().getM();
-      Matrix FullInverseMatrix = World::getInstance().getDomain().getMinv();
-      DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
-      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
-        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
-        for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
-          if ((*type == NULL) || ((*iter)->type == *type)) {
-            periodicX = FullInverseMatrix * (*(*iter)->node); // x now in [0,1)^3
-            // go through every range in xyz and get distance
-            for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
-              for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
-                for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
-                  checkX = FullMatrix * (Vector(n[0], n[1], n[2]) + periodicX);
-                  distance = checkX.distance(*point);
-                  DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
-                  outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (*iter, point) ) );
-                }
-          }
-      }
-    }
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++) {
+    Matrix FullMatrix = World::getInstance().getDomain().getM();
+    Matrix FullInverseMatrix = World::getInstance().getDomain().getMinv();
+    DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
+    for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
+      DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
+      for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
+        if ((*type == NULL) || ((*iter)->type == *type)) {
+          periodicX = FullInverseMatrix * (*(*iter)->node); // x now in [0,1)^3
+          // go through every range in xyz and get distance
+          for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
+            for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
+              for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
+                checkX = FullMatrix * (Vector(n[0], n[1], n[2]) + periodicX);
+                distance = checkX.distance(*point);
+                DoLog(4) && (Log() << Verbose(4) << "Current distance is " << distance << "." << endl);
+                outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (*iter, point) ) );
+              }
+        }
+    }
+  }
 
   return outmap;
@@ -274,5 +262,5 @@
  * \return Map of doubles with values as pairs of atom and the BoundaryTriangleSet that's closest
  */
-CorrelationToSurfaceMap *CorrelationToSurface(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC )
+CorrelationToSurfaceMap *CorrelationToSurface(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC )
 {
   Info FunctionInfo(__func__);
@@ -282,29 +270,26 @@
   Vector centroid;
 
-  if ((Surface == NULL) || (LC == NULL) || (molecules->ListOfMolecules.empty())) {
+  if ((Surface == NULL) || (LC == NULL) || (molecules.empty())) {
     DoeLog(1) && (eLog()<< Verbose(1) <<"No Tesselation, no LinkedCell or no molecule given." << endl);
     return outmap;
   }
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++)
     (*MolWalker)->doCountAtoms();
   outmap = new CorrelationToSurfaceMap;
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
-    if ((*MolWalker)->ActiveFlag) {
-      DoLog(1) && (Log() << Verbose(1) << "Current molecule is " << (*MolWalker)->name << "." << endl);
-      if ((*MolWalker)->empty())
-        DoLog(1) && (1) && (Log() << Verbose(1) << "\t is empty." << endl);
-      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
-        DoLog(1) && (Log() << Verbose(1) << "\tCurrent atom is " << *(*iter) << "." << endl);
-        for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
-          if ((*type == NULL) || ((*iter)->type == *type)) {
-            TriangleIntersectionList Intersections((*iter)->node,Surface,LC);
-            distance = Intersections.GetSmallestDistance();
-            triangle = Intersections.GetClosestTriangle();
-            outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(distance, pair<atom *, BoundaryTriangleSet*> ((*iter), triangle) ) );
-          }
-      }
-    } else {
-      DoLog(1) && (Log() << Verbose(1) << "molecule " << (*MolWalker)->name << " is not active." << endl);
-    }
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++) {
+    DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << (*MolWalker)->name << "." << endl);
+    if ((*MolWalker)->empty())
+      DoLog(2) && (2) && (Log() << Verbose(2) << "\t is empty." << endl);
+    for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
+      DoLog(3) && (Log() << Verbose(3) << "\tCurrent atom is " << *(*iter) << "." << endl);
+      for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
+        if ((*type == NULL) || ((*iter)->type == *type)) {
+          TriangleIntersectionList Intersections((*iter)->node,Surface,LC);
+          distance = Intersections.GetSmallestDistance();
+          triangle = Intersections.GetClosestTriangle();
+          outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(distance, pair<atom *, BoundaryTriangleSet*> ((*iter), triangle) ) );
+        }
+    }
+  }
 
   return outmap;
@@ -323,5 +308,5 @@
  * \return Map of doubles with values as pairs of atom and the BoundaryTriangleSet that's closest
  */
-CorrelationToSurfaceMap *PeriodicCorrelationToSurface(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC, const int ranges[NDIM] )
+CorrelationToSurfaceMap *PeriodicCorrelationToSurface(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC, const int ranges[NDIM] )
 {
   Info FunctionInfo(__func__);
@@ -334,43 +319,42 @@
   Vector checkX;
 
-  if ((Surface == NULL) || (LC == NULL) || (molecules->ListOfMolecules.empty())) {
+  if ((Surface == NULL) || (LC == NULL) || (molecules.empty())) {
     DoLog(1) && (Log() << Verbose(1) <<"No Tesselation, no LinkedCell or no molecule given." << endl);
     return outmap;
   }
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++)
     (*MolWalker)->doCountAtoms();
   outmap = new CorrelationToSurfaceMap;
   double ShortestDistance = 0.;
   BoundaryTriangleSet *ShortestTriangle = NULL;
-  for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin(); MolWalker != molecules->ListOfMolecules.end(); MolWalker++)
-    if ((*MolWalker)->ActiveFlag) {
-      Matrix FullMatrix = World::getInstance().getDomain().getM();
-      Matrix FullInverseMatrix = World::getInstance().getDomain().getMinv();
-      DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
-      for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
-        DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
-        for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
-          if ((*type == NULL) || ((*iter)->type == *type)) {
-            periodicX = FullInverseMatrix * (*(*iter)->node); // x now in [0,1)^3
-            // go through every range in xyz and get distance
-            ShortestDistance = -1.;
-            for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
-              for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
-                for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
-                  checkX = FullMatrix * (Vector(n[0], n[1], n[2]) + periodicX);
-                  TriangleIntersectionList Intersections(&checkX,Surface,LC);
-                  distance = Intersections.GetSmallestDistance();
-                  triangle = Intersections.GetClosestTriangle();
-                  if ((ShortestDistance == -1.) || (distance < ShortestDistance)) {
-                    ShortestDistance = distance;
-                    ShortestTriangle = triangle;
-                  }
+  for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++) {
+    Matrix FullMatrix = World::getInstance().getDomain().getM();
+    Matrix FullInverseMatrix = World::getInstance().getDomain().getMinv();
+    DoLog(2) && (Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl);
+    for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
+      DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl);
+      for (vector<element *>::const_iterator type = elements.begin(); type != elements.end(); ++type)
+        if ((*type == NULL) || ((*iter)->type == *type)) {
+          periodicX = FullInverseMatrix * (*(*iter)->node); // x now in [0,1)^3
+          // go through every range in xyz and get distance
+          ShortestDistance = -1.;
+          for (n[0]=-ranges[0]; n[0] <= ranges[0]; n[0]++)
+            for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++)
+              for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) {
+                checkX = FullMatrix * (Vector(n[0], n[1], n[2]) + periodicX);
+                TriangleIntersectionList Intersections(&checkX,Surface,LC);
+                distance = Intersections.GetSmallestDistance();
+                triangle = Intersections.GetClosestTriangle();
+                if ((ShortestDistance == -1.) || (distance < ShortestDistance)) {
+                  ShortestDistance = distance;
+                  ShortestTriangle = triangle;
                 }
-            // insert
-            outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(ShortestDistance, pair<atom *, BoundaryTriangleSet*> (*iter, ShortestTriangle) ) );
-            //Log() << Verbose(1) << "INFO: Inserting " << Walker << " with distance " << ShortestDistance << " to " << *ShortestTriangle << "." << endl;
-          }
-      }
-    }
+              }
+          // insert
+          outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(ShortestDistance, pair<atom *, BoundaryTriangleSet*> (*iter, ShortestTriangle) ) );
+          //Log() << Verbose(1) << "INFO: Inserting " << Walker << " with distance " << ShortestDistance << " to " << *ShortestTriangle << "." << endl;
+        }
+    }
+  }
 
   return outmap;
Index: src/analysis_correlation.hpp
===================================================================
--- src/analysis_correlation.hpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/analysis_correlation.hpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -22,4 +22,5 @@
 // STL headers
 #include <map>
+#include <vector>
 
 #include "defs.hpp"
@@ -33,5 +34,4 @@
 class element;
 class LinkedCell;
-class MoleculeListClass;
 class Tesselation;
 class Vector;
@@ -46,10 +46,10 @@
 /********************************************** declarations *******************************/
 
-PairCorrelationMap *PairCorrelation(MoleculeListClass * const &molecules, const std::vector<element *> &elements);
-CorrelationToPointMap *CorrelationToPoint(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Vector *point );
-CorrelationToSurfaceMap *CorrelationToSurface(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC );
-PairCorrelationMap *PeriodicPairCorrelation(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const int ranges[NDIM] );
-CorrelationToPointMap *PeriodicCorrelationToPoint(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Vector *point, const int ranges[NDIM] );
-CorrelationToSurfaceMap *PeriodicCorrelationToSurface(MoleculeListClass * const &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC, const int ranges[NDIM] );
+PairCorrelationMap *PairCorrelation(std::vector<molecule *> &molecules, const std::vector<element *> &elements);
+CorrelationToPointMap *CorrelationToPoint(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const Vector *point );
+CorrelationToSurfaceMap *CorrelationToSurface(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC );
+PairCorrelationMap *PeriodicPairCorrelation(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const int ranges[NDIM] );
+CorrelationToPointMap *PeriodicCorrelationToPoint(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const Vector *point, const int ranges[NDIM] );
+CorrelationToSurfaceMap *PeriodicCorrelationToSurface(std::vector<molecule *> &molecules, const std::vector<element *> &elements, const Tesselation * const Surface, const LinkedCell *LC, const int ranges[NDIM] );
 int GetBin ( const double value, const double BinWidth, const double BinStart );
 void OutputCorrelation( ofstream * const file, const BinPairMap * const map );
Index: src/unittests/AnalysisCorrelationToPointUnitTest.cpp
===================================================================
--- src/unittests/AnalysisCorrelationToPointUnitTest.cpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/unittests/AnalysisCorrelationToPointUnitTest.cpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -16,4 +16,6 @@
 #include "analysis_correlation.hpp"
 #include "AnalysisCorrelationToPointUnitTest.hpp"
+
+#include "Descriptors/MoleculeDescriptor.hpp"
 
 #include "atom.hpp"
@@ -38,5 +40,4 @@
 
   // init private all pointers to zero
-  TestList = NULL;
   TestMolecule = NULL;
   pointmap = NULL;
@@ -71,6 +72,4 @@
   CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 );
 
-  TestList = World::getInstance().getMolecules();
-  TestList->insert(TestMolecule);
   TestMolecule->ActiveFlag = true;
 
@@ -79,5 +78,8 @@
 
   // init maps
-  pointmap = CorrelationToPoint( (MoleculeListClass * const)TestList, elements, (const Vector *)point );
+  World::getInstance().selectAllMolecules(AllMolecules());
+  allMolecules = World::getInstance().getSelectedMolecules();
+  CPPUNIT_ASSERT_EQUAL( (size_t) 1, allMolecules.size());
+  pointmap = CorrelationToPoint( allMolecules, elements, (const Vector *)point );
   binmap = NULL;
 
Index: src/unittests/AnalysisCorrelationToPointUnitTest.hpp
===================================================================
--- src/unittests/AnalysisCorrelationToPointUnitTest.hpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/unittests/AnalysisCorrelationToPointUnitTest.hpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -35,5 +35,5 @@
 private:
 
-      MoleculeListClass *TestList;
+      std::vector<molecule *> allMolecules;
       molecule *TestMolecule;
       element *hydrogen;
Index: src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
===================================================================
--- src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -16,4 +16,6 @@
 #include "analysis_correlation.hpp"
 #include "AnalysisCorrelationToSurfaceUnitTest.hpp"
+
+#include "Descriptors/MoleculeDescriptor.hpp"
 
 #include "atom.hpp"
@@ -45,5 +47,4 @@
 
   // init private all pointers to zero
-  TestList = NULL;
   TestSurfaceMolecule = NULL;
   surfacemap = NULL;
@@ -83,7 +84,5 @@
   CPPUNIT_ASSERT_EQUAL( TestSurfaceMolecule->getAtomCount(), 4 );
 
-  TestList = World::getInstance().getMolecules();
   TestSurfaceMolecule->ActiveFlag = true;
-  TestList->insert(TestSurfaceMolecule);
 
   // init tesselation and linked cell
@@ -116,6 +115,7 @@
   TestSurfaceMolecule->AddAtom(Walker);
 
-  TestSurfaceMolecule->ActiveFlag = true;
-  TestList->insert(TestSurfaceMolecule);
+  World::getInstance().selectAllMolecules(AllMolecules());
+  allMolecules = World::getInstance().getSelectedMolecules();
+  CPPUNIT_ASSERT_EQUAL( (size_t) 2, allMolecules.size());
 
   // init maps
@@ -146,5 +146,5 @@
 {
   CPPUNIT_ASSERT_EQUAL( 4, TestSurfaceMolecule->getAtomCount() );
-  CPPUNIT_ASSERT_EQUAL( (size_t)2, TestList->ListOfMolecules.size() );
+  CPPUNIT_ASSERT_EQUAL( (size_t)2, allMolecules.size() );
   CPPUNIT_ASSERT_EQUAL( (size_t)4, Surface->PointsOnBoundary.size() );
   CPPUNIT_ASSERT_EQUAL( (size_t)6, Surface->LinesOnBoundary.size() );
@@ -156,5 +156,5 @@
   // do the pair correlation
   elements.push_back(hydrogen);
-  surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
+  surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC );
 //  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
   CPPUNIT_ASSERT( surfacemap != NULL );
@@ -166,5 +166,5 @@
   BinPairMap::iterator tester;
   elements.push_back(hydrogen);
-  surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
+  surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC );
   // put pair correlation into bins and check with no range
 //  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
@@ -182,5 +182,5 @@
   BinPairMap::iterator tester;
   elements.push_back(hydrogen);
-  surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
+  surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC );
 //  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
   // ... and check with [0., 2.] range
@@ -201,5 +201,5 @@
   BinPairMap::iterator tester;
   elements.push_back(carbon);
-  surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
+  surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC );
 //  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
   // put pair correlation into bins and check with no range
@@ -221,5 +221,5 @@
   BinPairMap::iterator tester;
   elements.push_back(carbon);
-  surfacemap = CorrelationToSurface( TestList, elements, Surface, LC );
+  surfacemap = CorrelationToSurface( allMolecules, elements, Surface, LC );
 //  OutputCorrelationToSurface ( (ofstream *)&cout, surfacemap );
   // ... and check with [0., 2.] range
Index: src/unittests/AnalysisCorrelationToSurfaceUnitTest.hpp
===================================================================
--- src/unittests/AnalysisCorrelationToSurfaceUnitTest.hpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/unittests/AnalysisCorrelationToSurfaceUnitTest.hpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -43,5 +43,5 @@
 private:
 
-      MoleculeListClass *TestList;
+      std::vector<molecule *> allMolecules;
       molecule *TestSurfaceMolecule;
       element *hydrogen;
Index: src/unittests/AnalysisPairCorrelationUnitTest.cpp
===================================================================
--- src/unittests/AnalysisPairCorrelationUnitTest.cpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/unittests/AnalysisPairCorrelationUnitTest.cpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -16,4 +16,6 @@
 #include "analysis_correlation.hpp"
 #include "AnalysisPairCorrelationUnitTest.hpp"
+
+#include "Descriptors/MoleculeDescriptor.hpp"
 
 #include "World.hpp"
@@ -42,5 +44,4 @@
 
   // init private all pointers to zero
-  TestList = NULL;
   TestMolecule = NULL;
   correlationmap = NULL;
@@ -76,10 +77,9 @@
   CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 );
 
-  TestList = World::getInstance().getMolecules();
-  TestMolecule->ActiveFlag = true;
-  TestList->insert(TestMolecule);
-
   // init maps
-  correlationmap = PairCorrelation( TestList, elements);
+  World::getInstance().selectAllMolecules(AllMolecules());
+  allMolecules = World::getInstance().getSelectedMolecules();
+  CPPUNIT_ASSERT_EQUAL( (size_t) 1, allMolecules.size());
+  correlationmap = PairCorrelation( allMolecules, elements);
   binmap = NULL;
 
Index: src/unittests/AnalysisPairCorrelationUnitTest.hpp
===================================================================
--- src/unittests/AnalysisPairCorrelationUnitTest.hpp	(revision 521bbfdcb3f9d76603e416866b36445f50dddcf1)
+++ src/unittests/AnalysisPairCorrelationUnitTest.hpp	(revision a8a010e328f77377ca5cf5d0610c43e918811836)
@@ -35,5 +35,5 @@
 private:
 
-      MoleculeListClass *TestList;
+      std::vector<molecule *> allMolecules;
       molecule *TestMolecule;
       element *hydrogen;
