Index: src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
===================================================================
--- src/Actions/WorldAction/AddEmptyBoundaryAction.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/Actions/WorldAction/AddEmptyBoundaryAction.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -41,5 +41,5 @@
   int j=0;
 
-  dialog->queryVector(NAME, &boundary, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription(NAME));
+  dialog->queryVector(NAME, &boundary, false, MapOfActions::getInstance().getDescription(NAME));
 
   if(dialog->display()) {
@@ -59,5 +59,5 @@
     }
     // set new box size
-    double * const cell_size = World::getInstance().getDomain();
+    double * const cell_size = new double[6];
     for (j=0;j<6;j++)
       cell_size[j] = 0.;
@@ -67,4 +67,6 @@
       cell_size[j] = (Max[i]-Min[i]+2.*boundary[i]);
     }
+    World::getInstance().setDomain(cell_size);
+    delete[] cell_size;
     // translate all atoms, such that Min is aty (0,0,0)
     AtomRunner = AllAtoms.begin();
Index: src/Actions/WorldAction/CenterInBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/CenterInBoxAction.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/Actions/WorldAction/CenterInBoxAction.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -34,9 +34,8 @@
   Dialog *dialog = UIFactory::getInstance().makeDialog();
 
-  double * cell_size = World::getInstance().getDomain();
+  Box& cell_size = World::getInstance().getDomain();
   dialog->queryBox(NAME, &cell_size, MapOfActions::getInstance().getDescription(NAME));
 
   if(dialog->display()) {
-    World::getInstance().setDomain(cell_size);
     // center
     vector<molecule *> AllMolecules = World::getInstance().getAllMolecules();
Index: src/Actions/WorldAction/CenterOnEdgeAction.cpp
===================================================================
--- src/Actions/WorldAction/CenterOnEdgeAction.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/Actions/WorldAction/CenterOnEdgeAction.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -13,4 +13,5 @@
 #include "vector.hpp"
 #include "World.hpp"
+#include "Matrix.hpp"
 
 #include <iostream>
@@ -37,5 +38,4 @@
   Vector Min;
   Vector Max;
-  int j=0;
 
   dialog->queryEmpty(NAME, MapOfActions::getInstance().getDescription(NAME));
@@ -57,13 +57,11 @@
     }
     // set new box size
-    double * const cell_size = World::getInstance().getDomain();
-    for (j=0;j<6;j++)
-      cell_size[j] = 0.;
-    j=-1;
+    Matrix domain;
     for (int i=0;i<NDIM;i++) {
-      j += i+1;
-      cell_size[j] = (Max[i]-Min[i]);
+      double tmp = Max[i]-Min[i];
+      tmp = fabs(tmp)>=1. ? tmp : 1.0;
+      domain.at(i,i) = tmp;
     }
-    World::getInstance().setDomain(cell_size);
+    World::getInstance().setDomain(domain);
     // translate all atoms, such that Min is aty (0,0,0)
     for (vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner)
Index: src/Actions/WorldAction/ChangeBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/ChangeBoxAction.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/Actions/WorldAction/ChangeBoxAction.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -12,4 +12,6 @@
 #include "verbose.hpp"
 #include "World.hpp"
+#include "Box.hpp"
+#include "Matrix.hpp"
 
 #include <iostream>
@@ -34,10 +36,9 @@
   Dialog *dialog = UIFactory::getInstance().makeDialog();
 
-  double * cell_size = World::getInstance().getDomain();
+  Box& cell_size = World::getInstance().getDomain();
   dialog->queryBox(NAME, &cell_size, MapOfActions::getInstance().getDescription(NAME));
 
   if(dialog->display()) {
-    DoLog(0) && (Log() << Verbose(0) << "Setting box domain to " << cell_size[0] << "," << cell_size[1] << "," << cell_size[2] << "," << cell_size[3] << "," << cell_size[4] << "," << cell_size[5] << "," << endl);
-    World::getInstance().setDomain(cell_size);
+    DoLog(0) && (Log() << Verbose(0) << "Setting box domain to " << cell_size.getM() << endl);
     delete dialog;
     return Action::success;
Index: src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp
===================================================================
--- src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -41,5 +41,5 @@
 
   dialog->queryDouble(NAME, &radius, MapOfActions::getInstance().getDescription(NAME));
-  dialog->queryVector("position", &point, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription("position"));
+  dialog->queryVector("position", &point, false, MapOfActions::getInstance().getDescription("position"));
 
   if(dialog->display()) {
Index: src/Actions/WorldAction/RepeatBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/RepeatBoxAction.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/Actions/WorldAction/RepeatBoxAction.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -13,6 +13,8 @@
 #include "molecule.hpp"
 #include "vector.hpp"
+#include "Matrix.hpp"
 #include "verbose.hpp"
 #include "World.hpp"
+#include "Box.hpp"
 
 #include <iostream>
@@ -46,5 +48,5 @@
   MoleculeListClass *molecules = World::getInstance().getMolecules();
 
-  dialog->queryVector(NAME, &Repeater, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription(NAME));
+  dialog->queryVector(NAME, &Repeater, false, MapOfActions::getInstance().getDescription(NAME));
   //dialog->queryMolecule("molecule-by-id", &mol,MapOfActions::getInstance().getDescription("molecule-by-id"));
   vector<molecule *> AllMolecules;
@@ -59,8 +61,9 @@
   if(dialog->display()) {
     (cout << "Repeating box " << Repeater << " times for (x,y,z) axis." << endl);
-    double * const cell_size = World::getInstance().getDomain();
-    double *M = ReturnFullMatrixforSymmetric(cell_size);
+    Matrix M = World::getInstance().getDomain().getM();
+    Matrix newM = M;
     Vector x,y;
     int n[NDIM];
+    Matrix repMat;
     for (int axis = 0; axis < NDIM; axis++) {
       Repeater[axis] = floor(Repeater[axis]);
@@ -69,8 +72,9 @@
         Repeater[axis] = 1;
       }
-      cell_size[ ((axis == 1) ? 2 : (axis == 2) ? 5 : 0) ] *= Repeater[axis];
+      repMat.at(axis,axis) = Repeater[axis];
     }
+    newM *= repMat;
+    World::getInstance().setDomain(newM);
 
-    World::getInstance().setDomain(cell_size);
     molecule *newmol = NULL;
     Vector ** vectors = NULL;
@@ -99,5 +103,5 @@
                 DoeLog(1) && (eLog()<< Verbose(1) << "AtomCount " << count << " is not equal to number of atoms in molecule " << j << "!" << endl);
               x = y;
-              x.MatrixMultiplication(M);
+              x *= M;
               newmol = World::getInstance().createMolecule();
               molecules->insert(newmol);
@@ -119,5 +123,4 @@
       }
     }
-    delete(M);
     delete dialog;
     return Action::success;
Index: src/Actions/WorldAction/ScaleBoxAction.cpp
===================================================================
--- src/Actions/WorldAction/ScaleBoxAction.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/Actions/WorldAction/ScaleBoxAction.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -14,4 +14,6 @@
 #include "verbose.hpp"
 #include "World.hpp"
+#include "Box.hpp"
+#include "Matrix.hpp"
 
 #include <iostream>
@@ -37,7 +39,6 @@
   Vector Scaler;
   double x[NDIM];
-  int j=0;
 
-  dialog->queryVector(NAME, &Scaler, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription(NAME));
+  dialog->queryVector(NAME, &Scaler, false, MapOfActions::getInstance().getDescription(NAME));
 
   if(dialog->display()) {
@@ -49,11 +50,13 @@
       (*AtomRunner)->x.ScaleAll(x);
     }
-    j = -1;
-    double * const cell_size = World::getInstance().getDomain();
+
+    Matrix M = World::getInstance().getDomain().getM();
+    Matrix scale;
+
     for (int i=0;i<NDIM;i++) {
-      j += i+1;
-      cell_size[j]*=x[i];
+      scale.at(i,i) = x[i];
     }
-    World::getInstance().setDomain(cell_size);
+    M *= scale;
+    World::getInstance().setDomain(M);
 
     delete dialog;
