Index: src/Actions/FillAction/FillVolumeAction.cpp
===================================================================
--- src/Actions/FillAction/FillVolumeAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/FillAction/FillVolumeAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -78,5 +78,7 @@
   }
   molecule *filler = *(molecules.begin());
-  for(molecule::const_iterator iter = filler->begin(); iter != filler->end(); ++iter)
+  for(molecule::const_iterator iter = const_cast<const molecule *>(filler)->begin();
+      iter != const_cast<const molecule *>(filler)->end();
+      ++iter)
     movedatoms.push_back( AtomicInfo(*(*iter)) );
   LOG(1, "INFO: Chosen molecule has " << filler->size() << " atoms.");
Index: src/Actions/FillAction/SuspendInMoleculeAction.cpp
===================================================================
--- src/Actions/FillAction/SuspendInMoleculeAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/FillAction/SuspendInMoleculeAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -141,5 +141,5 @@
   double clustervolume = 0.;
   std::vector<double> GreatestDiameter(NDIM, 0.);
-  for (std::vector<molecule *>::iterator iter = molecules.begin();
+  for (std::vector<molecule *>::const_iterator iter = molecules.begin();
       iter != molecules.end(); ++iter)
   {
Index: src/Actions/GraphAction/CreateAdjacencyAction.cpp
===================================================================
--- src/Actions/GraphAction/CreateAdjacencyAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/GraphAction/CreateAdjacencyAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -109,6 +109,7 @@
   // give info
   size_t BondCount = 0;
-  std::vector<molecule *> molecules = World::getInstance().getAllMolecules();
-  for (std::vector<molecule *>::const_iterator iter = molecules.begin();
+  std::vector<const molecule *> molecules = const_cast<const World &>(World::getInstance()).
+      getAllMolecules();
+  for (std::vector<const molecule *>::const_iterator iter = molecules.begin();
       iter != molecules.end(); ++iter)
     BondCount += (*iter)->getBondCount();
Index: src/Actions/GraphAction/UpdateMoleculesAction.cpp
===================================================================
--- src/Actions/GraphAction/UpdateMoleculesAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/GraphAction/UpdateMoleculesAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -67,12 +67,15 @@
   LOG(0, "STATUS: Creating undo state.");
   MolAtomList moleculelist;
-  vector<molecule *> allmolecules = World::getInstance().getAllMolecules();
-  for (vector<molecule *>::const_iterator moliter = allmolecules.begin(); moliter != allmolecules.end(); ++moliter) {
-    std::vector<atomId_t> atomlist;
-    atomlist.resize((*moliter)->size());
-    for (molecule::const_iterator atomiter = (*moliter)->begin(); atomiter != (*moliter)->end(); ++atomiter) {
-      atomlist.push_back((*atomiter)->getId());
+  {
+    vector<const molecule *> allmolecules = const_cast<const World &>(World::getInstance()).
+        getAllMolecules();
+    for (vector<const molecule *>::const_iterator moliter = allmolecules.begin(); moliter != allmolecules.end(); ++moliter) {
+      std::vector<atomId_t> atomlist;
+      atomlist.resize((*moliter)->size());
+      for (molecule::const_iterator atomiter = (*moliter)->begin(); atomiter != (*moliter)->end(); ++atomiter) {
+        atomlist.push_back((*atomiter)->getId());
+      }
+      moleculelist.insert( std::pair< moleculeId_t, std::vector<atomId_t> > ((*moliter)->getId(), atomlist));
     }
-    moleculelist.insert( std::pair< moleculeId_t, std::vector<atomId_t> > ((*moliter)->getId(), atomlist));
   }
   GraphUpdateMoleculesState *UndoState = new GraphUpdateMoleculesState(moleculelist, params);
@@ -81,4 +84,5 @@
   LOG(0, "STATUS: Removing all present molecules.");
   MoleculeListClass *molecules = World::getInstance().getMolecules();
+  vector<molecule *> allmolecules = World::getInstance().getAllMolecules();
   for (vector<molecule *>::iterator MolRunner = allmolecules.begin(); MolRunner != allmolecules.end(); ++MolRunner) {
     molecules->erase(*MolRunner);
@@ -90,5 +94,7 @@
   DFS();
   DFS.UpdateMoleculeStructure();
-  if (World::getInstance().numMolecules() == 0) {
+  const size_t numMolecules =
+      const_cast<const World &>(World::getInstance()).numMolecules();
+  if (numMolecules == 0) {
     //World::getInstance().destroyMolecule(mol);
     STATUS("There are no molecules.");
@@ -96,5 +102,5 @@
   }
 
-  LOG(1, "I scanned " << World::getInstance().numMolecules() << " molecules.");
+  LOG(1, "I scanned " << numMolecules << " molecules.");
 
   return ActionState::ptr(UndoState);
Index: src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.cpp
===================================================================
--- src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -56,7 +56,7 @@
 ActionState::ptr SelectionMoleculeByFormulaAction::performCall() {
   LOG(1, "Selecting molecules with chemical formula " << params.formula.get() << ":");
-//  std::vector<molecule *> matchingMolecules = World::getInstance().getAllMolecules(MoleculeByFormula(params.formula.get()));
-  std::vector<molecule *> selectedMolecules =
-      World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula.get()));
+  std::vector<const molecule *> selectedMolecules =
+      const_cast<const World &>(World::getInstance()).
+      getAllMolecules(MoleculesBySelection() && MoleculeByFormula(params.formula.get()));
 //  BOOST_FOREACH(molecule *mol, matchingMolecules)
 //    LOG(1, "\t" << mol->getId() << ", " << mol->getName() << ".");
@@ -70,5 +70,5 @@
 
   World::getInstance().unselectAllMolecules(MoleculeByFormula(state->params.formula.get()));
-  BOOST_FOREACH( molecule *mol, state->selectedMolecules)
+  BOOST_FOREACH( const molecule *mol, state->selectedMolecules)
     World::getInstance().selectMolecule(mol);
 
Index: src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.def
===================================================================
--- src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.def	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/SelectionAction/Molecules/MoleculeByFormulaAction.def	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -22,5 +22,5 @@
 (FormulaValidator())
 
-#define statetypes (std::vector<molecule*>)
+#define statetypes (std::vector<const molecule*>)
 #define statereferences (selectedMolecules)
 
Index: src/Actions/SelectionAction/Molecules/MoleculeByNameAction.cpp
===================================================================
--- src/Actions/SelectionAction/Molecules/MoleculeByNameAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/SelectionAction/Molecules/MoleculeByNameAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -56,6 +56,7 @@
 ActionState::ptr SelectionMoleculeByNameAction::performCall() {
   LOG(1, "Selecting all molecules called " << params.molname.get());
-  std::vector<molecule *> selectedMolecules =
-      World::getInstance().getAllMolecules(MoleculesBySelection() && MoleculeByName(params.molname.get()));
+  std::vector<const molecule *> selectedMolecules =
+      const_cast<const World &>(World::getInstance()).
+      getAllMolecules(MoleculesBySelection() && MoleculeByName(params.molname.get()));
   World::getInstance().selectAllMolecules(MoleculeByName(params.molname.get()));
   LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected.");
@@ -68,5 +69,5 @@
 
   World::getInstance().unselectAllMolecules(MoleculeByName(state->params.molname.get()));
-  BOOST_FOREACH( molecule *mol, state->selectedMolecules)
+  BOOST_FOREACH( const molecule *mol, state->selectedMolecules)
     World::getInstance().selectMolecule(mol);
 
Index: src/Actions/SelectionAction/Molecules/MoleculeByNameAction.def
===================================================================
--- src/Actions/SelectionAction/Molecules/MoleculeByNameAction.def	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/SelectionAction/Molecules/MoleculeByNameAction.def	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -24,5 +24,5 @@
 (DummyValidator< std::string >())
 
-#define statetypes (std::vector<molecule *>)
+#define statetypes (std::vector<const molecule *>)
 #define statereferences (selectedMolecules)
 
Index: src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.cpp
===================================================================
--- src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -56,6 +56,10 @@
 ActionState::ptr SelectionNotMoleculeByFormulaAction::performCall() {
   LOG(1, "Unselecting molecules with chemical formula " << params.formula.get() << ":");
-  std::vector<molecule *> matchingMolecules = World::getInstance().getAllMolecules(MoleculeByFormula(params.formula.get()));
-  std::vector<molecule *> unselectedMolecules = World::getInstance().getAllMolecules(!MoleculesBySelection());
+  std::vector<const molecule *> matchingMolecules =
+      const_cast<const World &>(World::getInstance()).
+      getAllMolecules(MoleculeByFormula(params.formula.get()));
+  std::vector<const molecule *> unselectedMolecules =
+      const_cast<const World &>(World::getInstance()).
+      getAllMolecules(!MoleculesBySelection());
   World::getInstance().unselectAllMolecules(MoleculeByFormula(params.formula.get()));
   LOG(0, World::getInstance().countSelectedMolecules() << " molecules remain selected.");
@@ -67,5 +71,5 @@
 
   World::getInstance().selectAllMolecules(MoleculeByFormula(state->params.formula.get()));
-  BOOST_FOREACH( molecule *mol, state->unselectedMolecules)
+  BOOST_FOREACH( const molecule *mol, state->unselectedMolecules)
     World::getInstance().unselectMolecule(mol);
 
Index: src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.def
===================================================================
--- src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.def	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/SelectionAction/Molecules/NotMoleculeByFormulaAction.def	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -22,5 +22,5 @@
 (FormulaValidator())
 
-#define statetypes (std::vector<molecule*>)
+#define statetypes (std::vector<const molecule*>)
 #define statereferences (unselectedMolecules)
 
Index: src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.cpp
===================================================================
--- src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -56,6 +56,7 @@
 ActionState::ptr SelectionNotMoleculeByNameAction::performCall() {
   LOG(1, "Unselecting all molecule called " << params.molname.get());
-  std::vector<molecule *> unselectedMolecules =
-      World::getInstance().getAllMolecules((!MoleculesBySelection()) && MoleculeByName(params.molname.get()));
+  std::vector<const molecule *> unselectedMolecules =
+      const_cast<const World &>(World::getInstance()).
+        getAllMolecules((!MoleculesBySelection()) && MoleculeByName(params.molname.get()));
   World::getInstance().unselectAllMolecules(MoleculeByName(params.molname.get()));
   LOG(0, World::getInstance().countSelectedMolecules() << " molecules remain selected.");
@@ -68,5 +69,5 @@
 
   World::getInstance().selectAllMolecules(MoleculeByName(state->params.molname.get()));
-  BOOST_FOREACH( molecule *mol, state->unselectedMolecules)
+  BOOST_FOREACH( const molecule *mol, state->unselectedMolecules)
     World::getInstance().unselectMolecule(mol);
 
Index: src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.def
===================================================================
--- src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.def	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/SelectionAction/Molecules/NotMoleculeByNameAction.def	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -22,5 +22,5 @@
 (DummyValidator< std::string >())
 
-#define statetypes (std::vector<molecule *>)
+#define statetypes (std::vector<const molecule *>)
 #define statereferences (unselectedMolecules)
 
Index: src/Actions/WorldAction/BoundInBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/BoundInBoxAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/WorldAction/BoundInBoxAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -56,16 +56,19 @@
   // create undo state
   std::vector< boost::shared_ptr<Vector> > OldPositions;
-  std::vector<molecule*> AllMolecules = World::getInstance().getAllMolecules();
-  for (vector<molecule*>::iterator MolRunner = AllMolecules.begin();
-      MolRunner != AllMolecules.end();
-      ++MolRunner) {
-    for(molecule::const_iterator AtomRunner = (*MolRunner)->begin();
-        AtomRunner != (*MolRunner)->end();
-        ++AtomRunner) {
-      OldPositions.push_back(
-          boost::shared_ptr<Vector>(new Vector(
-              (*AtomRunner)->getPosition()
-              ))
-          );
+  {
+    std::vector<const molecule*> AllMolecules = const_cast<const World &>(World::getInstance()).
+        getAllMolecules();
+    for (vector<const molecule*>::iterator MolRunner = AllMolecules.begin();
+        MolRunner != AllMolecules.end();
+        ++MolRunner) {
+      for(molecule::const_iterator AtomRunner = (*MolRunner)->begin();
+          AtomRunner != (*MolRunner)->end();
+          ++AtomRunner) {
+        OldPositions.push_back(
+            boost::shared_ptr<Vector>(new Vector(
+                (*AtomRunner)->getPosition()
+                ))
+            );
+      }
     }
   }
@@ -73,4 +76,5 @@
 
   // center
+  std::vector<molecule*> AllMolecules = World::getInstance().getAllMolecules();
   for (std::vector<molecule*>::iterator MolRunner = AllMolecules.begin(); MolRunner != AllMolecules.end(); ++MolRunner) {
     (*MolRunner)->BoundInBox();
Index: src/Actions/WorldAction/CenterInBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/CenterInBoxAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/WorldAction/CenterInBoxAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -68,16 +68,19 @@
   oa << matrix;
   std::vector< boost::shared_ptr<Vector> > OldPositions;
-  std::vector<molecule*> AllMolecules = World::getInstance().getAllMolecules();
-  for (std::vector<molecule*>::iterator MolRunner = AllMolecules.begin();
-      MolRunner != AllMolecules.end();
-      ++MolRunner) {
-    for(molecule::const_iterator AtomRunner = (*MolRunner)->begin();
-        AtomRunner != (*MolRunner)->end();
-        ++AtomRunner) {
-      OldPositions.push_back(
-          boost::shared_ptr<Vector>(new Vector(
-              (*AtomRunner)->getPosition()
-              ))
-          );
+  {
+    std::vector<const molecule*> AllMolecules = const_cast<const World &>(World::getInstance()).
+        getAllMolecules();
+    for (std::vector<const molecule*>::iterator MolRunner = AllMolecules.begin();
+        MolRunner != AllMolecules.end();
+        ++MolRunner) {
+      for(molecule::const_iterator AtomRunner = (*MolRunner)->begin();
+          AtomRunner != (*MolRunner)->end();
+          ++AtomRunner) {
+        OldPositions.push_back(
+            boost::shared_ptr<Vector>(new Vector(
+                (*AtomRunner)->getPosition()
+                ))
+            );
+      }
     }
   }
@@ -87,4 +90,5 @@
 
   // center atoms
+  std::vector<molecule*> AllMolecules = World::getInstance().getAllMolecules();
   for (std::vector<molecule*>::iterator MolRunner = AllMolecules.begin(); MolRunner != AllMolecules.end(); ++MolRunner) {
     (*MolRunner)->CenterInBox();
Index: src/Actions/WorldAction/RepeatBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/RepeatBoxAction.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/WorldAction/RepeatBoxAction.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -63,5 +63,5 @@
 void repeatMoleculesinDomain(
     std::vector< unsigned int > Repeater,
-    const std::vector<molecule *> &AllMolecules)
+    const std::vector<const molecule *> &AllMolecules)
 {
   LOG(0, "STATUS: Repeating box " << Repeater << " times for (x,y,z) axis.");
@@ -85,5 +85,4 @@
 
   // add molecules in each repeated domain part
-  molecule *newmol = NULL;
   std::vector<Vector> vectors;
   MoleculeListClass *molecules = World::getInstance().getMolecules();
@@ -96,8 +95,8 @@
         if ((n[0] == 0) && (n[1] == 0) && (n[2] == 0))
           continue;
-        for (vector<molecule *>::const_iterator MolRunner = AllMolecules.begin(); MolRunner != AllMolecules.end(); ++MolRunner) {
-          molecule * const mol = *MolRunner;
+        for (vector<const molecule *>::const_iterator MolRunner = AllMolecules.begin(); MolRunner != AllMolecules.end(); ++MolRunner) {
+          const molecule * const mol = *MolRunner;
           LOG(2, "DEBUG: Current mol is " << mol->name << "." << endl);
-          newmol = mol->CopyMolecule();
+          molecule * const newmol = mol->CopyMolecule();
           // TODO: remove this when World does not have MoleculeListClass anymore.
           molecules->insert(newmol);
@@ -114,12 +113,12 @@
 
 ActionState::ptr WorldRepeatBoxAction::performCall() {
-  std::vector<molecule *> AllMolecules;
   DoLog(0) && (Log() << Verbose(0) << "Using all molecules." << endl);
-  AllMolecules = World::getInstance().getAllMolecules();
+  std::vector<const molecule *> AllMolecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules();
 
   // prepare undo state
   RealSpaceMatrix olddomain = World::getInstance().getDomain().getM();
-  std::set<molecule *> oldmolecules;
-  for(std::vector<molecule *>::const_iterator iter = AllMolecules.begin();
+  std::set<const molecule *> oldmolecules;
+  for(std::vector<const molecule *>::const_iterator iter = AllMolecules.begin();
       iter != AllMolecules.end();
       ++iter)
@@ -160,6 +159,6 @@
   WorldRepeatBoxState *state = assert_cast<WorldRepeatBoxState*>(_state.get());
 
-  std::vector<molecule *> originalmolecules;
-  for(std::set<molecule *>::const_iterator iter = state->oldmolecules.begin();
+  std::vector<const molecule *> originalmolecules;
+  for(std::set<const molecule *>::const_iterator iter = state->oldmolecules.begin();
       iter != state->oldmolecules.end();
       ++iter)
Index: src/Actions/WorldAction/RepeatBoxAction.def
===================================================================
--- src/Actions/WorldAction/RepeatBoxAction.def	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Actions/WorldAction/RepeatBoxAction.def	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -28,5 +28,5 @@
 (STLVectorValidator< std::vector< unsigned int > >(NDIM, NDIM))
 
-#define statetypes (RealSpaceMatrix)(std::set< molecule *>)
+#define statetypes (RealSpaceMatrix)(std::set< const molecule *>)
 #define statereferences (olddomain)(oldmolecules)
 
Index: src/Descriptors/unittests/MoleculeDescriptorUnitTest.cpp
===================================================================
--- src/Descriptors/unittests/MoleculeDescriptorUnitTest.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Descriptors/unittests/MoleculeDescriptorUnitTest.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -70,9 +70,13 @@
 
 // some helper functions
-static bool hasAllMolecules(std::vector<molecule*> molecules,moleculeId_t ids[MOLECULE_COUNT], std::set<moleculeId_t> excluded = std::set<moleculeId_t>()){
+static bool hasAllMolecules(
+    std::vector<const molecule*> &molecules,
+    moleculeId_t ids[MOLECULE_COUNT],
+    std::set<moleculeId_t> excluded = std::set<moleculeId_t>())
+{
   for(int i=0;i<MOLECULE_COUNT;++i){
     moleculeId_t id = ids[i];
     if(!excluded.count(id)){
-      std::vector<molecule*>::iterator iter;
+      std::vector<const molecule*>::const_iterator iter;
       bool res=false;
       for(iter=molecules.begin();iter!=molecules.end();++iter){
@@ -88,7 +92,7 @@
 }
 
-static bool hasNoDuplicateMolecules(std::vector<molecule*> molecules){
+static bool hasNoDuplicateMolecules(std::vector<const molecule*> &molecules){
   std::set<moleculeId_t> found;
-  std::vector<molecule*>::iterator iter;
+  std::vector<const molecule*>::const_iterator iter;
   for(iter=molecules.begin();iter!=molecules.end();++iter){
     int id = (*iter)->getId();
@@ -102,9 +106,11 @@
 
 void MoleculeDescriptorTest::MoleculeBaseSetsTest(){
-  std::vector<molecule*> allMolecules = World::getInstance().getAllMolecules(AllMolecules());
+  std::vector<const molecule*> allMolecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules(AllMolecules());
   CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(allMolecules,moleculeIds));
   CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(allMolecules));
 
-  std::vector<molecule*> noMolecules = World::getInstance().getAllMolecules(NoMolecules());
+  std::vector<const molecule*> noMolecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules(NoMolecules());
   CPPUNIT_ASSERT_EQUAL( true , noMolecules.empty());
 }
@@ -142,5 +148,6 @@
   // test some elementary set operations
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(AllMolecules()||NoMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(AllMolecules()||NoMolecules());
     CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
     CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
@@ -148,5 +155,6 @@
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(NoMolecules()||AllMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(NoMolecules()||AllMolecules());
     CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
     CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
@@ -154,20 +162,24 @@
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(NoMolecules()&&AllMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(NoMolecules()&&AllMolecules());
     CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
   }
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(AllMolecules()&&NoMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(AllMolecules()&&NoMolecules());
     CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
   }
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(!AllMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(!AllMolecules());
     CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
   }
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(!NoMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(!NoMolecules());
     CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
     CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
@@ -176,5 +188,6 @@
   // exclude and include some molecules
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(AllMolecules()&&(!MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(AllMolecules()&&(!MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
     std::set<moleculeId_t> excluded;
     excluded.insert(moleculeIds[MOLECULE_COUNT/2]);
@@ -185,5 +198,6 @@
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(NoMolecules()||(MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(NoMolecules()||(MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
     CPPUNIT_ASSERT_EQUAL( (size_t)1, testMolecules.size());
     CPPUNIT_ASSERT_EQUAL( moleculeIds[MOLECULE_COUNT/2], testMolecules[0]->getId());
Index: src/Parameters/Specifics/Value_molecule.cpp
===================================================================
--- src/Parameters/Specifics/Value_molecule.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Parameters/Specifics/Value_molecule.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -37,4 +37,6 @@
 #include "Value_molecule.hpp"
 
+#include "Descriptors/MoleculeNameDescriptor.hpp"
+
 #include "molecule.hpp"
 #include "World.hpp"
@@ -43,12 +45,7 @@
 {
   const molecule * _mol = NULL;
-  const vector<molecule *> molecules = World::getInstance().getAllMolecules();
-  for (vector<molecule *>::const_iterator moliter = molecules.begin();
-      moliter != molecules.end(); ++moliter) {
-    if ((*moliter)->getName() == _name) {
-      _mol = *moliter;
-      break;
-    }
-  }
+  const vector<const molecule *> molecules = const_cast<const World &>(World::getInstance()).
+      getAllMolecules(MoleculeByName(_name));
+  _mol = *molecules.begin();
   return _mol;
 }
Index: src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -55,6 +55,7 @@
   inputBox = new QComboBox();
   // add all molecules to the combo box
-  vector<molecule*> molecules = World::getInstance().getAllMolecules();
-  for(vector<molecule*>::iterator iter  = molecules.begin();
+  vector<const molecule*> molecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules();
+  for(vector<const molecule*>::const_iterator iter  = molecules.begin();
       iter != molecules.end();
       ++iter) {
Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.cpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -273,5 +273,6 @@
   changing = true;
 
-  const std::vector<molecule*> &molecules = World::getInstance().getAllMolecules();
+  const std::vector<const molecule*> &molecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules();
 
   clear();
@@ -288,5 +289,5 @@
   toBeSetVisibilityItems.clear();
 
-  for (std::vector<molecule*>::const_iterator iter = molecules.begin();
+  for (std::vector<const molecule*>::const_iterator iter = molecules.begin();
       iter != molecules.end();
       iter++)
Index: src/UIElements/Views/Qt4/MoleculeList/QtMoleculeListView.cpp
===================================================================
--- src/UIElements/Views/Qt4/MoleculeList/QtMoleculeListView.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/UIElements/Views/Qt4/MoleculeList/QtMoleculeListView.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -106,5 +106,6 @@
       if ((index.column() == 0) && (selectionModel()->isSelected(index))) {
         const moleculeId_t mol_id = moleculelist->IndexToMoleculeId(index);
-        const molecule * const mol = World::getInstance().getMolecule(MoleculeById(mol_id));
+        const molecule * const mol = const_cast<const World &>(World::getInstance()).
+            getMolecule(MoleculeById(mol_id));
         // check for invalid molecule
         if (mol_id < 0)
@@ -129,5 +130,6 @@
       if ((index.column() == 0) && (!selectionModel()->isSelected(index))) {
         const moleculeId_t mol_id = moleculelist->IndexToMoleculeId(index);
-        const molecule * const mol = World::getInstance().getMolecule(MoleculeById(mol_id));
+        const molecule * const mol = const_cast<const World &>(World::getInstance()).
+            getMolecule(MoleculeById(mol_id));
         // check for invalid molecule
         if (mol_id < 0)
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -107,7 +107,8 @@
 void GLWorldScene::init()
 {
-  const std::vector<molecule *> &molecules = World::getInstance().getAllMolecules();
-
-  for (std::vector<molecule*>::const_iterator moliter = molecules.begin();
+  const std::vector<const molecule *> &molecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules();
+
+  for (std::vector<const molecule*>::const_iterator moliter = molecules.begin();
       moliter != molecules.end();
       moliter++) {
@@ -125,7 +126,8 @@
 void GLWorldScene::update()
 {
-  const std::vector<molecule *> &molecules = World::getInstance().getAllMolecules();
-
-  for (std::vector<molecule*>::const_iterator moliter = molecules.begin();
+  const std::vector<const molecule *> &molecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules();
+
+  for (std::vector<const molecule*>::const_iterator moliter = molecules.begin();
       moliter != molecules.end();
       moliter++) {
@@ -243,13 +245,15 @@
   LOG(3, "INFO: GLWorldScene: Received signal selectionChanged.");
 
-  const std::vector<molecule*> &molecules = World::getInstance().getAllMolecules();
+  const std::vector<const molecule*> &molecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules();
 
   if (molecules.size() > 0) {
-    for (std::vector<molecule*>::const_iterator Runner = molecules.begin();
+    for (std::vector<const molecule*>::const_iterator Runner = molecules.begin();
         Runner != molecules.end();
         Runner++) {
 
       // molecule selected but not in scene?
-      const bool isSelected = World::getInstance().isSelected(*Runner);
+      const bool isSelected =
+          const_cast<const World &>(World::getInstance()).isSelected(*Runner);
       if (isSelected){
         MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find((*Runner)->getId());
