Index: src/LinearAlgebra/Makefile.am
===================================================================
--- src/LinearAlgebra/Makefile.am	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/Makefile.am	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -23,4 +23,5 @@
   vector_ops.cpp \
   Vector.cpp \
+  VectorContent.cpp \
   VectorInterface.cpp
 			   
Index: src/LinearAlgebra/MatrixContent.cpp
===================================================================
--- src/LinearAlgebra/MatrixContent.cpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/MatrixContent.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -475,6 +475,6 @@
 Vector operator*(const MatrixContent &mat,const Vector &vec)
 {
-  Vector res;
-  gsl_blas_dgemv( CblasNoTrans, 1.0, mat.content, vec.content->content, 0.0, res.content->content);
-  return res;
-}
+  Vector result;
+  gsl_blas_dgemv( CblasNoTrans, 1.0, mat.content, vec.content->content, 0.0, result.content->content);
+  return result;
+}
Index: src/LinearAlgebra/MatrixContent.hpp
===================================================================
--- src/LinearAlgebra/MatrixContent.hpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/MatrixContent.hpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -57,5 +57,10 @@
   const double at(size_t i, size_t j) const;
   void set(size_t i, size_t j, const double value);
+
+  // Initializing
   void setFromDoubleArray(double * x);
+  void setIdentity();
+  void setValue(double _value);
+  void setZero();
 
   // Exchanging elements
@@ -76,9 +81,4 @@
   bool IsPositiveDefinite() const;
   double Determinant() const;
-
-  // Initializing
-  void setIdentity();
-  void setZero();
-  void setValue(double _value);
 
   // Operators
Index: src/LinearAlgebra/RealSpaceMatrix.cpp
===================================================================
--- src/LinearAlgebra/RealSpaceMatrix.cpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/RealSpaceMatrix.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -87,4 +87,5 @@
     VectorContent *rowContent = new VectorViewContent(gsl_matrix_row(content->content,i));
     rows_ptr[i] = new Vector(rowContent);
+    ASSERT(rowContent == NULL, "RealSpaceMatrix::createViews() - rowContent was not taken over as supposed to happen!");
   }
   // create column views
@@ -92,8 +93,10 @@
     VectorContent *columnContent = new VectorViewContent(gsl_matrix_column(content->content,i));
     columns_ptr[i] = new Vector(columnContent);
+    ASSERT(columnContent == NULL, "RealSpaceMatrix::createViews() - columnContent was not taken over as supposed to happen!");
   }
   // create diagonal view
   VectorContent *diagonalContent = new VectorViewContent(gsl_matrix_diagonal(content->content));
   diagonal_ptr = new Vector(diagonalContent);
+  ASSERT(diagonalContent == NULL, "RealSpaceMatrix::createViews() - diagonalContent was not taken over as supposed to happen!");
 }
 
Index: src/LinearAlgebra/Vector.cpp
===================================================================
--- src/LinearAlgebra/Vector.cpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/Vector.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -41,48 +41,63 @@
 Vector::Vector()
 {
-  content = new VectorContent();
-};
-
-/**
- * Copy constructor
- */
-
+  content = new VectorContent((size_t) NDIM);
+};
+
+/** Copy constructor.
+ * \param &src source Vector reference
+ */
 Vector::Vector(const Vector& src)
 {
-  content = new VectorContent();
-  gsl_vector_memcpy(content->content, src.content->content);
+  content = new VectorContent(*(src.content));
 }
 
 /** Constructor of class vector.
+ * \param x1 first component
+ * \param x2 second component
+ * \param x3 third component
  */
 Vector::Vector(const double x1, const double x2, const double x3)
 {
-  content = new VectorContent();
-  gsl_vector_set(content->content,0,x1);
-  gsl_vector_set(content->content,1,x2);
-  gsl_vector_set(content->content,2,x3);
+  content = new VectorContent((size_t) NDIM);
+  content->at(0) = x1;
+  content->at(1) = x2;
+  content->at(2) = x3;
 };
 
 /** Constructor of class vector.
+ * \param x[3] three values to initialize Vector with
  */
 Vector::Vector(const double x[3])
 {
-  content = new VectorContent();
-  gsl_vector_set(content->content,0,x[0]);
-  gsl_vector_set(content->content,1,x[1]);
-  gsl_vector_set(content->content,2,x[2]);
-};
-
-Vector::Vector(VectorContent *_content) :
-  content(_content)
-{}
-
-/**
- * Assignment operator
+  content = new VectorContent((size_t) NDIM);
+  for (size_t i = NDIM; i--; )
+    content->at(i) = x[i];
+};
+
+/** Copy constructor of class vector from VectorContent.
+ * \note This is destructive, i.e. we take over _content.
+ */
+Vector::Vector(VectorContent *&_content) :
+    content(_content)
+{
+  _content = NULL;
+}
+
+/** Copy constructor of class vector from VectorContent.
+ * \note This is non-destructive, i.e. _content is copied.
+ */
+Vector::Vector(VectorContent &_content)
+{
+  content = new VectorContent(_content);
+}
+
+/** Assignment operator.
+ * \param &src source vector to assign \a *this to
+ * \return reference to \a *this
  */
 Vector& Vector::operator=(const Vector& src){
   // check for self assignment
   if(&src!=this){
-    gsl_vector_memcpy(content->content, src.content->content);
+    *content = *(src.content);
   }
   return *this;
@@ -90,4 +105,5 @@
 
 /** Desctructor of class vector.
+ * Vector::content is deleted.
  */
 Vector::~Vector() {
Index: src/LinearAlgebra/Vector.hpp
===================================================================
--- src/LinearAlgebra/Vector.hpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/Vector.hpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -33,5 +33,5 @@
 class Vector : public Space{
   friend Vector operator*(const MatrixContent&,const Vector&);
-  friend class RealSpaceMatrix;
+  friend class RealSpaceMatrix; // needs access to Vector(VectorContent*&) due to views
 public:
   Vector();
@@ -104,5 +104,6 @@
 
 private:
-  Vector(VectorContent *);
+  explicit Vector(VectorContent *&);
+  explicit Vector(VectorContent &_content);
   VectorContent *content;
 
Index: src/LinearAlgebra/VectorContent.cpp
===================================================================
--- src/LinearAlgebra/VectorContent.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
+++ src/LinearAlgebra/VectorContent.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -0,0 +1,369 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * VectorContent.cpp
+ *
+ *  Created on: Nov 15, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "Helpers/MemDebug.hpp"
+
+#include <gsl/gsl_vector.h>
+#include <cmath>
+#include <iostream>
+
+#include "Helpers/Assert.hpp"
+#include "LinearAlgebra/Vector.hpp"
+#include "LinearAlgebra/VectorContent.hpp"
+
+/** Constructor of class VectorContent.
+ * Allocates GSL structures
+ * \param _dim number of components
+ */
+VectorContent::VectorContent(size_t _dim) :
+    dimension(_dim)
+{
+  content = gsl_vector_calloc(dimension);
+}
+
+/** Constructor of class VectorContent.
+ * We need this BaseCase for the VectorContentView class.
+ * There no content should be allocated, as it is just a view with an internal
+ * gsl_vector_view. Hence, BaseCase is just dummy class to give the constructor
+ * a unique signature.
+ * \param BaseCase
+ */
+VectorContent::VectorContent(BaseCase)
+{}
+
+/** Copy constructor of class VectorContent.
+ * Allocates GSL structures and copies components from \a *src.
+ * \param *src source vector
+ */
+VectorContent::VectorContent(const VectorContent * const src) :
+    dimension(src->dimension)
+{
+  content = gsl_vector_alloc(dimension);
+  gsl_vector_memcpy (content, src->content);
+};
+
+/** Copy constructor of class VectorContent.
+ * Allocates GSL structures and copies components from \a *src.
+ * \param *src source vector
+ */
+VectorContent::VectorContent(const VectorContent & src) :
+    dimension(src.dimension)
+{
+  content = gsl_vector_alloc(dimension);
+  gsl_vector_memcpy (content, src.content);
+};
+
+/** Destructor of class VectorContent.
+ * Frees GSL structures
+ */
+VectorContent::~VectorContent()
+{
+  if(content != NULL){
+    gsl_vector_free(content);
+    content = NULL;
+  }
+}
+
+/* ============================ Accessing =============================== */
+/** Accessor for manipulating component (i).
+ * \param i component number
+ * \return reference to component (i)
+ */
+double &VectorContent::at(size_t i)
+{
+  ASSERT((i>=0) && (i<dimension),
+      "VectorContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
+  return *gsl_vector_ptr (content, i);
+}
+
+/** Constant accessor for (value of) component (i).
+ * \param i component number
+ * \return const component (i)
+ */
+const double VectorContent::at(size_t i) const
+{
+  ASSERT((i>=0) && (i<dimension),
+      "VectorContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
+  return gsl_vector_get(content, i);
+}
+
+/** These functions return a pointer to the \a m-th element of a vector.
+ *  If \a m lies outside the allowed range of 0 to VectorContent::dimension-1 then the error handler is invoked and a null pointer is returned.
+ * \param m m-th element
+ * \return pointer to \a m-th element
+ */
+double *VectorContent::Pointer(size_t m) const
+{
+  return gsl_vector_ptr (content, m);
+};
+
+/** These functions return a constant pointer to the \a m-th element of a vector.
+ *  If \a m lies outside the allowed range of 0 to VectorContent::dimension-1 then the error handler is invoked and a null pointer is returned.
+ * \param m m-th element
+ * \return const pointer to \a m-th element
+ */
+const double *VectorContent::const_Pointer(size_t m) const
+{
+  return gsl_vector_const_ptr (content, m);
+};
+
+/** Assignment operator.
+ * \param &src source vector to assign \a *this to
+ * \return reference to \a *this
+ */
+VectorContent& VectorContent::operator=(const VectorContent& src)
+{
+  ASSERT(dimension == src.dimension, "Dimensions have to be the same to assign VectorContent onto another!");
+  // check for self assignment
+  if(&src!=this){
+    gsl_vector_memcpy(content, src.content);
+  }
+  return *this;
+}
+
+/* ========================== Initializing =============================== */
+/** This function sets all the elements of the vector to the value \a x.
+ * \param x value to set to
+ */
+void VectorContent::setValue(double x)
+{
+  gsl_vector_set_all (content, x);
+};
+
+/** This function sets the vector from a double array.
+ * Creates a vector view of the array and performs a memcopy.
+ * \param *x array of values (no dimension check is performed)
+ */
+void VectorContent::setFromDoubleArray(double * x)
+{
+  gsl_vector_view m = gsl_vector_view_array (x, dimension);
+  gsl_vector_memcpy (content, &m.vector);
+};
+
+/**
+ * This function sets the GSLvector from an ordinary vector.
+ *
+ * Takes access to the internal gsl_vector and copies it
+ */
+void VectorContent::setFromVector(Vector &v)
+{
+  gsl_vector_memcpy (content, v.get()->content);
+}
+
+/** This function sets all the elements of the vector to zero.
+ */
+void VectorContent::setZero()
+{
+  gsl_vector_set_zero (content);
+};
+
+/** This function makes a basis vector by setting all the elements of the vector to zero except for the i-th element which is set to one.
+ * \param i i-th component to set to unity (all other to zero)
+ * \return vector set
+ */
+int VectorContent::setBasis(size_t i)
+{
+  return gsl_vector_set_basis (content, i);
+};
+
+/* ====================== Exchanging elements ============================ */
+/** This function exchanges the \a i-th and \a j-th elements of the vector in-place.
+ * \param i i-th element to swap with ...
+ * \param j ... j-th element to swap against
+ */
+int VectorContent::SwapElements(size_t i, size_t j)
+{
+  return gsl_vector_swap_elements (content, i, j);
+};
+
+/** This function reverses the order of the elements of the vector.
+ */
+int VectorContent::Reverse()
+{
+  return gsl_vector_reverse (content);
+};
+
+
+/* ========================== Operators =============================== */
+/** Accessor for manipulating component (i).
+ * \param i component number
+ * \return reference to component (i)
+ */
+double &VectorContent::operator[](size_t i)
+{
+  ASSERT((i>=0) && (i<dimension),
+      "VectorContent::operator[]() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
+  return *gsl_vector_ptr (content, i);
+}
+
+/** Constant accessor for (value of) component (i).
+ * \param i component number
+ * \return const component (i)
+ */
+const double VectorContent::operator[](size_t i) const
+{
+  ASSERT((i>=0) && (i<dimension),
+      "VectorContent::operator[]() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
+  return gsl_vector_get(content, i);
+}
+
+
+/** Compares VectorContent \a to VectorContent \a b component-wise.
+ * \param a base VectorContent
+ * \param b VectorContent components to add
+ * \return a == b
+ */
+bool VectorContent::operator==(const VectorContent& b) const
+{
+  bool status = true;
+  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
+  for (size_t i=0;i<dimension;i++)
+    status = status && (fabs(at(i) - b.at(i)) < MYEPSILON);
+  return status;
+};
+
+/** Sums VectorContent \a to this lhs component-wise.
+ * \param a base VectorContent
+ * \param b VectorContent components to add
+ * \return lhs + a
+ */
+const VectorContent& VectorContent::operator+=(const VectorContent& b)
+{
+  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
+  for (size_t i=0;i<dimension;i++)
+    at(i) = at(i)+b.at(i);
+  return *this;
+};
+
+/** Subtracts VectorContent \a from this lhs component-wise.
+ * \param a base VectorContent
+ * \param b VectorContent components to add
+ * \return lhs - a
+ */
+const VectorContent& VectorContent::operator-=(const VectorContent& b)
+{
+  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
+  for (size_t i=0;i<dimension;i++)
+    at(i) = at(i)-b.at(i);
+  return *this;
+};
+
+/** factor each component of \a a times a double \a m.
+ * \param a base VectorContent
+ * \param m factor
+ * \return lhs.Get(i) * m
+ */
+const VectorContent& VectorContent::operator*=(const double m)
+{
+  for (size_t i=0;i<dimension;i++)
+    at(i) = at(i)*m;
+  return *this;
+};
+
+/** Sums two VectorContents \a  and \b component-wise.
+ * \param a first VectorContent
+ * \param b second VectorContent
+ * \return a + b
+ */
+VectorContent const operator+(const VectorContent& a, const VectorContent& b)
+{
+  ASSERT(a.dimension == b.dimension, "VectorContent::operator+() - dimensions have to match: "+toString(a.dimension)+" != "+toString(b.dimension)+"!");
+  VectorContent x(a);
+  for (size_t i=0;i<a.dimension;i++)
+    x.at(i) = a.at(i)+b.at(i);
+  return x;
+};
+
+/** Subtracts VectorContent \a from \b component-wise.
+ * \param a first VectorContent
+ * \param b second VectorContent
+ * \return a - b
+ */
+VectorContent const operator-(const VectorContent& a, const VectorContent& b)
+{
+  ASSERT(a.dimension == b.dimension, "VectorContent::operator-() - dimensions have to match: "+toString(a.dimension)+" != "+toString(b.dimension)+"!");
+  VectorContent x(a);
+  for (size_t i=0;i<a.dimension;i++)
+    x.at(i) = a.at(i)-b.at(i);
+  return x;
+};
+
+/** Factors given VectorContent \a a times \a m.
+ * \param a VectorContent
+ * \param m factor
+ * \return m * a
+ */
+VectorContent const operator*(const VectorContent& a, const double m)
+{
+  VectorContent x(a);
+  for (size_t i=0;i<a.dimension;i++)
+    x.at(i) = a.at(i)*m;
+  return x;
+};
+
+/** Factors given VectorContent \a a times \a m.
+ * \param m factor
+ * \param a VectorContent
+ * \return m * a
+ */
+VectorContent const operator*(const double m, const VectorContent& a )
+{
+  VectorContent x(a);
+  for (size_t i=0;i<a.dimension;i++)
+    x.at(i) = a.at(i)*m;
+  return x;
+};
+
+ostream& operator<<(ostream& ost, const VectorContent& m)
+{
+  ost << "(";
+  for (size_t i=0;i<m.dimension;i++) {
+    ost << m.at(i);
+    if (i != 2)
+      ost << ",";
+  }
+  ost << ")";
+  return ost;
+};
+
+/* ====================== Checking State ============================ */
+/** Checks whether vector has all components zero.
+ * TODO: This might see some numerical instabilities for huge dimension and small number.
+ * For stability one should sort the order of summing!
+ * @return true - vector is zero, false - vector is not
+ */
+bool VectorContent::IsZero() const
+{
+  double result = 0.;
+  for (size_t i = dimension; i--; )
+    result += fabs(at(i));
+  return (result < MYEPSILON);
+};
+
+/** Checks whether vector has length of 1.
+ * @return true - vector is normalized, false - vector is not
+ */
+bool VectorContent::IsOne() const
+{
+  double NormValue = 0.;
+  for (size_t i=dimension;--i;)
+    NormValue += at(i)*at(i);
+  return (fabs(NormValue - 1.) < MYEPSILON);
+};
+
Index: src/LinearAlgebra/VectorContent.hpp
===================================================================
--- src/LinearAlgebra/VectorContent.hpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/VectorContent.hpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -18,32 +18,100 @@
  */
 
+#include <iosfwd>
+
 #include <gsl/gsl_vector.h>
 
+class Vector;
+
+/** Dummy structure to create a unique signature.
+ *
+ */
 struct BaseCase{};
 
-struct VectorContent{
-  VectorContent(){
-    content =  gsl_vector_calloc (NDIM);
-  }
-  VectorContent(BaseCase){
+class VectorContent{
+  friend std::ostream & operator<< (std::ostream& ost, const VectorContent &m);
+  friend VectorContent const operator*(const VectorContent& a, const double m);
+  friend VectorContent const operator*(const double m, const VectorContent& a);
+  friend VectorContent const operator+(const VectorContent& a, const VectorContent& b);
+  friend VectorContent const operator-(const VectorContent& a, const VectorContent& b);
 
-  }
-  virtual ~VectorContent(){
-    if(content){
-      gsl_vector_free(content);
-      content = 0;
-    }
-  }
+public:
+  explicit VectorContent(size_t _dim);
+  VectorContent(BaseCase);
+  VectorContent(const VectorContent * const src);
+  VectorContent(const VectorContent & src);
+  virtual ~VectorContent();
+
+  // Accessing
+  double &at(size_t m);
+  const double at(size_t m) const;
+  double & operator[](size_t i);
+  const double operator[](size_t i) const;
+  double *Pointer(size_t m) const;
+  const double *const_Pointer(size_t m) const;
+
+  // Assignment operator
+  VectorContent &operator=(const VectorContent& src);
+
+  // Initializing
+  void setFromDoubleArray(double * x);
+  void setFromVector(Vector &v);
+  void setValue(double x);
+  void setZero();
+  int setBasis(size_t m);
+
+  // Exchanging elements
+  int SwapElements(size_t i, size_t j);
+  int Reverse();
+
+  // checking state
+  bool IsZero() const;
+  bool IsOne() const;
+
+  // properties
+  bool IsNormalTo(const Vector &normal) const;
+  bool IsEqualTo(const Vector &a) const;
+
+  // properties relative to another VectorContent
+  double DistanceSquared(const VectorContent &y) const;
+  double ScalarProduct(const VectorContent &y) const;
+  double Angle(const VectorContent &y) const;
+
+  // operators
+  bool operator==(const VectorContent& b) const;
+  const VectorContent& operator+=(const VectorContent& b);
+  const VectorContent& operator-=(const VectorContent& b);
+  const VectorContent& operator*=(const double m);
+
+  size_t dimension;
   gsl_vector *content;
+private:
 };
 
-struct VectorViewContent : public VectorContent{
+std::ostream & operator << (std::ostream& ost, const VectorContent &m);
+VectorContent const operator*(const VectorContent& a, const double m);
+VectorContent const operator*(const double m, const VectorContent& a);
+VectorContent const operator+(const VectorContent& a, const VectorContent& b);
+VectorContent const operator-(const VectorContent& a, const VectorContent& b);
+
+/** Vector view.
+ * Extension of VectorContent to contain not a gsl_vector but only a view on a
+ * gsl_vector (or row/column in a gsl_matrix).
+ *
+ * We need the above BaseCase here:
+ * content, i.e. the gsl_vector, must not be allocated, as it is just a view
+ * with an internal gsl_vector_view. Hence, BaseCase is just dummy class to
+ * give the constructor a unique signature.
+ */
+struct VectorViewContent : public VectorContent
+{
   VectorViewContent(gsl_vector_view _view) :
     VectorContent(BaseCase()),
     view(_view)
   {
+    dimension = _view.vector.size;
     content=&view.vector;
   }
-  virtual ~VectorViewContent(){
+  ~VectorViewContent(){
     content=0;
   }
Index: src/LinearAlgebra/linearsystemofequations.cpp
===================================================================
--- src/LinearAlgebra/linearsystemofequations.cpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/linearsystemofequations.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -22,10 +22,10 @@
 #include "defs.hpp"
 #include "LinearAlgebra/MatrixContent.hpp"
-#include "LinearAlgebra/gslvector.hpp"
+#include "LinearAlgebra/VectorContent.hpp"
 #include "LinearAlgebra/linearsystemofequations.hpp"
+#include "Helpers/Assert.hpp"
 #include "Helpers/logger.hpp"
 #include "LinearAlgebra/Vector.hpp"
 
-#include <cassert>
 #include <gsl/gsl_permutation.h>
 
@@ -38,6 +38,6 @@
 {
   A = new MatrixContent(m, n);
-  b = new GSLVector(m);
-  x = new GSLVector(n);
+  b = new VectorContent(m);
+  x = new VectorContent(n);
 };
 
@@ -58,5 +58,5 @@
 bool LinearSystemOfEquations::SetSymmetric(bool symmetric)
 {
-  assert (rows == columns && "Rows and columns don't have equal size! Setting symmetric not possible.");
+  ASSERT (rows == columns, "Rows and columns don't have equal size! Setting symmetric not possible.");
   return (IsSymmetric = symmetric);
 };
@@ -67,6 +67,6 @@
 void LinearSystemOfEquations::Setb(Vector *x)
 {
-  assert ( columns == NDIM && "Vector class is always three-dimensional, unlike this LEqS!");
-  b->SetFromVector(*x);
+  ASSERT  ( columns == NDIM, "Vector class is always three-dimensional, unlike this LEqS!");
+  b->setFromVector(*x);
 };
 
@@ -76,5 +76,5 @@
 void LinearSystemOfEquations::Setb(double *x)
 {
-  b->SetFromDoubleArray(x);
+  b->setFromDoubleArray(x);
 };
 
@@ -98,5 +98,5 @@
   // copy solution
   for (size_t i=0;i<x->dimension;i++) {
-    array[i] = x->Get(i);
+    array[i] = x->at(i);
   }
   return status;
@@ -109,10 +109,10 @@
 bool LinearSystemOfEquations::GetSolutionAsVector(Vector &v)
 {
-  assert(rows == NDIM && "Solution can only be returned as vector if number of columns is NDIM.");
+  ASSERT (rows == NDIM, "Solution can only be returned as vector if number of columns is NDIM.");
   bool status = Solve();
 
   // copy solution
   for (size_t i=0;i<x->dimension;i++)
-    v[i] = x->Get(i);
+    v[i] = x->at(i);
   return status;
 };
@@ -130,10 +130,10 @@
     gsl_permutation * p = gsl_permutation_alloc (x->dimension);
     gsl_linalg_LU_decomp (A->content, p, &s);
-    gsl_linalg_LU_solve (A->content, p, b->vector, x->vector);
+    gsl_linalg_LU_solve (A->content, p, b->content, x->content);
     gsl_permutation_free (p);
   } else {  // use Householder
     //MatrixContent *backup = new MatrixContent(rows,columns);
     //*backup = *A;
-    gsl_linalg_HH_solve (A->content, b->vector, x->vector);
+    gsl_linalg_HH_solve (A->content, b->content, x->content);
     //*A = *backup;
     //delete(backup);
Index: src/LinearAlgebra/linearsystemofequations.hpp
===================================================================
--- src/LinearAlgebra/linearsystemofequations.hpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/LinearAlgebra/linearsystemofequations.hpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -22,5 +22,5 @@
 class Vector;
 class MatrixContent;
-class GSLVector;
+class VectorContent;
 
 /********************************************** declarations *******************************/
@@ -44,6 +44,6 @@
   bool GetSolutionAsVector(Vector &v);
 
-  GSLVector *b;
-  GSLVector *x;
+  VectorContent *b;
+  VectorContent *x;
   MatrixContent *A;
 
Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/unittests/Makefile.am	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -22,5 +22,4 @@
   CountBondsUnitTest \
   FormulaUnittest \
-  GSLVectorUnitTest \
   InfoUnitTest \
   LinearSystemOfEquationsUnitTest \
@@ -46,4 +45,5 @@
   Tesselation_BoundaryTriangleUnitTest \
   Tesselation_InOutsideUnitTest \
+  VectorContentUnitTest \
   VectorUnitTest
   
@@ -82,5 +82,4 @@
   CountBondsUnitTest.cpp \
   FormulaUnittest.cpp \
-  gslvectorunittest.cpp \
   infounittest.cpp \
   linearsystemofequationsunittest.cpp \
@@ -106,4 +105,5 @@
   tesselation_boundarytriangleunittest.cpp \
   tesselation_insideoutsideunittest.cpp \
+  VectorContentUnittest.cpp \
   vectorunittest.cpp
 
@@ -122,5 +122,4 @@
   CountBondsUnitTest.hpp \
   FormulaUnittest.hpp \
-  gslvectorunittest.hpp \
   infounittest.hpp \
   linearsystemofequationsunittest.hpp \
@@ -145,4 +144,5 @@
   tesselation_boundarytriangleunittest.hpp \
   tesselation_insideoutsideunittest.hpp \
+  VectorContentUnittest.hpp \
   vectorunittest.hpp
   
@@ -193,7 +193,4 @@
 MatrixContentUnitTest_LDADD = ${ALLLIBS}
 
-GSLVectorUnitTest_SOURCES = UnitTestMain.cpp gslvectorunittest.cpp gslvectorunittest.hpp
-GSLVectorUnitTest_LDADD = ${ALLLIBS}
-
 InfoUnitTest_SOURCES = UnitTestMain.cpp infounittest.cpp infounittest.hpp
 InfoUnitTest_LDADD = ${ALLLIBS}
@@ -262,4 +259,7 @@
 TestRunner_LDADD = ${UILIBS} ${ALLLIBS}
 
+VectorContentUnitTest_SOURCES = UnitTestMain.cpp VectorContentUnittest.cpp VectorContentUnittest.hpp
+VectorContentUnitTest_LDADD = ${ALLLIBS}
+
 VectorUnitTest_SOURCES = UnitTestMain.cpp vectorunittest.cpp vectorunittest.hpp 
 VectorUnitTest_LDADD = ${ALLLIBS}
Index: src/unittests/MatrixContentSymmetricUnittest.cpp
===================================================================
--- src/unittests/MatrixContentSymmetricUnittest.cpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/unittests/MatrixContentSymmetricUnittest.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -230,4 +230,5 @@
   res.transpose();
   CPPUNIT_ASSERT( *m == res );
+  delete n;
 };
 
Index: src/unittests/MatrixContentUnittest.cpp
===================================================================
--- src/unittests/MatrixContentUnittest.cpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ src/unittests/MatrixContentUnittest.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -234,4 +234,5 @@
   MatrixContent res2 = ((const MatrixContent)res).transpose();
   CPPUNIT_ASSERT( *m == res2 );
+  delete n;
 };
 
Index: src/unittests/VectorContentUnittest.cpp
===================================================================
--- src/unittests/VectorContentUnittest.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
+++ src/unittests/VectorContentUnittest.cpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -0,0 +1,176 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * VectorContentUnittest.cpp
+ *
+ *  Created on: Jan 8, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+using namespace std;
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "VectorContentUnittest.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( VectorContentTest );
+
+
+void VectorContentTest::setUp()
+{
+  v = new VectorContent(3);
+};
+
+void VectorContentTest::tearDown()
+{
+  delete(v);
+};
+
+/** Unit test for accessing elements in the vector.
+ *
+ */
+void VectorContentTest::AccessTest()
+{
+  // set
+  for (int i=0;i<3;i++)
+    v->at(i) = (double)i;
+
+  // and check
+  double *ptr = NULL;
+  for (int i=0;i<3;i++) {
+    CPPUNIT_ASSERT_EQUAL( (double)i, v->at(i) );
+    ptr = v->Pointer(i);
+    CPPUNIT_ASSERT_EQUAL( (double)i, *ptr );
+  }
+
+  // out of bounds
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(3) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1) );
+};
+
+
+/** Unit test for initializing the vector.
+ *
+ */
+void VectorContentTest::InitializaionTest()
+{
+  // set zero
+  v->setZero();
+  for (int i=0;i<3;i++)
+    CPPUNIT_ASSERT_EQUAL( 0., v->at(i) );
+
+  // set basis
+  for (int i=0;i<3;i++) {
+    v->setBasis(i);
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , v->at(j) );
+  }
+
+  // set all
+  v->setValue(1.5);
+  for (int i=0;i<3;i++)
+    CPPUNIT_ASSERT_EQUAL( 1.5, v->at(i) );
+};
+
+/** Unit test for copying vectors.
+ *
+ */
+void VectorContentTest::CopyTest()
+{
+  // set basis
+  VectorContent *dest = NULL;
+  for (int i=0;i<3;i++) {
+    v->setBasis(i);
+    dest = new VectorContent(v);
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( v->at(j) , dest->at(j) );
+
+    delete(dest);
+  }
+};
+
+/** Unit test for exchanging elements of a vector.
+ *
+ */
+void VectorContentTest::ExchangeTest()
+{
+  // set basis
+  for (int i=0;i<3;i++) {
+    v->setBasis(i);
+    v->SwapElements((i)%3,(i+1)%3);
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (i+1)%3 == j ? 1. : 0. , v->at(j) );
+  }
+
+  // set to 1,2,3 and reverse
+  for (int i=0;i<3;i++)
+    v->at(i) = (double)(i+1);
+  v->Reverse();
+  for (int j=0;j<3;j++)
+    CPPUNIT_ASSERT_EQUAL( (double)(3-j), v->at(j) );
+};
+
+/** UnitTest for operators.
+ */
+void VectorContentTest::OperatorIsTest()
+{
+  VectorContent zero(3);
+  VectorContent unit(3);
+  zero.setZero();
+  unit.setZero();
+  unit[1] = 1.;
+  // summation and scaling
+  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
+  CPPUNIT_ASSERT_EQUAL( false, zero.IsOne() );
+  CPPUNIT_ASSERT_EQUAL( false, unit.IsZero() );
+  CPPUNIT_ASSERT_EQUAL( true, zero.IsZero() );
+};
+
+/** UnitTest for operators.
+ */
+void VectorContentTest::OperatorAlgebraTest()
+{
+  VectorContent zero(3);
+  VectorContent unit(3);
+  zero.setZero();
+  unit.setZero();
+  unit[1] = 1.;
+  // summation and scaling
+  CPPUNIT_ASSERT_EQUAL( true, (zero+unit).IsOne() );
+  CPPUNIT_ASSERT_EQUAL( true, (zero+unit).IsOne() );
+  CPPUNIT_ASSERT_EQUAL( true, (zero-unit).IsOne() );
+  CPPUNIT_ASSERT_EQUAL( false, (zero-unit).IsZero() );
+  CPPUNIT_ASSERT_EQUAL( true, (zero+zero).IsZero() );
+  CPPUNIT_ASSERT_EQUAL( false, (unit*0.98).IsOne() );
+  CPPUNIT_ASSERT_EQUAL( false, (0.98*unit).IsOne() );
+  CPPUNIT_ASSERT_EQUAL( true, (unit*1.).IsOne() );
+  CPPUNIT_ASSERT_EQUAL( true, (1.*unit).IsOne() );
+
+  CPPUNIT_ASSERT_EQUAL( unit, (zero+unit) );
+  CPPUNIT_ASSERT_EQUAL( zero, (zero+zero) );
+  CPPUNIT_ASSERT_EQUAL( unit, (unit+zero) );
+
+  unit += zero;
+  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
+  unit *= 1.;
+  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
+};
Index: src/unittests/VectorContentUnittest.hpp
===================================================================
--- src/unittests/VectorContentUnittest.hpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
+++ src/unittests/VectorContentUnittest.hpp	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
@@ -0,0 +1,45 @@
+/*
+ * VectorContentUnittest.hpp
+ *
+ *  Created on: Jan 8, 2010
+ *      Author: heber
+ */
+
+#ifndef VECTORCONTENTUNITTEST_HPP_
+#define VECTORCONTENTUNITTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "LinearAlgebra/VectorContent.hpp"
+
+/********************************************** Test classes **************************************/
+
+class VectorContentTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( VectorContentTest) ;
+    CPPUNIT_TEST (AccessTest );
+    CPPUNIT_TEST (InitializaionTest );
+    CPPUNIT_TEST (CopyTest );
+    CPPUNIT_TEST (ExchangeTest );
+    CPPUNIT_TEST (OperatorAlgebraTest );
+    CPPUNIT_TEST (OperatorIsTest );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+    void setUp();
+    void tearDown();
+
+    void AccessTest();
+    void InitializaionTest();
+    void CopyTest();
+    void ExchangeTest();
+    void OperatorIsTest();
+    void OperatorAlgebraTest();
+
+private:
+
+    VectorContent *v;
+};
+
+
+#endif /* VECTORCONTENTUNITTEST_HPP_ */
Index: src/unittests/gslvectorunittest.cpp
===================================================================
--- src/unittests/gslvectorunittest.cpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ 	(revision )
@@ -1,176 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * gslvectorunittest.cpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-using namespace std;
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-#include "gslvectorunittest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( GSLVectorTest );
-
-
-void GSLVectorTest::setUp()
-{
-  v = new GSLVector(3);
-};
-
-void GSLVectorTest::tearDown()
-{
-  delete(v);
-};
-
-/** Unit test for accessing elements in the vector.
- *
- */
-void GSLVectorTest::AccessTest()
-{
-  // set
-  for (int i=0;i<3;i++)
-    v->Set(i,i);
-
-  // and check
-  double *ptr = NULL;
-  for (int i=0;i<3;i++) {
-    CPPUNIT_ASSERT_EQUAL( (double)i, v->Get(i) );
-    ptr = v->Pointer(i);
-    CPPUNIT_ASSERT_EQUAL( (double)i, *ptr );
-  }
-
-  // out of bounds
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(3) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(-1) );
-};
-
-
-/** Unit test for initializing the vector.
- *
- */
-void GSLVectorTest::InitializaionTest()
-{
-  // set zero
-  v->SetZero();
-  for (int i=0;i<3;i++)
-    CPPUNIT_ASSERT_EQUAL( 0., v->Get(i) );
-
-  // set basis
-  for (int i=0;i<3;i++) {
-    v->SetBasis(i);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , v->Get(j) );
-  }
-
-  // set all
-  v->SetAll(1.5);
-  for (int i=0;i<3;i++)
-    CPPUNIT_ASSERT_EQUAL( 1.5, v->Get(i) );
-};
-
-/** Unit test for copying vectors.
- *
- */
-void GSLVectorTest::CopyTest()
-{
-  // set basis
-  GSLVector *dest = NULL;
-  for (int i=0;i<3;i++) {
-    v->SetBasis(i);
-    dest = new GSLVector(v);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( v->Get(j) , dest->Get(j) );
-
-    delete(dest);
-  }
-};
-
-/** Unit test for exchanging elements of a vector.
- *
- */
-void GSLVectorTest::ExchangeTest()
-{
-  // set basis
-  for (int i=0;i<3;i++) {
-    v->SetBasis(i);
-    v->SwapElements((i)%3,(i+1)%3);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (i+1)%3 == j ? 1. : 0. , v->Get(j) );
-  }
-
-  // set to 1,2,3 and reverse
-  for (int i=0;i<3;i++)
-    v->Set(i,i+1);
-  v->Reverse();
-  for (int j=0;j<3;j++)
-    CPPUNIT_ASSERT_EQUAL( (double)(3-j), v->Get(j) );
-};
-
-/** UnitTest for operators.
- */
-void GSLVectorTest::OperatorIsTest()
-{
-  GSLVector zero(3);
-  GSLVector unit(3);
-  zero.SetZero();
-  unit.SetZero();
-  unit.Set(1,1.);
-  // summation and scaling
-  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, zero.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, unit.IsZero() );
-  CPPUNIT_ASSERT_EQUAL( true, zero.IsZero() );
-};
-
-/** UnitTest for operators.
- */
-void GSLVectorTest::OperatorAlgebraTest()
-{
-  GSLVector zero(3);
-  GSLVector unit(3);
-  zero.SetZero();
-  unit.SetZero();
-  unit.Set(1,1.);
-  // summation and scaling
-  CPPUNIT_ASSERT_EQUAL( true, (zero+unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero+unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero-unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, (zero-unit).IsZero() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero+zero).IsZero() );
-  CPPUNIT_ASSERT_EQUAL( false, (unit*0.98).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, (0.98*unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (unit*1.).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (1.*unit).IsOne() );
-
-  CPPUNIT_ASSERT_EQUAL( unit, (zero+unit) );
-  CPPUNIT_ASSERT_EQUAL( zero, (zero+zero) );
-  CPPUNIT_ASSERT_EQUAL( unit, (unit+zero) );
-
-  unit += zero;
-  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
-  unit *= 1.;
-  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
-};
Index: src/unittests/gslvectorunittest.hpp
===================================================================
--- src/unittests/gslvectorunittest.hpp	(revision 5ada941f20587a943dbda6033b6e4d8c01b3ce67)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * gslvectorunittest.hpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-#ifndef GSLVECTORUNITTEST_HPP_
-#define GSLVECTORUNITTEST_HPP_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "LinearAlgebra/gslvector.hpp"
-
-/********************************************** Test classes **************************************/
-
-class GSLVectorTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( GSLVectorTest) ;
-    CPPUNIT_TEST (AccessTest );
-    CPPUNIT_TEST (InitializaionTest );
-    CPPUNIT_TEST (CopyTest );
-    CPPUNIT_TEST (ExchangeTest );
-    CPPUNIT_TEST (OperatorAlgebraTest );
-    CPPUNIT_TEST (OperatorIsTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-
-    void AccessTest();
-    void InitializaionTest();
-    void CopyTest();
-    void ExchangeTest();
-    void OperatorIsTest();
-    void OperatorAlgebraTest();
-
-private:
-
-    GSLVector *v;
-};
-
-
-#endif /* GSLVECTORUNITTEST_HPP_ */
