Index: src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
===================================================================
--- src/Actions/WorldAction/AddEmptyBoundaryAction.cpp	(revision d223d5e07c484fa4ef7f54e88e97fa78b5c0b504)
+++ src/Actions/WorldAction/AddEmptyBoundaryAction.cpp	(revision 8f4df1ef77448922e1b977a3e138bcc2a4a4dad0)
@@ -60,12 +60,12 @@
   ASSERT(AllAtoms.size() > 0, "There must be atoms present for AddingEmptyBoundary.");
   vector<atom *>::iterator AtomRunner = AllAtoms.begin();
-  Min = (*AtomRunner)->x;
-  Max = (*AtomRunner)->x;
+  Min = (*AtomRunner)->getPosition();
+  Max = (*AtomRunner)->getPosition();
   for (; AtomRunner != AllAtoms.end(); ++AtomRunner) {
     for (int i=0;i<NDIM;i++) {
-      if ((*AtomRunner)->x[i] > Max[i])
-        Max[i] = (*AtomRunner)->x[i];
-      if ((*AtomRunner)->x[i] < Min[i])
-        Min[i] = (*AtomRunner)->x[i];
+      if ((*AtomRunner)->at(i) > Max[i])
+        Max[i] = (*AtomRunner)->at(i);
+      if ((*AtomRunner)->at(i) < Min[i])
+        Min[i] = (*AtomRunner)->at(i);
     }
   }
@@ -84,5 +84,5 @@
   AtomRunner = AllAtoms.begin();
   for (; AtomRunner != AllAtoms.end(); ++AtomRunner)
-    (*AtomRunner)->x -= Min - boundary;
+    *(*AtomRunner) -= Min - boundary;
   return Action::success;
 }
Index: src/Actions/WorldAction/CenterOnEdgeAction.cpp
===================================================================
--- src/Actions/WorldAction/CenterOnEdgeAction.cpp	(revision d223d5e07c484fa4ef7f54e88e97fa78b5c0b504)
+++ src/Actions/WorldAction/CenterOnEdgeAction.cpp	(revision 8f4df1ef77448922e1b977a3e138bcc2a4a4dad0)
@@ -55,12 +55,12 @@
   ASSERT(AllAtoms.size() > 0, "For CenteronEdge atoms must be present.");
   vector<atom *>::iterator AtomRunner = AllAtoms.begin();
-  Min = (*AtomRunner)->x;
-  Max = (*AtomRunner)->x;
+  Min = (*AtomRunner)->getPosition();
+  Max = (*AtomRunner)->getPosition();
   for (; AtomRunner != AllAtoms.end(); ++AtomRunner) {
     for (int i=0;i<NDIM;i++) {
-      if ((*AtomRunner)->x[i] > Max[i])
-        Max[i] = (*AtomRunner)->x[i];
-      if ((*AtomRunner)->x[i] < Min[i])
-        Min[i] = (*AtomRunner)->x[i];
+      if ((*AtomRunner)->at(i) > Max[i])
+        Max[i] = (*AtomRunner)->at(i);
+      if ((*AtomRunner)->at(i) < Min[i])
+        Min[i] = (*AtomRunner)->at(i);
     }
   }
@@ -75,5 +75,5 @@
   // translate all atoms, such that Min is aty (0,0,0)
   for (vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner)
-    (*AtomRunner)->x -= Min;
+    *(*AtomRunner) -= Min;
 
   return Action::success;
Index: src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp
===================================================================
--- src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp	(revision d223d5e07c484fa4ef7f54e88e97fa78b5c0b504)
+++ src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp	(revision 8f4df1ef77448922e1b977a3e138bcc2a4a4dad0)
@@ -62,5 +62,6 @@
   vector<molecule *> molecules = World::getInstance().getAllMolecules();
   for (vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) {
-    if (point.DistanceSquared((*AtomRunner)->x) > radius*radius) { // distance to first above radius ...
+    if ((*AtomRunner)->DistanceSquared(point) > radius*radius) { // distance to first above radius ...
+//      cout << "Removing " << (*AtomRunner)->getType()->symbol << (*AtomRunner)->getId() << " at " << (*AtomRunner)->getPosition() << " as distance is " << sqrt((*AtomRunner)->DistanceSquared(point)) << endl;
       // TODO: This is not necessary anymore when atoms are completely handled by World (create/destroy and load/save)
       for (vector<molecule *>::iterator iter = molecules.begin();iter != molecules.end();++iter)
@@ -68,4 +69,7 @@
       World::getInstance().destroyAtom(*AtomRunner);
     }
+//    else {
+//      cout << "Keeping" << (*AtomRunner)->getType()->symbol << (*AtomRunner)->getId() << " at " << (*AtomRunner)->getPosition() << " as distance is " << sqrt((*AtomRunner)->DistanceSquared(point)) << endl;
+//    }
   }
   return Action::success;
Index: src/Actions/WorldAction/RepeatBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/RepeatBoxAction.cpp	(revision d223d5e07c484fa4ef7f54e88e97fa78b5c0b504)
+++ src/Actions/WorldAction/RepeatBoxAction.cpp	(revision 8f4df1ef77448922e1b977a3e138bcc2a4a4dad0)
@@ -21,4 +21,5 @@
 #include <iostream>
 #include <string>
+#include <vector>
 
 using namespace std;
@@ -90,5 +91,5 @@
 
   molecule *newmol = NULL;
-  Vector ** vectors = NULL;
+  std::vector<Vector> vectors;
   for (n[0] = 0; n[0] < Repeater[0]; n[0]++) {
     y[0] = n[0];
@@ -105,9 +106,9 @@
           if (count != 0) {  // if there is more than none
             Elements = new const element *[count];
-            vectors = new Vector *[count];
+            vectors.resize(count);
             j = 0;
             for(molecule::iterator AtomRunner = mol->begin(); AtomRunner != mol->end(); ++AtomRunner) {
-              Elements[j] = (*AtomRunner)->type;
-              vectors[j] = &(*AtomRunner)->x;
+              Elements[j] = (*AtomRunner)->getType();
+              vectors[j] = (*AtomRunner)->getPosition();
               j++;
             }
@@ -120,6 +121,6 @@
             for (int k=count;k--;) { // go through every atom of the original cell
               Walker = World::getInstance().createAtom(); // create a new body
-              Walker->x = (*vectors[k]) + x;
-              Walker->type = Elements[k];  // insert original element
+              Walker->setPosition((vectors[k]) + x);
+              Walker->setType(Elements[k]);  // insert original element
               cout << "new atom is " << *Walker << endl;
               newmol->AddAtom(Walker);        // and add to the molecule (which increments ElementsInMolecule, AtomCount, ...)
@@ -127,5 +128,4 @@
             // free memory
             delete[](Elements);
-            delete[](vectors);
           } else {
             DoLog(1) && (Log() << Verbose(1) << "\t ... is empty." << endl);
Index: src/Actions/WorldAction/ScaleBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/ScaleBoxAction.cpp	(revision d223d5e07c484fa4ef7f54e88e97fa78b5c0b504)
+++ src/Actions/WorldAction/ScaleBoxAction.cpp	(revision 8f4df1ef77448922e1b977a3e138bcc2a4a4dad0)
@@ -60,5 +60,5 @@
   vector<atom*> AllAtoms = World::getInstance().getAllAtoms();
   for(vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) {
-    (*AtomRunner)->x.ScaleAll(x);
+    (*AtomRunner)->ScaleAll(x);
   }
 
