Index: src/vector.cpp
===================================================================
--- src/vector.cpp	(revision 27ac00cfe9f7342b99332c01a04df19c1db85e13)
+++ src/vector.cpp	(revision d466f0823884cfb859e6b670d503b847b4f9f716)
@@ -23,5 +23,5 @@
 Vector::Vector()
 {
-  x[0] = x[1] = x[2] = 0.;
+  content[0]=content[1]=content[2]=0;
 };
 
@@ -32,7 +32,7 @@
 Vector::Vector(const Vector& src)
 {
-  x[0] = src[0];
-  x[1] = src[1];
-  x[2] = src[2];
+  content[0]=src[0];
+  content[1]=src[1];
+  content[2]=src[2];
 }
 
@@ -41,7 +41,7 @@
 Vector::Vector(const double x1, const double x2, const double x3)
 {
-  x[0] = x1;
-  x[1] = x2;
-  x[2] = x3;
+  content[0]=x1;
+  content[1]=x2;
+  content[2]=x3;
 };
 
@@ -52,7 +52,7 @@
   // check for self assignment
   if(&src!=this){
-    x[0] = src[0];
-    x[1] = src[1];
-    x[2] = src[2];
+    content[0]=src[0];
+    content[1]=src[1];
+    content[2]=src[2];
   }
   return *this;
@@ -61,5 +61,6 @@
 /** Desctructor of class vector.
  */
-Vector::~Vector() {};
+Vector::~Vector() {
+};
 
 /** Calculates square of distance between this and another vector.
@@ -71,5 +72,5 @@
   double res = 0.;
   for (int i=NDIM;i--;)
-    res += (x[i]-y[i])*(x[i]-y[i]);
+    res += (at(i)-y[i])*(at(i)-y[i]);
   return (res);
 };
@@ -199,5 +200,5 @@
   double res = 0.;
   for (int i=NDIM;i--;)
-    res += x[i]*y[i];
+    res += at(i)*y[i];
   return (res);
 };
@@ -213,7 +214,6 @@
 {
   Vector tmp;
-  tmp[0] = x[1]* y[2] - x[2]* y[1];
-  tmp[1] = x[2]* y[0] - x[0]* y[2];
-  tmp[2] = x[0]* y[1] - x[1]* y[0];
+  for(int i=NDIM;i--;)
+    tmp[i] = at((i+1)%NDIM)*y[(i+2)%NDIM] - at((i+2)%NDIM)*y[(i+1)%NDIM];
   (*this) = tmp;
 };
@@ -308,5 +308,5 @@
 bool Vector::IsZero() const
 {
-  return (fabs(x[0])+fabs(x[1])+fabs(x[2]) < MYEPSILON);
+  return (fabs(at(0))+fabs(at(1))+fabs(at(2)) < MYEPSILON);
 };
 
@@ -337,5 +337,5 @@
   bool status = true;
   for (int i=0;i<NDIM;i++) {
-    if (fabs(x[i] - a[i]) > MYEPSILON)
+    if (fabs(at(i) - a[i]) > MYEPSILON)
       status = false;
   }
@@ -365,10 +365,10 @@
 double& Vector::operator[](size_t i){
   ASSERT(i<=NDIM && i>=0,"Vector Index out of Range");
-  return x[i];
+  return content[i];
 }
 
 const double& Vector::operator[](size_t i) const{
   ASSERT(i<=NDIM && i>=0,"Vector Index out of Range");
-  return x[i];
+  return content[i];
 }
 
@@ -382,5 +382,5 @@
 
 double* Vector::get(){
-  return x;
+  return content;
 }
 
@@ -497,5 +497,5 @@
 {
   for (int i=NDIM;i--;)
-    x[i] *= factor[i];
+    at(i) *= factor[i];
 };
 
@@ -505,5 +505,5 @@
 {
   for (int i=NDIM;i--;)
-    x[i] *= factor;
+    at(i) *= factor;
 };
 
@@ -517,9 +517,9 @@
   // truncate to [0,1] for each axis
   for (int i=0;i<NDIM;i++) {
-    x[i] += 0.5;  // set to center of box
-    while (x[i] >= 1.)
-      x[i] -= 1.;
-    while (x[i] < 0.)
-      x[i] += 1.;
+    at(i) += 0.5;  // set to center of box
+    while (at(i) >= 1.)
+      at(i) -= 1.;
+    while (at(i) < 0.)
+      at(i) += 1.;
   }
   MatrixMultiplication(M);
@@ -548,8 +548,10 @@
 void Vector::MatrixMultiplication(const double * const M)
 {
+  Vector tmp;
   // do the matrix multiplication
-  at(0) = M[0]*x[0]+M[3]*x[1]+M[6]*x[2];
-  at(1) = M[1]*x[0]+M[4]*x[1]+M[7]*x[2];
-  at(2) = M[2]*x[0]+M[5]*x[1]+M[8]*x[2];
+  for(int i=NDIM;i--;)
+    tmp[i] = M[i]*at(0)+M[i+3]*at(1)+M[i+6]*at(2);
+
+  (*this) = tmp;
 };
 
@@ -576,8 +578,5 @@
     B[8] =  detAReci*RDET2(A[0],A[1],A[3],A[4]);    // A_33
 
-    // do the matrix multiplication
-    at(0) = B[0]*x[0]+B[3]*x[1]+B[6]*x[2];
-    at(1) = B[1]*x[0]+B[4]*x[1]+B[7]*x[2];
-    at(2) = B[2]*x[0]+B[5]*x[1]+B[8]*x[2];
+    MatrixMultiplication(B);
 
     return true;
@@ -615,5 +614,5 @@
   SubtractVector(x1);
   for (int i=NDIM;i--;)
-    result = result || (fabs(x[i]) > MYEPSILON);
+    result = result || (fabs(at(i)) > MYEPSILON);
 
   return result;
@@ -677,5 +676,5 @@
 {
   for(int i=NDIM;i--;)
-    x[i] += y[i];
+    at(i) += y[i];
 }
 
@@ -686,5 +685,5 @@
 {
   for(int i=NDIM;i--;)
-    x[i] -= y[i];
+    at(i) -= y[i];
 }
 
Index: src/vector.hpp
===================================================================
--- src/vector.hpp	(revision 27ac00cfe9f7342b99332c01a04df19c1db85e13)
+++ src/vector.hpp	(revision d466f0823884cfb859e6b670d503b847b4f9f716)
@@ -31,7 +31,4 @@
  */
 class Vector : public Space{
-protected:
-  // this struct is used to indicate calls to the Baseconstructor from inside vectors.
-  struct Baseconstructor{};
 public:
 
@@ -107,5 +104,5 @@
 
 private:
-  double x[NDIM];
+  double content[NDIM];
 
 };
