Index: src/gslvector.cpp
===================================================================
--- src/gslvector.cpp	(revision 5f5a7be8b7a95cd7fe35e9d728b89d6bc36b2f6a)
+++ src/gslvector.cpp	(revision 1dc9ece817dde18f1ddda86a6a9bf1ceed029ec3)
@@ -13,4 +13,5 @@
 #include "gslvector.hpp"
 #include "defs.hpp"
+#include "vector.hpp"
 
 /** Constructor of class GSLVector.
@@ -61,4 +62,13 @@
   gsl_vector_memcpy (vector, &m.vector);
 };
+
+/**
+ * This function sets the GSLvector from an ordinary vector.
+ *
+ * Takes access to the internal gsl_vector and copies it
+ */
+void GSLVector::SetFromVector(Vector &v){
+  gsl_vector_memcpy (vector, v.get());
+}
 
 /** This function returns the i-th element of a vector.
Index: src/gslvector.hpp
===================================================================
--- src/gslvector.hpp	(revision 5f5a7be8b7a95cd7fe35e9d728b89d6bc36b2f6a)
+++ src/gslvector.hpp	(revision 1dc9ece817dde18f1ddda86a6a9bf1ceed029ec3)
@@ -24,4 +24,5 @@
 
 class GSLVector;
+class Vector;
 
 /********************************************** declarations *******************************/
@@ -38,4 +39,5 @@
   // Accessing
   void SetFromDoubleArray(double *x);
+  void SetFromVector(Vector &v);
   double Get(size_t m) const;
   void Set(size_t m, double x);
Index: src/linearsystemofequations.cpp
===================================================================
--- src/linearsystemofequations.cpp	(revision 5f5a7be8b7a95cd7fe35e9d728b89d6bc36b2f6a)
+++ src/linearsystemofequations.cpp	(revision 1dc9ece817dde18f1ddda86a6a9bf1ceed029ec3)
@@ -56,5 +56,5 @@
 {
   assert ( columns == NDIM && "Vector class is always three-dimensional, unlike this LEqS!");
-  b->SetFromDoubleArray(x->get());
+  b->SetFromVector(*x);
 };
 
Index: src/vector.cpp
===================================================================
--- src/vector.cpp	(revision 5f5a7be8b7a95cd7fe35e9d728b89d6bc36b2f6a)
+++ src/vector.cpp	(revision 1dc9ece817dde18f1ddda86a6a9bf1ceed029ec3)
@@ -24,5 +24,5 @@
 Vector::Vector()
 {
-  x[0] = x[1] = x[2] = 0.;
+  content = gsl_vector_calloc (NDIM);
 };
 
@@ -33,7 +33,8 @@
 Vector::Vector(const Vector& src)
 {
-  x[0] = src[0];
-  x[1] = src[1];
-  x[2] = src[2];
+  content = gsl_vector_alloc(NDIM);
+  gsl_vector_set(content,0,src[0]);
+  gsl_vector_set(content,1,src[1]);
+  gsl_vector_set(content,2,src[2]);
 }
 
@@ -42,7 +43,8 @@
 Vector::Vector(const double x1, const double x2, const double x3)
 {
-  x[0] = x1;
-  x[1] = x2;
-  x[2] = x3;
+  content = gsl_vector_alloc(NDIM);
+  gsl_vector_set(content,0,x1);
+  gsl_vector_set(content,1,x2);
+  gsl_vector_set(content,2,x3);
 };
 
@@ -53,7 +55,7 @@
   // check for self assignment
   if(&src!=this){
-    x[0] = src[0];
-    x[1] = src[1];
-    x[2] = src[2];
+    gsl_vector_set(content,0,src[0]);
+    gsl_vector_set(content,1,src[1]);
+    gsl_vector_set(content,2,src[2]);
   }
   return *this;
@@ -62,5 +64,7 @@
 /** Desctructor of class vector.
  */
-Vector::~Vector() {};
+Vector::~Vector() {
+  gsl_vector_free(content);
+};
 
 /** Calculates square of distance between this and another vector.
@@ -72,5 +76,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);
 };
@@ -200,5 +204,5 @@
   double res = 0.;
   for (int i=NDIM;i--;)
-    res += x[i]*y[i];
+    res += at(i)*y[i];
   return (res);
 };
@@ -214,7 +218,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;
 };
@@ -309,5 +312,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);
 };
 
@@ -338,5 +341,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;
   }
@@ -366,10 +369,10 @@
 double& Vector::operator[](size_t i){
   ASSERT(i<=NDIM && i>=0,"Vector Index out of Range");
-  return x[i];
+  return *gsl_vector_ptr (content, i);
 }
 
 const double& Vector::operator[](size_t i) const{
   ASSERT(i<=NDIM && i>=0,"Vector Index out of Range");
-  return x[i];
+  return *gsl_vector_ptr (content, i);
 }
 
@@ -382,6 +385,6 @@
 }
 
-double* Vector::get(){
-  return x;
+gsl_vector* Vector::get(){
+  return content;
 }
 
@@ -498,5 +501,5 @@
 {
   for (int i=NDIM;i--;)
-    x[i] *= factor[i];
+    at(i) *= factor[i];
 };
 
@@ -506,5 +509,5 @@
 {
   for (int i=NDIM;i--;)
-    x[i] *= factor;
+    at(i) *= factor;
 };
 
@@ -518,9 +521,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);
@@ -549,8 +552,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;
 };
 
@@ -577,8 +582,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;
@@ -616,5 +618,5 @@
   SubtractVector(x1);
   for (int i=NDIM;i--;)
-    result = result || (fabs(x[i]) > MYEPSILON);
+    result = result || (fabs(at(i)) > MYEPSILON);
 
   return result;
@@ -678,5 +680,5 @@
 {
   for(int i=NDIM;i--;)
-    x[i] += y[i];
+    at(i) += y[i];
 }
 
@@ -687,5 +689,5 @@
 {
   for(int i=NDIM;i--;)
-    x[i] -= y[i];
+    at(i) -= y[i];
 }
 
Index: src/vector.hpp
===================================================================
--- src/vector.hpp	(revision 5f5a7be8b7a95cd7fe35e9d728b89d6bc36b2f6a)
+++ src/vector.hpp	(revision 1dc9ece817dde18f1ddda86a6a9bf1ceed029ec3)
@@ -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:
 
@@ -82,5 +79,5 @@
 
   // Access to internal structure
-  double* get();
+  gsl_vector* get();
 
   // Methods that are derived directly from other methods
@@ -107,5 +104,5 @@
 
 private:
-  double x[NDIM];
+  gsl_vector *content;
 
 };
