Index: src/tesselation.cpp
===================================================================
--- src/tesselation.cpp	(revision fb73b8313dc69e341d7e560e1f298f5da5c56b22)
+++ src/tesselation.cpp	(revision c0f6c621f619a71f4b09c404a8cdb96eed63efec)
@@ -1746,5 +1746,5 @@
 
     // construct old center
-    GetCenterofCircumcircle(&OldSphereCenter, T.endpoints[0]->node->node, T.endpoints[1]->node->node, T.endpoints[2]->node->node);
+    GetCenterofCircumcircle(&OldSphereCenter, *T.endpoints[0]->node->node, *T.endpoints[1]->node->node, *T.endpoints[2]->node->node);
     helper.CopyVector(&T.NormalVector);  // normal vector ensures that this is correct center of the two possible ones
     radius = Line.endpoints[0]->node->node->DistanceSquared(&OldSphereCenter);
@@ -1805,5 +1805,5 @@
       AddTesselationPoint(BaseRay->endpoints[1]->node, 2);
 
-      if (CheckLineCriteriaForDegeneratedTriangle((const BoundaryPointSet **)TPS)) {
+      if (CheckLineCriteriaForDegeneratedTriangle((const BoundaryPointSet ** const )TPS)) {
         AddTesselationLine(TPS[0], TPS[1], 0);
         AddTesselationLine(TPS[0], TPS[2], 1);
@@ -1834,5 +1834,5 @@
         // We demand that at most one new degenerate line is created and that this line also already exists (which has to be the case due to existentTrianglesCount == 1)
         // i.e. at least one of the three lines must be present with TriangleCount <= 1
-        if (CheckLineCriteriaForDegeneratedTriangle((const BoundaryPointSet **)TPS)) {
+        if (CheckLineCriteriaForDegeneratedTriangle((const BoundaryPointSet ** const)TPS)) {
           AddTesselationLine(TPS[0], TPS[1], 0);
           AddTesselationLine(TPS[0], TPS[2], 1);
@@ -1996,5 +1996,5 @@
 
   // calculate volume
-  volume = CalculateVolumeofGeneralTetraeder(Base->endpoints[1]->node->node, OtherBase->endpoints[0]->node->node, OtherBase->endpoints[1]->node->node, Base->endpoints[0]->node->node);
+  volume = CalculateVolumeofGeneralTetraeder(*Base->endpoints[1]->node->node, *OtherBase->endpoints[0]->node->node, *OtherBase->endpoints[1]->node->node, *Base->endpoints[0]->node->node);
 
   // delete the temporary other base line and the closest points
@@ -2361,5 +2361,5 @@
 
                   // construct both new centers
-                  GetCenterofCircumcircle(&NewSphereCenter, BaseLine->endpoints[0]->node->node, BaseLine->endpoints[1]->node->node, Candidate->node);
+                  GetCenterofCircumcircle(&NewSphereCenter, *BaseLine->endpoints[0]->node->node, *BaseLine->endpoints[1]->node->node, *Candidate->node);
                   OtherNewSphereCenter.CopyVector(&NewSphereCenter);
 
@@ -3138,5 +3138,5 @@
         AddTesselationTriangle();
         // calculate volume summand as a general tetraeder
-        volume += CalculateVolumeofGeneralTetraeder(TPS[0]->node->node, TPS[1]->node->node, TPS[2]->node->node, &OldPoint);
+        volume += CalculateVolumeofGeneralTetraeder(*TPS[0]->node->node, *TPS[1]->node->node, *TPS[2]->node->node, OldPoint);
         // advance number
         count++;
Index: src/tesselationhelpers.cpp
===================================================================
--- src/tesselationhelpers.cpp	(revision fb73b8313dc69e341d7e560e1f298f5da5c56b22)
+++ src/tesselationhelpers.cpp	(revision c0f6c621f619a71f4b09c404a8cdb96eed63efec)
@@ -14,5 +14,5 @@
 #include "verbose.hpp"
 
-double DetGet(gsl_matrix *A, int inPlace) {
+double DetGet(gsl_matrix * const A, const int inPlace) {
   /*
   inPlace = 1 => A is replaced with the LU decomposed copy.
@@ -42,5 +42,5 @@
 };
 
-void GetSphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS)
+void GetSphere(Vector * const center, const Vector &a, const Vector &b, const Vector &c, const double RADIUS)
 {
   gsl_matrix *A = gsl_matrix_calloc(3,3);
@@ -96,9 +96,9 @@
  * @param b vector second point of triangle
  * @param c vector third point of triangle
- * @param *Umkreismittelpunkt new cneter point of circumference
+ * @param *Umkreismittelpunkt new center point of circumference
  * @param Direction vector indicates up/down
- * @param AlternativeDirection vecotr, needed in case the triangles have 90 deg angle
+ * @param AlternativeDirection Vector, needed in case the triangles have 90 deg angle
  * @param Halfplaneindicator double indicates whether Direction is up or down
- * @param AlternativeIndicator doube indicates in case of orthogonal triangles which direction of AlternativeDirection is suitable
+ * @param AlternativeIndicator double indicates in case of orthogonal triangles which direction of AlternativeDirection is suitable
  * @param alpha double angle at a
  * @param beta double, angle at b
@@ -107,6 +107,6 @@
  * @param Umkreisradius double radius of circumscribing circle
  */
-void GetCenterOfSphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection,
-    double HalfplaneIndicator, double AlternativeIndicator, double alpha, double beta, double gamma, double RADIUS, double Umkreisradius)
+void GetCenterOfSphere(Vector* const & Center, const Vector &a, const Vector &b, const Vector &c, Vector * const NewUmkreismittelpunkt, const Vector* const Direction, const Vector* const AlternativeDirection,
+    const double HalfplaneIndicator, const double AlternativeIndicator, const double alpha, const double beta, const double gamma, const double RADIUS, const double Umkreisradius)
 {
   Vector TempNormal, helper;
@@ -171,5 +171,5 @@
  * \param *c third point
  */
-void GetCenterofCircumcircle(Vector *Center, Vector *a, Vector *b, Vector *c)
+void GetCenterofCircumcircle(Vector * const Center, const Vector &a, const Vector &b, const Vector &c)
 {
   Vector helper;
@@ -177,9 +177,9 @@
   Vector SideA, SideB, SideC;
   SideA.CopyVector(b);
-  SideA.SubtractVector(c);
+  SideA.SubtractVector(&c);
   SideB.CopyVector(c);
-  SideB.SubtractVector(a);
+  SideB.SubtractVector(&a);
   SideC.CopyVector(a);
-  SideC.SubtractVector(b);
+  SideC.SubtractVector(&b);
   alpha = M_PI - SideB.Angle(&SideC);
   beta = M_PI - SideC.Angle(&SideA);
@@ -215,5 +215,5 @@
  * \return Angle between \a NewSphereCenter and \a OldSphereCenter relative to \a CircleCenter, 2.*M_PI if one test fails
  */
-double GetPathLengthonCircumCircle(Vector &CircleCenter, Vector &CirclePlaneNormal, double CircleRadius, Vector &NewSphereCenter, Vector &OldSphereCenter, Vector &NormalVector, Vector &SearchDirection)
+double GetPathLengthonCircumCircle(const Vector &CircleCenter, const Vector &CirclePlaneNormal, const double CircleRadius, const Vector &NewSphereCenter, const Vector &OldSphereCenter, const Vector &NormalVector, const Vector &SearchDirection)
 {
   Vector helper;
@@ -300,5 +300,5 @@
  * @return true if there is an intersection between the given lines, false otherwise
  */
-bool existsIntersection(Vector point1, Vector point2, Vector point3, Vector point4)
+bool existsIntersection(const Vector &point1, const Vector &point2, const Vector &point3, const Vector &point4)
 {
   bool result;
@@ -403,5 +403,5 @@
  * @return angle between point and reference
  */
-double GetAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector)
+double GetAngle(const Vector &point, const Vector &reference, const Vector &OrthogonalVector)
 {
   if (reference.IsZero())
@@ -429,5 +429,5 @@
  * \return \f$ \frac{1}{6} \cdot ((a-d) \times (a-c) \cdot  (a-b)) \f$
  */
-double CalculateVolumeofGeneralTetraeder(Vector *a, Vector *b, Vector *c, Vector *d)
+double CalculateVolumeofGeneralTetraeder(const Vector &a, const Vector &b, const Vector &c, const Vector &d)
 {
   Vector Point, TetraederVector[3];
@@ -438,5 +438,5 @@
   TetraederVector[2].CopyVector(c);
   for (int j=0;j<3;j++)
-    TetraederVector[j].SubtractVector(d);
+    TetraederVector[j].SubtractVector(&d);
   Point.CopyVector(&TetraederVector[0]);
   Point.VectorProduct(&TetraederVector[1]);
@@ -452,5 +452,5 @@
  * \return true - there is such a line (i.e. creation of degenerated triangle is valid), false - no such line (don't create)
  */
-bool CheckLineCriteriaForDegeneratedTriangle(const BoundaryPointSet *nodes[3])
+bool CheckLineCriteriaForDegeneratedTriangle(const BoundaryPointSet * const nodes[3])
 {
   bool result = false;
@@ -536,5 +536,5 @@
  * @return point which is second closest to the provided one
  */
-TesselPoint* FindSecondClosestPoint(const Vector* Point, LinkedCell* LC)
+TesselPoint* FindSecondClosestPoint(const Vector* Point, const LinkedCell* const LC)
 {
   TesselPoint* closestPoint = NULL;
@@ -649,5 +649,5 @@
  * \return Vector on reference line that has closest distance
  */
-Vector * GetClosestPointBetweenLine(ofstream *out, const BoundaryLineSet *Base, const BoundaryLineSet *OtherBase)
+Vector * GetClosestPointBetweenLine(ofstream *out, const BoundaryLineSet * const Base, const BoundaryLineSet * const OtherBase)
 {
   // construct the plane of the two baselines (i.e. take both their directional vectors)
@@ -689,5 +689,5 @@
  * \return distance between \a *x and plane defined by \a *triangle, -1 - if something went wrong
  */
-double DistanceToTrianglePlane(ofstream *out, const Vector *x, const BoundaryTriangleSet *triangle)
+double DistanceToTrianglePlane(ofstream * const out, const Vector *x, const BoundaryTriangleSet * const triangle)
 {
   double distance = 0.;
@@ -705,5 +705,5 @@
  * \param *mol molecule structure with atom positions
  */
-void WriteVrmlFile(ofstream *out, ofstream *vrmlfile, const Tesselation *Tess, const PointCloud *cloud)
+void WriteVrmlFile(ofstream * const out, ofstream * const vrmlfile, const Tesselation * const Tess, const PointCloud * const cloud)
 {
   TesselPoint *Walker = NULL;
@@ -748,5 +748,5 @@
  * \param *mol molecule structure with atom positions
  */
-void IncludeSphereinRaster3D(ofstream *out, ofstream *rasterfile, const Tesselation *Tess, const PointCloud *cloud)
+void IncludeSphereinRaster3D(ofstream * const out, ofstream * const rasterfile, const Tesselation * const Tess, const PointCloud * const cloud)
 {
   Vector helper;
@@ -773,5 +773,5 @@
  * \param *mol molecule structure with atom positions
  */
-void WriteRaster3dFile(ofstream *out, ofstream *rasterfile, const Tesselation *Tess, const PointCloud *cloud)
+void WriteRaster3dFile(ofstream * const out, ofstream * const rasterfile, const Tesselation * const Tess, const PointCloud * const cloud)
 {
   TesselPoint *Walker = NULL;
@@ -818,5 +818,5 @@
  * \param N arbitrary number to differentiate various zones in the tecplot format
  */
-void WriteTecplotFile(ofstream *out, ofstream *tecplot, const Tesselation *TesselStruct, const PointCloud *cloud, const int N)
+void WriteTecplotFile(ofstream * const out, ofstream * const tecplot, const Tesselation * const TesselStruct, const PointCloud * const cloud, const int N)
 {
   if ((tecplot != NULL) && (TesselStruct != NULL)) {
@@ -859,5 +859,5 @@
  * \param *TesselStruct pointer to Tesselation structure
  */
-void CalculateConcavityPerBoundaryPoint(ofstream *out, const Tesselation *TesselStruct)
+void CalculateConcavityPerBoundaryPoint(ofstream * const out, const Tesselation * const TesselStruct)
 {
   class BoundaryPointSet *point = NULL;
@@ -886,5 +886,5 @@
  * \return true - all have exactly two triangles, false - some not, list is printed to screen
  */
-bool CheckListOfBaselines(ofstream *out, const Tesselation *TesselStruct)
+bool CheckListOfBaselines(ofstream * const out, const Tesselation * const TesselStruct)
 {
   LineMap::const_iterator testline;
Index: src/tesselationhelpers.hpp
===================================================================
--- src/tesselationhelpers.hpp	(revision fb73b8313dc69e341d7e560e1f298f5da5c56b22)
+++ src/tesselationhelpers.hpp	(revision c0f6c621f619a71f4b09c404a8cdb96eed63efec)
@@ -47,28 +47,28 @@
 /********************************************** declarations *******************************/
 
-double DetGet(gsl_matrix *A, int inPlace);
-void GetSphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS);
-void GetCenterOfSphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection, double HalfplaneIndicator, double AlternativeIndicator, double alpha, double beta, double gamma, double RADIUS, double Umkreisradius);
-void GetCenterofCircumcircle(Vector *Center, Vector *a, Vector *b, Vector *c);
-double GetPathLengthonCircumCircle(Vector &CircleCenter, Vector &CirclePlaneNormal, double CircleRadius, Vector &NewSphereCenter, Vector &OldSphereCenter, Vector &NormalVector, Vector &SearchDirection);
+double DetGet(gsl_matrix * const A, const int inPlace);
+void GetSphere(Vector * const Center, const Vector &a, const Vector &b, const Vector &c, const double RADIUS);
+void GetCenterOfSphere(Vector* const Center, const Vector &a, const Vector &b, const Vector &c, Vector * const NewUmkreismittelpunkt, const Vector* const Direction, const Vector* const AlternativeDirection, const double HalfplaneIndicator, const double AlternativeIndicator, const double alpha, const double beta, const double gamma, const double RADIUS, const double Umkreisradius);
+void GetCenterofCircumcircle(Vector * const Center, const Vector &a, const Vector &b, const Vector &c);
+double GetPathLengthonCircumCircle(const Vector &CircleCenter, const Vector &CirclePlaneNormal, const double CircleRadius, const Vector &NewSphereCenter, const Vector &OldSphereCenter, const Vector &NormalVector, const Vector &SearchDirection);
 double MinIntersectDistance(const gsl_vector * x, void *params);
-bool existsIntersection(Vector point1, Vector point2, Vector point3, Vector point4);
-double CalculateVolumeofGeneralTetraeder(Vector *a, Vector *b, Vector *c, Vector *d);
-double GetAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector);
+bool existsIntersection(const Vector &point1, const Vector &point2, const Vector &point3, const Vector &point4);
+double CalculateVolumeofGeneralTetraeder(const Vector &a, const Vector &b, const Vector &c, const Vector &d);
+double GetAngle(const Vector &point, const Vector &reference, const Vector &OrthogonalVector);
 
-bool CheckLineCriteriaForDegeneratedTriangle(const BoundaryPointSet *nodes[3]);
-bool SortCandidates(const CandidateForTesselation* candidate1, const CandidateForTesselation* candidate2);
+bool CheckLineCriteriaForDegeneratedTriangle(const BoundaryPointSet * const nodes[3]);
+bool SortCandidates(const CandidateForTesselation* candidate1, const CandidateForTesselation *candidate2);
 TesselPoint* FindClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, const LinkedCell* const LC);
-TesselPoint* FindSecondClosestPoint(const Vector*, const LinkedCell*);
-Vector * GetClosestPointBetweenLine(ofstream *out, const BoundaryLineSet *Base, const BoundaryLineSet *OtherBase);
+TesselPoint* FindSecondClosestPoint(const Vector*, const LinkedCell* const LC);
+Vector * GetClosestPointBetweenLine(ofstream *out, const BoundaryLineSet * const Base, const BoundaryLineSet * const OtherBase);
 
-void WriteTecplotFile(ofstream *out, ofstream *tecplot, const Tesselation *TesselStruct, const PointCloud *cloud, const int N);
-void WriteRaster3dFile(ofstream *out, ofstream *rasterfile, const Tesselation *Tess, const PointCloud *cloud);
-void IncludeSphereinRaster3D(ofstream *out, ofstream *rasterfile, const Tesselation *Tess, const PointCloud *cloud);
-void WriteVrmlFile(ofstream *out, ofstream *vrmlfile, const Tesselation *Tess, const PointCloud *cloud);
-void CalculateConcavityPerBoundaryPoint(ofstream *out, const Tesselation *TesselStruct);
-double DistanceToTrianglePlane(ofstream *out, const Vector *x, const BoundaryTriangleSet *triangle);
+void WriteTecplotFile(ofstream * const out, ofstream * const tecplot, const Tesselation * const TesselStruct, const PointCloud * const cloud, const int N);
+void WriteRaster3dFile(ofstream * const out, ofstream * const rasterfile, const Tesselation * const Tess, const PointCloud * const cloud);
+void IncludeSphereinRaster3D(ofstream * const out, ofstream * const rasterfile, const Tesselation *Tess, const PointCloud *cloud);
+void WriteVrmlFile(ofstream * const out, ofstream * const vrmlfile, const Tesselation * const Tess, const PointCloud * const cloud);
+void CalculateConcavityPerBoundaryPoint(ofstream * const out, const Tesselation * const TesselStruct);
+double DistanceToTrianglePlane(ofstream * const out, const Vector *x, const BoundaryTriangleSet * const triangle);
 
-bool CheckListOfBaselines(ofstream *out, const Tesselation *TesselStruct);
+bool CheckListOfBaselines(ofstream * const out, const Tesselation * const TesselStruct);
 
 
