Index: src/boundary.cpp
===================================================================
--- src/boundary.cpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/boundary.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -986,9 +986,10 @@
   // 2. expand from there
   while ((!TesselStruct->OpenLines.empty()) && (OneLoopWithoutSuccessFlag)) {
-    // 2a. fill all new OpenLines
+    // 2a. print OpenLines
     Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for candidates:" << endl;
     for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++)
-      Log() << Verbose(2) << *(Runner->second) << endl;
-
+      Log() << Verbose(1) << " " << *(Runner->second) << endl;
+
+    // 2b. find best candidate for each OpenLine
     for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) {
       baseline = Runner->second;
@@ -1000,10 +1001,11 @@
     }
 
-    // 2b. search for smallest ShortestAngle among all candidates
-    double ShortestAngle = 4.*M_PI;
+    // 2c. print OpenLines with candidates again
     Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:" << endl;
     for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++)
-      Log() << Verbose(2) << *(Runner->second) << endl;
-
+      Log() << Verbose(1) << " " << *(Runner->second) << endl;
+
+    // 2d. search for smallest ShortestAngle among all candidates
+    double ShortestAngle = 4.*M_PI;
     for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) {
       if (Runner->second->ShortestAngle < ShortestAngle) {
@@ -1013,4 +1015,5 @@
       }
     }
+    // 2e. if we found one, add candidate
     if ((ShortestAngle == 4.*M_PI) || (baseline->pointlist.empty()))
       OneLoopWithoutSuccessFlag = false;
@@ -1019,5 +1022,5 @@
     }
 
-    // write temporary envelope
+    // 2f. write temporary envelope
     if (filename != NULL) {
       if ((DoSingleStepOutput && ((TesselStruct->TrianglesOnBoundary.size() % SingleStepWidth == 0)))) { // if we have a new triangle and want to output each new triangle configuration
Index: src/ellipsoid.cpp
===================================================================
--- src/ellipsoid.cpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/ellipsoid.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -249,5 +249,5 @@
     Log() << Verbose(2) << "INFO: Center cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " ... ";
     // get random cell
-    const LinkedNodes *List = LC->GetCurrentCell();
+    const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
     if (List == NULL) {  // set index to it
       continue;
@@ -268,5 +268,5 @@
       for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
         for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
-          const LinkedNodes *List = LC->GetCurrentCell();
+          const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
           PointsLeft += List->size();
         }
@@ -293,5 +293,5 @@
       for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
         for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
-          const LinkedNodes *List = LC->GetCurrentCell();
+          const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
 //          Log() << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl;
           if (List != NULL) {
@@ -300,5 +300,5 @@
 //            else
 //              Log() << Verbose(2) << "Cell is empty ... " << endl;
-            for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+            for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
               if ((current != PickedAtomNrs.end()) && (*current == index)) {
                 Candidate = (*Runner);
Index: src/linkedcell.cpp
===================================================================
--- src/linkedcell.cpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/linkedcell.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -220,5 +220,5 @@
  * \return LinkedAtoms pointer to current cell, NULL if LinkedCell::n[] are out of bounds.
  */
-const LinkedNodes* LinkedCell::GetCurrentCell() const
+const LinkedCell::LinkedNodes* LinkedCell::GetCurrentCell() const
 {
   if (CheckBounds()) {
@@ -234,5 +234,5 @@
  * \return LinkedAtoms pointer to current cell, NULL if LinkedCell::n[]+relative[] are out of bounds.
  */
-const LinkedNodes* LinkedCell::GetRelativeToCurrentCell(const int relative[NDIM]) const
+const LinkedCell::LinkedNodes* LinkedCell::GetRelativeToCurrentCell(const int relative[NDIM]) const
 {
   if (CheckBounds(relative)) {
@@ -302,2 +302,81 @@
 };
 
+/** Returns a list with all neighbours from the current LinkedCell::index.
+ * \param distance (if no distance, then adjacent cells are taken)
+ * \return list of tesselpoints
+ */
+LinkedCell::LinkedNodes* LinkedCell::GetallNeighbours(const double distance = 0) const
+{
+  int N[NDIM], Nlower[NDIM], Nupper[NDIM];
+  TesselPoint *Walker = NULL;
+  LinkedNodes *TesselList = new LinkedNodes;
+
+  // then go through the current and all neighbouring cells and check the contained points for possible candidates
+  //Log() << Verbose(1) << "LC Intervals:";
+  const int step = (distance == 0) ? 1 : (int)floor(distance/RADIUS)+1;
+  for (int i=0;i<NDIM;i++) {
+    Nlower[i] = ((N[i]-step) >= 0) ? N[i]-step : 0;
+    Nupper[i] = ((N[i]+step) < N[i]) ? N[i]+step : N[i]-step;
+    //Log() << Verbose(0) << " [" << Nlower[i] << "," << Nupper[i] << "] ";
+  }
+  //Log() << Verbose(0) << endl;
+  for (n[0] = Nlower[0]; n[0] <= Nupper[0]; n[0]++)
+    for (n[1] = Nlower[1]; n[1] <= Nupper[1]; n[1]++)
+      for (n[2] = Nlower[2]; n[2] <= Nupper[2]; n[2]++) {
+        const LinkedNodes *List = GetCurrentCell();
+        //Log() << Verbose(1) << "Current cell is " << n[0] << ", " << n[1] << ", " << n[2] << " with No. " << index << "." << endl;
+        if (List != NULL) {
+          for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+            Walker = *Runner;
+            TesselList->push_back(Walker);
+          }
+        }
+      }
+  return TesselList;
+};
+
+
+/** Returns a list of all TesselPoint with distance less than \a radius to \a *Center.
+ * \param radius radius of sphere
+ * \param *center center of sphere
+ * \return list of all points inside sphere
+ */
+LinkedCell::LinkedNodes* LinkedCell::GetPointsInsideSphere(const double radius, const Vector * const center) const
+{
+  int N[NDIM], Nlower[NDIM], Nupper[NDIM];
+  const double radiusSquared = radius*radius;
+  TesselPoint *Walker = NULL;
+  LinkedNodes *TesselList = new LinkedNodes;
+
+  if (SetIndexToVector(center)) {
+    for(int i=0;i<NDIM;i++) // store indices of this cell
+    N[i] = n[i];
+    //Log() << Verbose(1) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << index << "." << endl;
+  } else {
+    DoeLog(1) && (eLog()<< Verbose(1) << "Vector " << *center << " is outside of LinkedCell's bounding box." << endl);
+    return TesselList;
+  }
+  // then go through the current and all neighbouring cells and check the contained points for possible candidates
+  //Log() << Verbose(1) << "LC Intervals:";
+  for (int i=0;i<NDIM;i++) {
+    Nlower[i] = ((N[i]-1) >= 0) ? N[i]-1 : 0;
+    Nupper[i] = ((N[i]+1) < N[i]) ? N[i]+1 : N[i]-1;
+    //Log() << Verbose(0) << " [" << Nlower[i] << "," << Nupper[i] << "] ";
+  }
+  //Log() << Verbose(0) << endl;
+  for (n[0] = Nlower[0]; n[0] <= Nupper[0]; n[0]++)
+    for (n[1] = Nlower[1]; n[1] <= Nupper[1]; n[1]++)
+      for (n[2] = Nlower[2]; n[2] <= Nupper[2]; n[2]++) {
+        const LinkedNodes *List = GetCurrentCell();
+        //Log() << Verbose(1) << "Current cell is " << n[0] << ", " << n[1] << ", " << n[2] << " with No. " << index << "." << endl;
+        if (List != NULL) {
+          for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+            Walker = *Runner;
+            if ((center->DistanceSquared(Walker->node) - radiusSquared) > MYEPSILON) {
+              TesselList->push_back(Walker);
+            }
+          }
+        }
+      }
+  return TesselList;
+};
Index: src/linkedcell.hpp
===================================================================
--- src/linkedcell.hpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/linkedcell.hpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -33,5 +33,4 @@
 /********************************************** definitions *********************************/
 
-#define LinkedNodes list<TesselPoint *>
 
 /********************************************** declarations *******************************/
@@ -40,5 +39,10 @@
  */
 class LinkedCell {
-  public:
+private:
+
+public:
+  typedef list<TesselPoint *> LinkedNodes;
+
+
     Vector max;       // upper boundary
     Vector min;       // lower boundary
@@ -53,6 +57,6 @@
     LinkedCell(LinkedNodes *set, const double radius);
     ~LinkedCell();
-    const LinkedNodes* GetCurrentCell()const ;
-    const LinkedNodes* GetRelativeToCurrentCell(const int relative[NDIM])const ;
+    const LinkedCell::LinkedNodes* GetCurrentCell()const ;
+    const LinkedCell::LinkedNodes* GetRelativeToCurrentCell(const int relative[NDIM])const ;
     bool SetIndexToNode(const TesselPoint * const Walker)const ;
     bool SetIndexToVector(const Vector * const x)const ;
@@ -60,4 +64,7 @@
     bool CheckBounds(const int relative[NDIM])const ;
     void GetNeighbourBounds(int lower[NDIM], int upper[NDIM])const ;
+
+    LinkedCell::LinkedNodes* GetallNeighbours(const double distance) const;
+    LinkedCell::LinkedNodes* GetPointsInsideSphere(const double radius, const Vector * const center) const;
 
     // not implemented yet
Index: src/molecule_graph.cpp
===================================================================
--- src/molecule_graph.cpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/molecule_graph.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -148,8 +148,8 @@
       for (LC->n[1] = 0; LC->n[1] < LC->N[1]; LC->n[1]++)
         for (LC->n[2] = 0; LC->n[2] < LC->N[2]; LC->n[2]++) {
-          const LinkedNodes *List = LC->GetCurrentCell();
+          const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
           //Log() << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl;
           if (List != NULL) {
-            for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+            for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
               Walker = AtomMap[(*Runner)->nr];
               //Log() << Verbose(0) << "Current Atom is " << *Walker << "." << endl;
@@ -158,8 +158,8 @@
                 for (n[1] = -1; n[1] <= 1; n[1]++)
                   for (n[2] = -1; n[2] <= 1; n[2]++) {
-                    const LinkedNodes *OtherList = LC->GetRelativeToCurrentCell(n);
+                    const LinkedCell::LinkedNodes *OtherList = LC->GetRelativeToCurrentCell(n);
                     //Log() << Verbose(2) << "Current relative cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl;
                     if (OtherList != NULL) {
-                      for (LinkedNodes::const_iterator OtherRunner = OtherList->begin(); OtherRunner != OtherList->end(); OtherRunner++) {
+                      for (LinkedCell::LinkedNodes::const_iterator OtherRunner = OtherList->begin(); OtherRunner != OtherList->end(); OtherRunner++) {
                         if ((*OtherRunner)->nr > Walker->nr) {
                           OtherWalker = AtomMap[(*OtherRunner)->nr];
Index: src/tesselation.cpp
===================================================================
--- src/tesselation.cpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/tesselation.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -1019,4 +1019,61 @@
   BaseLine = NULL;
 };
+
+/** Checks validity of a given sphere of a candidate line.
+ * Sphere must touch all candidates and the baseline endpoints and there must be no other atoms inside.
+ * \param RADIUS radius of sphere
+ * \param *LC LinkedCell structure with other atoms
+ * \return true - sphere is valid, false - sphere contains other points
+ */
+bool CandidateForTesselation::CheckValidity(const double RADIUS, const LinkedCell *LC) const
+{
+  const double radiusSquared = RADIUS;
+  list<const Vector *> VectorList;
+  VectorList.push_back(&OptCenter);
+  VectorList.push_back(&OtherOptCenter);
+
+  // check baseline for OptCenter and OtherOptCenter being on sphere's surface
+  for (list<const Vector *>::const_iterator VRunner = VectorList.begin(); VRunner != VectorList.end(); ++VRunner) {
+    for (int i=0;i<2;i++)
+      if (fabs((*VRunner)->DistanceSquared(BaseLine->endpoints[i]->node->node) - radiusSquared) < MYEPSILON) {
+        DoeLog(1) && (eLog() << Verbose(1) << "Endpoint " << BaseLine->endpoints[i] << " is out of sphere at " << (*VRunner) << "." << endl);
+        return false;
+      }
+  }
+
+  // check Candidates for OptCenter and OtherOptCenter being on sphere's surface
+  for (TesselPointList::const_iterator Runner = pointlist.begin(); Runner != pointlist.begin(); ++Runner) {
+    const TesselPoint *Walker = *Runner;
+    for (list<const Vector *>::const_iterator VRunner = VectorList.begin(); VRunner != VectorList.end(); ++VRunner) {
+      if (fabs((*VRunner)->DistanceSquared(Walker->node) - radiusSquared) < MYEPSILON) {
+        DoeLog(1) && (eLog() << Verbose(1) << "Candidate " << Walker << " is out of sphere at " << (*VRunner) << "." << endl);
+        return false;
+      }
+    }
+  }
+
+  // check for no other points being inside the sphere
+  bool flag = true;
+  for (list<const Vector *>::const_iterator VRunner = VectorList.begin(); VRunner != VectorList.end(); ++VRunner) {
+    // get all points inside the sphere
+    TesselPointList *ListofPoints = LC->GetPointsInsideSphere(RADIUS, (*VRunner));
+    cout << Verbose(1) << "CheckValidity: There are " << ListofPoints->size() << " points inside the sphere at " << (*VRunner) << "." << endl;
+    // remove baseline's endpoints and candidates
+    for (int i=0;i<2;i++)
+      ListofPoints->remove(BaseLine->endpoints[i]->node);
+    for (TesselPointList::const_iterator Runner = pointlist.begin(); Runner != pointlist.begin(); ++Runner)
+      ListofPoints->remove(*Runner);
+    if (!ListofPoints->empty()) {
+      flag = false;
+      DoeLog(1) && (eLog() << Verbose(1) << "External atoms inside of sphere at " << (*VRunner) << ":" << endl);
+      for (TesselPointList::const_iterator Runner = ListofPoints->begin(); Runner != ListofPoints->begin(); ++Runner)
+        DoeLog(1) && (eLog() << Verbose(1) << "  " << *Runner << endl);
+    }
+    delete(ListofPoints);
+  }
+  return flag;
+};
+
+
 
 /** output operator for CandidateForTesselation.
@@ -2062,8 +2119,8 @@
     for (LC->n[(i+1)%NDIM]=0;LC->n[(i+1)%NDIM]<LC->N[(i+1)%NDIM];LC->n[(i+1)%NDIM]++)
       for (LC->n[(i+2)%NDIM]=0;LC->n[(i+2)%NDIM]<LC->N[(i+2)%NDIM];LC->n[(i+2)%NDIM]++) {
-        const LinkedNodes *List = LC->GetCurrentCell();
+        const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
         //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl;
         if (List != NULL) {
-          for (LinkedNodes::const_iterator Runner = List->begin();Runner != List->end();Runner++) {
+          for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin();Runner != List->end();Runner++) {
             if ((*Runner)->node->x[i] > maxCoordinate[i]) {
               Log() << Verbose(1) << "New maximal for axis " << i << " node is " << *(*Runner) << " at " << *(*Runner)->node << "." << endl;
@@ -2471,7 +2528,7 @@
 
   // go through all angle-sorted candidates (in degenerate n-nodes case we may have to add multiple triangles)
-  Log() << Verbose(0) << "List of Candidates for Turning Point: " << *TurningPoint << "." << endl;
+  Log() << Verbose(0) << "List of Candidates for Turning Point " << *TurningPoint << ":" << endl;
   for (TesselPointList::iterator TesselRunner = connectedClosestPoints->begin(); TesselRunner != connectedClosestPoints->end(); ++TesselRunner)
-    Log() << Verbose(0) << **TesselRunner << endl;
+    Log() << Verbose(0) << " " << **TesselRunner << endl;
   TesselPointList::iterator Runner = connectedClosestPoints->begin();
   TesselPointList::iterator Sprinter = Runner;
@@ -2809,8 +2866,8 @@
     for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
       for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
-        const LinkedNodes *List = LC->GetCurrentCell();
+        const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
         //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl;
         if (List != NULL) {
-          for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+          for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
             Candidate = (*Runner);
             // check if we only have one unique point yet ...
@@ -2968,8 +3025,8 @@
         for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
           for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
-            const LinkedNodes *List = LC->GetCurrentCell();
+            const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
             //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl;
             if (List != NULL) {
-              for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+              for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
                 Candidate = (*Runner);
 
@@ -3038,5 +3095,5 @@
                       } else {
                         if ((Candidate != NULL) && (CandidateLine.pointlist.begin() != CandidateLine.pointlist.end())) {
-                          Log() << Verbose(1) << "REJECT: Old candidate " << *(Candidate) << " with " << CandidateLine.ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " ." << endl;
+                          Log() << Verbose(1) << "REJECT: Old candidate " << *(CandidateLine.pointlist.begin()) << " with " << CandidateLine.ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " ." << endl;
                         } else {
                           Log() << Verbose(1) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl;
@@ -3069,5 +3126,11 @@
   }
 
-  Log() << Verbose(1) << "INFO: Sorting candidate list ..." << endl;
+  DoLog(1) && (Log() << Verbose(1) << "INFO: Checking whether sphere contains candidate list and baseline only ..." << endl);
+  if (!CandidateLine.CheckValidity(RADIUS, LC)) {
+    DoeLog(0) && (eLog() << Verbose(0) << "There were other points contained in the rolling sphere as well!" << endl);
+    performCriticalExit();
+  }
+
+  DoLog(1) && (Log() << Verbose(1) << "INFO: Sorting candidate list ..." << endl);
   if (CandidateLine.pointlist.size() > 1) {
     CandidateLine.pointlist.unique();
@@ -3135,8 +3198,8 @@
     for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
       for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
-        const LinkedNodes *List = LC->GetCurrentCell();
+        const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
         //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
         if (List != NULL) {
-          for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+          for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
             FindPoint = PointsOnBoundary.find((*Runner)->nr);
             if (FindPoint != PointsOnBoundary.end()) {
Index: src/tesselation.hpp
===================================================================
--- src/tesselation.hpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/tesselation.hpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -42,6 +42,6 @@
 
 #define DoTecplotOutput 1
-#define DoRaster3DOutput 1
-#define DoVRMLOutput 1
+#define DoRaster3DOutput 0
+#define DoVRMLOutput 0
 #define TecplotSuffix ".dat"
 #define Raster3DSuffix ".r3d"
@@ -251,4 +251,6 @@
   CandidateForTesselation(TesselPoint* candidate, BoundaryLineSet* currentBaseLine, Vector OptCandidateCenter, Vector OtherOptCandidateCenter);
   ~CandidateForTesselation();
+
+  bool CheckValidity(const double RADIUS, const LinkedCell *LC) const;
 
   TesselPointList pointlist;
Index: src/tesselationhelpers.cpp
===================================================================
--- src/tesselationhelpers.cpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/tesselationhelpers.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -578,8 +578,8 @@
     for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
       for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
-        const LinkedNodes *List = LC->GetCurrentCell();
+        const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
         //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
         if (List != NULL) {
-          for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+          for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
             helper.CopyVector(Point);
             helper.SubtractVector((*Runner)->node);
@@ -633,8 +633,8 @@
     for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
       for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
-        const LinkedNodes *List = LC->GetCurrentCell();
+        const LinkedCell::LinkedNodes *List = LC->GetCurrentCell();
         //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
         if (List != NULL) {
-          for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
+          for (LinkedCell::LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
             helper.CopyVector(Point);
             helper.SubtractVector((*Runner)->node);
Index: src/unittests/tesselation_boundarytriangleunittest.hpp
===================================================================
--- src/unittests/tesselation_boundarytriangleunittest.hpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/unittests/tesselation_boundarytriangleunittest.hpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -35,5 +35,5 @@
       class BoundaryLineSet *lines[3];
       class BoundaryPointSet *points[3];
-      LinkedNodes Corners;
+      LinkedCell::LinkedNodes Corners;
 };
 
Index: src/unittests/tesselation_insideoutsideunittest.cpp
===================================================================
--- src/unittests/tesselation_insideoutsideunittest.cpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/unittests/tesselation_insideoutsideunittest.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -133,5 +133,5 @@
   delete(LinkedList);
   delete(TesselStruct);
-  for (LinkedNodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) {
+  for (LinkedCell::LinkedNodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) {
     delete((*Runner)->node);
     delete(*Runner);
Index: src/unittests/tesselation_insideoutsideunittest.hpp
===================================================================
--- src/unittests/tesselation_insideoutsideunittest.hpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/unittests/tesselation_insideoutsideunittest.hpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -31,5 +31,5 @@
 private:
       class Tesselation *TesselStruct;
-      LinkedNodes Corners;
+      LinkedCell::LinkedNodes Corners;
       class LinkedCell *LinkedList;
 };
Index: src/unittests/tesselationunittest.cpp
===================================================================
--- src/unittests/tesselationunittest.cpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/unittests/tesselationunittest.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -101,5 +101,5 @@
   delete(LinkedList);
   delete(TesselStruct);
-  for (LinkedNodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) {
+  for (LinkedCell::LinkedNodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) {
     delete((*Runner)->node);
     delete(*Runner);
Index: src/unittests/tesselationunittest.hpp
===================================================================
--- src/unittests/tesselationunittest.hpp	(revision fe238cf71232d91769e9d08c5867eb5c16052491)
+++ src/unittests/tesselationunittest.hpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
@@ -34,5 +34,5 @@
 private:
       class Tesselation *TesselStruct;
-      LinkedNodes Corners;
+      LinkedCell::LinkedNodes Corners;
       class LinkedCell *LinkedList;
 };
