Index: src/molecules.hpp
===================================================================
--- src/molecules.hpp	(revision 98b1d274f2a40b91f0e41792478e05950bffb599)
+++ src/molecules.hpp	(revision 342f33f9b32f60351e5e75e68fc61b2624f2d554)
@@ -22,4 +22,5 @@
 #include "helpers.hpp"
 #include "stackclass.hpp"
+#include "vector.hpp"
 
 class atom;
@@ -119,49 +120,4 @@
 #define RDET2(a0,a1,a2,a3) ((a0)*(a3)-(a1)*(a2))                      //!< hard-coded determinant of a 2x2 matrix
 
-/** Single vector.
- * basically, just a x[3] but with helpful functions
- */
-class vector {   
-  public:
-    double x[NDIM];
-
-  vector();
-  ~vector();
-
-  double Distance(const vector *y) const;
-  double PeriodicDistance(const vector *y, const double *cell_size) const;
-  double ScalarProduct(const vector *y) const;
-  double Projection(const vector *y) const;
-  double Norm() const ;
-  double Angle(vector *y) const;
-
-  void AddVector(const vector *y);
-  void SubtractVector(const vector *y);
-  void CopyVector(const vector *y);
-  void RotateVector(const vector *y, const double alpha);
-  void Zero(); 
-  void Normalize();
-  void Translate(const vector *x);
-  void Mirror(const vector *x);
-  void Scale(double **factor);
-  void Scale(double *factor);
-  void Scale(double factor);
-  void MatrixMultiplication(double *M);
-  void InverseMatrixMultiplication(double *M);
-  void KeepPeriodic(ofstream *out, double *matrix);
-  void LinearCombinationOfVectors(const vector *x1, const vector *x2, const vector *x3, double *factors);
-  
-  bool GetOneNormalVector(const vector *x1);
-  bool MakeNormalVector(const vector *y1);
-  bool MakeNormalVector(const vector *y1, const vector *y2);
-  bool MakeNormalVector(const vector *x1, const vector *x2, const vector *x3);
-  bool SolveSystem(vector *x1, vector *x2, vector *y, double alpha, double beta, double c);
-	bool LSQdistance(vector **vectors, int dim);
-
-  void AskPosition(double *cell_size, bool check);
-  bool Output(ofstream *out) const;
-};
-
-ofstream& operator<<(ofstream& ost, vector& m);
 
 /** Parameter structure for least square minimsation.
@@ -300,5 +256,5 @@
   /// Find atoms.
   atom * FindAtom(int Nr) const; 
-  atom * AskAtom(char *text);
+  atom * AskAtom(string text);
 
   /// Count and change present atoms' coordination.
@@ -306,4 +262,5 @@
   void CountElements();
   void CalculateOrbitals(class config &configuration);
+  bool CenterInBox(ofstream *out, vector *BoxLengths);
   void CenterEdge(ofstream *out, vector *max); 
   void CenterOrigin(ofstream *out, vector *max); 
@@ -335,5 +292,5 @@
   void ResetAllAtomNumbers();
   int CountCyclicBonds(ofstream *out);
-  char * GetColor(enum Shading color);
+  string GetColor(enum Shading color);
 
   molecule *CopyMolecule();
@@ -500,10 +457,10 @@
   void Load(char *filename, periodentafel *periode, molecule *mol);
   void LoadOld(char *filename, periodentafel *periode, molecule *mol);
-  void RetrieveConfigPathAndName(char *filename);
+  void RetrieveConfigPathAndName(char * filename);
   bool Save(ofstream *file, periodentafel *periode, molecule *mol) const;
   void Edit(molecule *mol);
   bool GetIsAngstroem() const;
   char *GetDefaultPath() const;
-  void config::SetDefaultPath(const char *path);
+  void SetDefaultPath(const char *path);
 };
 
Index: src/vector.cpp
===================================================================
--- src/vector.cpp	(revision 98b1d274f2a40b91f0e41792478e05950bffb599)
+++ src/vector.cpp	(revision 342f33f9b32f60351e5e75e68fc61b2624f2d554)
@@ -182,4 +182,51 @@
 };
 
+/** Sums vector \a to this lhs component-wise.
+ * \param a base vector
+ * \param b vector components to add
+ * \return lhs + a
+ */
+vector& operator+=(vector& a, const vector& b)
+{
+  a.AddVector(&b);
+  return a;
+};
+/** factor each component of \a a times a double \a m.
+ * \param a base vector
+ * \param m factor
+ * \return lhs.x[i] * m
+ */
+vector& operator*=(vector& a, const double m)
+{
+  a.Scale(m);
+  return a;
+};
+
+/** Sums two vectors \a  and \b component-wise.
+ * \param a first vector 
+ * \param b second vector
+ * \return a + b
+ */
+vector& operator+(const vector& a, const vector& b)
+{
+  vector *x = new vector;
+  x->CopyVector(&a);
+  x->AddVector(&b);
+  return *x;
+};
+
+/** Factors given vector \a a times \a m.
+ * \param a vector 
+ * \param m factor
+ * \return a + b
+ */
+vector& operator*(const vector& a, const double m)
+{
+  vector *x = new vector;
+  x->CopyVector(&a);
+  x->Scale(m);
+  return *x;
+};
+
 /** Prints a 3dim vector.
  * prints no end of line.
@@ -213,5 +260,5 @@
 {
   for (int i=0;i<NDIM;i++)
-    this->x[i] *= (*factor)[i];
+    x[i] *= (*factor)[i];
 };
 
@@ -219,5 +266,5 @@
 {
   for (int i=0;i<NDIM;i++)
-    this->x[i] *= *factor;
+    x[i] *= *factor;
 };
 
@@ -225,5 +272,5 @@
 {
   for (int i=0;i<NDIM;i++)
-    this->x[i] *= factor;
+    x[i] *= factor;
 };
 
Index: src/vector.hpp
===================================================================
--- src/vector.hpp	(revision 342f33f9b32f60351e5e75e68fc61b2624f2d554)
+++ src/vector.hpp	(revision 342f33f9b32f60351e5e75e68fc61b2624f2d554)
@@ -0,0 +1,54 @@
+#ifndef VECTOR_HPP_
+#define VECTOR_HPP_
+
+/** Single vector.
+ * basically, just a x[3] but with helpful functions
+ */
+class vector {   
+  public:
+    double x[NDIM];
+
+  vector();
+  ~vector();
+
+  double Distance(const vector *y) const;
+  double PeriodicDistance(const vector *y, const double *cell_size) const;
+  double ScalarProduct(const vector *y) const;
+  double Projection(const vector *y) const;
+  double Norm() const ;
+  double Angle(vector *y) const;
+
+  void AddVector(const vector *y);
+  void SubtractVector(const vector *y);
+  void CopyVector(const vector *y);
+  void RotateVector(const vector *y, const double alpha);
+  void Zero(); 
+  void Normalize();
+  void Translate(const vector *x);
+  void Mirror(const vector *x);
+  void Scale(double **factor);
+  void Scale(double *factor);
+  void Scale(double factor);
+  void MatrixMultiplication(double *M);
+  void InverseMatrixMultiplication(double *M);
+  void KeepPeriodic(ofstream *out, double *matrix);
+  void LinearCombinationOfVectors(const vector *x1, const vector *x2, const vector *x3, double *factors);
+  
+  bool GetOneNormalVector(const vector *x1);
+  bool MakeNormalVector(const vector *y1);
+  bool MakeNormalVector(const vector *y1, const vector *y2);
+  bool MakeNormalVector(const vector *x1, const vector *x2, const vector *x3);
+  bool SolveSystem(vector *x1, vector *x2, vector *y, double alpha, double beta, double c);
+  bool LSQdistance(vector **vectors, int dim);
+
+  void AskPosition(double *cell_size, bool check);
+  bool Output(ofstream *out) const;
+};
+
+ofstream& operator<<(ofstream& ost, vector& m);
+vector& operator+=(vector& a, const vector& b);
+vector& operator*=(vector& a, const double m);
+vector& operator*(const vector& a, const double m);
+vector& operator+(const vector& a, const vector& b);
+
+#endif /*VECTOR_HPP_*/
