 
     } else if (flag0 && flag1 && !flag2) { // 3 new triangles have been spawned
 
-        if (numberOfKeptTriangles+triIdxOffs == 8233) {
-            printf("FLAG11\n");
-        }
-        if (numberOfKeptTriangles+triIdxOffs+1 == 8233) {
-            printf("FLAG12\n");
-        }
-        if (numberOfKeptTriangles+triIdxOffs+2 == 8233) {
-            printf("FLAG13\n");
-        }
-
-
         uint vNew0 = vertexCntOld + subDivEdgeIdxOffs_D[e0];
         uint vNew1 = vertexCntOld + subDivEdgeIdxOffs_D[e1];
 


        // #1
        w0 = v0;
        w1 = v2;
        w2 = vNew1;


        // This neighbor has to be determined by comparing vertex indices
         uint subDivCntN2 = subdivCnt_D[oldN2];
         if (subDivCntN2 > 0) {
             for (int i = 0; i < subDivCntN2; ++i) {
                 uint u0, u1, u2;
                 u0 = newTriangles_D[3*(newTriangleIdxOffsets[oldN2]+i)+0];
                 u1 = newTriangles_D[3*(newTriangleIdxOffsets[oldN2]+i)+1];
                 u2 = newTriangles_D[3*(newTriangleIdxOffsets[oldN2]+i)+2];
                 if (hasAdjEdge_D (w0, w1, w2, u0, u1, u2)) {
                     newTriangleNeighbors_D[3*(numberOfKeptTriangles+triIdxOffs)+3]=
                             numberOfKeptTriangles + newTriangleIdxOffsets[oldN2]+i;
                 }
             }
         } else {
             newTriangleNeighbors_D[3*(numberOfKeptTriangles+triIdxOffs)+3]=
                     oldTriangleIdxOffset[oldN2];
         }

         // This neighbor has to be determined by comparing vertex indices
         subDivCntN1 = subdivCnt_D[oldN1];



    } else if (flag0 && !flag1 && flag2) { // 3 new triangles have been spawned

        // Get index of neighbors of old triangle
        uint oldN0 = oldTriangleNeighbors_D[3*idx+0];
