Index: src/Actions/WorldAction/BoundInBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/BoundInBoxAction.cpp	(revision a7aebd81a7ffd4f46af11dbf5e777b8833c831cf)
+++ 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 a7aebd81a7ffd4f46af11dbf5e777b8833c831cf)
+++ 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 a7aebd81a7ffd4f46af11dbf5e777b8833c831cf)
+++ 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 a7aebd81a7ffd4f46af11dbf5e777b8833c831cf)
+++ 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)
 
