diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseDict b/applications/utilities/mesh/advanced/collapseEdges/collapseDict
index 60f4cb2f43809aff6b09b4ab0057aec3b226ab9b..340c33049f621562390996a879b93070aa684186 100644
--- a/applications/utilities/mesh/advanced/collapseEdges/collapseDict
+++ b/applications/utilities/mesh/advanced/collapseEdges/collapseDict
@@ -17,7 +17,7 @@ FoamFile
 collapseEdgesCoeffs
 {
     // Edges shorter than this absolute value will be merged
-    minimumEdgeLength   1e-8;
+    minimumEdgeLength   1e-6;
 
     // The maximum angle between two edges that share a point attached to
     // no other edges
@@ -25,7 +25,7 @@ collapseEdgesCoeffs
 
     // The amount that minimumEdgeLength will be reduced by for each
     // edge if that edge's collapse generates a poor quality face
-    reductionFactor                         0.5;
+    reductionFactor     0.5;
 }
 
 
@@ -67,14 +67,17 @@ meshQualityCoeffs
 {
     // Name of the dictionary that has the mesh quality coefficients used
     // by motionSmoother::checkMesh
-    meshQualityCoeffDict    meshQualityDict;
+    #include                    "meshQualityDict";
+
+    // Maximum number of smoothing iterations for the reductionFactors
+    maximumSmoothingIterations  2;
 
     // Maximum number of outer iterations is mesh quality checking is enabled
-    maximumIterations       10;
+    maximumIterations           10;
 
     // Maximum number of iterations deletion of a point can cause a bad face
     // to be constructed before it is forced to not be deleted
-    maxPointErrorCount      5;
+    maxPointErrorCount          5;
 }
 
 
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/Make/options b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/Make/options
index f1db60d53ffc10f9c888abe43bf6cd36e525aa65..fe1283a73ae78fc7d2e4a354aafb19bae9ba3232 100644
--- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/Make/options
+++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/Make/options
@@ -1,5 +1,4 @@
 EXE_INC = \
-    /* -DFULLDEBUG -g -O0 */ \
     -I$(LIB_SRC)/meshTools/lnInclude \
     -I$(LIB_SRC)/dynamicMesh/lnInclude \
     -I$(LIB_SRC)/finiteVolume/lnInclude \
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C
index 7979fa966a5e193a58a0f24807245953fdcfb122..1b83599b31633309a0870dbd214139d25575182f 100644
--- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C
+++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C
@@ -26,12 +26,6 @@ License
 #include "patchToPoly2DMesh.H"
 #include "PatchTools.H"
 
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
-
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 void Foam::patchToPoly2DMesh::flipFaceOrder()
@@ -275,12 +269,9 @@ void Foam::patchToPoly2DMesh::createPolyMeshComponents()
     addPatchFacesToOwner();
 }
 
-// * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-//- Construct from a primitivePatch
 Foam::patchToPoly2DMesh::patchToPoly2DMesh
 (
     const MeshedSurface<face>& patch,
@@ -321,13 +312,5 @@ void Foam::patchToPoly2DMesh::createMesh()
     }
 }
 
-// * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
-
 
 // ************************************************************************* //
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H
index ea27dc6f53cf60c1bce164ca8a8f4308365dfc9d..b7c81e68a29ed9e9b1e3f2bd3eae35b97ae86fe6 100644
--- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H
+++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H
@@ -51,6 +51,7 @@ class patchToPoly2DMesh
 {
     // Private data
 
+        // Reference to the meshed surface
         const MeshedSurface<face>& patch_;
 
         const wordList& patchNames_;
@@ -62,11 +63,16 @@ class patchToPoly2DMesh
         const EdgeMap<label>& mapEdgesRegion_;
 
         pointField points_;
+
         faceList faces_;
+
         labelList owner_;
+
         labelList neighbour_;
 
-        //- Description of data_
+
+    // Private Member Functions
+
         void flipFaceOrder();
 
         void createNeighbours();
@@ -79,9 +85,6 @@ class patchToPoly2DMesh
 
         void createPolyMeshComponents();
 
-
-    // Private Member Functions
-
         //- Disallow default bitwise copy construct
         patchToPoly2DMesh(const patchToPoly2DMesh&);
 
@@ -110,47 +113,47 @@ public:
     // Member Functions
 
         // Access
-        pointField& points()
-        {
-            return points_;
-        }
-
-        faceList& faces()
-        {
-            return faces_;
-        }
-
-        labelList& owner()
-        {
-            return owner_;
-        }
-
-        labelList& neighbour()
-        {
-            return neighbour_;
-        }
-
-        const wordList& patchNames() const
-        {
-            return patchNames_;
-        }
-
-        const labelList& patchSizes() const
-        {
-            return patchSizes_;
-        }
-
-        const labelList& patchStarts() const
-        {
-            return patchStarts_;
-        }
-        // Check
 
-        // Edit
-        void createMesh();
+            pointField& points()
+            {
+                return points_;
+            }
+
+            faceList& faces()
+            {
+                return faces_;
+            }
+
+            labelList& owner()
+            {
+                return owner_;
+            }
+
+            labelList& neighbour()
+            {
+                return neighbour_;
+            }
+
+            const wordList& patchNames() const
+            {
+                return patchNames_;
+            }
 
-        // Write
+            const labelList& patchSizes() const
+            {
+                return patchSizes_;
+            }
+
+            const labelList& patchStarts() const
+            {
+                return patchStarts_;
+            }
+
+
+        // Edit
 
+            //- Create the mesh
+            void createMesh();
 };
 
 
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
index 088d0594f8ac2fa18514cd4fbffc4f43a30eb3c3..0b04d91b729aa9cf0938ada2756a569927aec3f7 100644
--- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
+++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
@@ -317,12 +317,12 @@ int main(int argc, char *argv[])
     }
 
     // Take over refinement levels and write to new time directory.
-    Pout<< "\nWriting extruded mesh to time = " << runTimeExtruded.timeName()
+    Info<< "\nWriting extruded mesh to time = " << runTimeExtruded.timeName()
         << nl << endl;
 
     mesh().write();
 
-    Pout<< "End\n" << endl;
+    Info<< "End\n" << endl;
 
     return 0;
 }
diff --git a/applications/utilities/surface/surfaceFeatureExtract/CGALPolyhedron/CGALPolyhedronRings.H b/applications/utilities/surface/surfaceFeatureExtract/CGALPolyhedron/CGALPolyhedronRings.H
index f5186c3a2544d7c019e8797754ee33014e988eb4..7aa4459e893d67b82107b05944ccfa6f406afb18 100644
--- a/applications/utilities/surface/surfaceFeatureExtract/CGALPolyhedron/CGALPolyhedronRings.H
+++ b/applications/utilities/surface/surfaceFeatureExtract/CGALPolyhedron/CGALPolyhedronRings.H
@@ -2,31 +2,31 @@
 #define CGAL_PSURF_RINGS_H_
 
 // This file adapted from
-//     CGAL-3.7/examples/Jet_fitting_3//PolyhedralSurf_rings.h
-// Licensed under CGAL-3.7/LICENSE.FREE_USE
+//     CGAL-4.0/examples/Jet_fitting_3/PolyhedralSurf_rings.h
+// Licensed under CGAL-4.0/LICENSE.FREE_USE
 
 // Copyright (c) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007
-// Utrecht University (The Netherlands), ETH Zurich (Switzerland), Freie
-// Universitaet Berlin (Germany), INRIA Sophia-Antipolis (France),
-// Martin-Luther-University Halle-Wittenberg (Germany), Max-Planck-Institute
-// Saarbruecken (Germany), RISC Linz (Austria), and Tel-Aviv University
-// (Israel).  All rights reserved.
-
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
+// Utrecht University (The Netherlands),
+// ETH Zurich (Switzerland),
+// INRIA Sophia-Antipolis (France),
+// Max-Planck-Institute Saarbruecken (Germany),
+// and Tel-Aviv University (Israel).  All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include <cassert>
 
diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H
index a50d5e3995e295819fd06a0563d24f88ac65d00b..7309af83e1dfbeb4f84b0eeca5d9c57b933df44d 100644
--- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H
+++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H
@@ -25,7 +25,8 @@ Class
     Foam::dynamicIndexedOctree
 
 Description
-    Non-pointer based hierarchical recursive searching
+    Non-pointer based hierarchical recursive searching.
+    Storage is dynamic, so elements can be deleted.
 
 SourceFiles
     dynamicIndexedOctree.C
@@ -451,6 +452,7 @@ public:
             );
         }
 
+
     // Member Functions
 
         // Access
@@ -656,6 +658,7 @@ public:
 
             label removeIndex(const label nodIndex, const label index);
 
+
         // Write
 
             //- Print tree. Either print all indices (printContent = true) or
@@ -671,6 +674,7 @@ public:
 
             void writeTreeInfo() const;
 
+
     // IOstream Operators
 
         friend Ostream& operator<< <Type>
diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.H b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.H
index 135a52520caadac3d84b2c3d00c99a69c7244fb4..4332ea674b334532dac98413f93258fc61d6b3ef 100644
--- a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.H
+++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.H
@@ -25,6 +25,10 @@ Class
     Foam::polyMeshFilter
 
 Description
+    Filter the edges and faces of a polyMesh whilst satisfying the given mesh
+    quality criteria.
+
+    Works on a copy of the mesh.
 
 SourceFiles
     polyMeshFilter.C
@@ -102,10 +106,10 @@ class polyMeshFilter
         //  faces
         const scalar faceReductionFactor_;
 
-        //-
+        //- Maximum number of times a deleted point can be associated with the
+        //  creation of a bad face it is forced to be kept.
         const label maxPointErrorCount_;
 
-
         //- The minimum edge length for each edge
         scalarField minEdgeLen_;
 
@@ -225,6 +229,7 @@ public:
             //- Filter edges only.
             label filterEdges(const label nOriginalBadFaces);
 
+            //- Filter all faces that are in the face zone indirectPatchFaces
             label filterIndirectPatchFaces();
 };
 
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H
index 02359f39aca6ff10b1612b1e694895ee20d6bd38..dc6b1578c15764e302a2297dac48a7253b0f7e53 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H
@@ -61,7 +61,7 @@ class face;
 class edge;
 
 /*---------------------------------------------------------------------------*\
-                           Class edgeCollapser Declaration
+                        Class edgeCollapser Declaration
 \*---------------------------------------------------------------------------*/
 
 class edgeCollapser
@@ -84,12 +84,18 @@ private:
         //- Reference to mesh
         const polyMesh& mesh_;
 
+        //- Controls collapse of a face to an edge
         const scalar guardFraction_;
 
+        //- Only collapse face to a point if high aspect ratio
         const scalar maxCollapseFaceToPointSideLengthCoeff_;
 
+        //- Allow a face to be collapsed to a point early, before the test
+        //  to collapse to an edge
         const Switch allowEarlyCollapseToPoint_;
 
+        //- Fraction of maxCollapseFaceToPointSideLengthCoeff_ to use when
+        //  allowEarlyCollapseToPoint_ is on
         const scalar allowEarlyCollapseCoeff_;
 
 
@@ -266,8 +272,8 @@ public:
                 const dictionary& meshQualityDict
             );
 
-            // Check mesh and mark points on faces in error
-            // Returns boolList with points in error set
+            //- Check mesh and mark points on faces in error
+            //  Returns boolList with points in error set
             static label checkMeshQuality
             (
                 const polyMesh& mesh,
@@ -300,7 +306,7 @@ public:
                 polyTopoChange& meshMod
             ) const;
 
-            // Mark (in collapseEdge) any edges to collapse
+            //- Mark (in collapseEdge) any edges to collapse
             label markSmallEdges
             (
                 const scalarField& minEdgeLen,
@@ -309,7 +315,7 @@ public:
                 Map<point>& collapsePointToLocation
             ) const;
 
-            // Mark (in collapseEdge) any edges to merge
+            //- Mark (in collapseEdge) any edges to merge
             label markMergeEdges
             (
                 const scalar maxCos,
@@ -332,6 +338,7 @@ public:
                 Map<point>& collapsePointToLocation
             ) const;
 
+            //- Marks edges in the faceZone indirectPatchFaces for collapse
             void markIndirectPatchFaces
             (
                 PackedBoolList& collapseEdge,