diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C
index f686180195910ff23cce0a3429effbb139975222..6e81ff9f0b19d64d9e1a8486b311762ef7730719 100644
--- a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C
+++ b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C
@@ -28,7 +28,8 @@ Description
     Work in progress! Handles ascii multiblock (and optionally singleBlock)
     format.
     By default expects blanking. Use -noBlank if none.
-    Use -2D <thickness> if 2D.
+    Use -2D @a thickness if 2D.
+
     Niklas Nordin has experienced a problem with lefthandedness of the blocks.
     The code should detect this automatically - see hexBlock::readPoints but
     if this goes wrong just set the blockHandedness_ variable to 'right'
diff --git a/applications/utilities/mesh/generation/blockMesh/Make/files b/applications/utilities/mesh/generation/blockMesh/Make/files
index af92bf759cdc04732bd0f854903f671f19db5a48..81f5f3674918295d0a0f8c5c2fcc141e089886e1 100644
--- a/applications/utilities/mesh/generation/blockMesh/Make/files
+++ b/applications/utilities/mesh/generation/blockMesh/Make/files
@@ -26,6 +26,6 @@ blockPoints.C
 blockCells.C
 blockBoundary.C
 
-genBlockMesh.C
+blockMeshApp.C
 
 EXE = $(FOAM_APPBIN)/blockMesh
diff --git a/applications/utilities/mesh/generation/blockMesh/genBlockMesh.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
similarity index 100%
rename from applications/utilities/mesh/generation/blockMesh/genBlockMesh.C
rename to applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
index c54cc2d45db4c4dacf83e22bd97d19faf457dc14..c097562a53a989c0abc152fd95247f0a8c8fcc20 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
@@ -90,52 +90,6 @@
             <BooleanDomain name="bool"/>
         </IntVectorProperty>
 
-<!-- Time step edit box -->
-<!-- OLESEN
-<IntVectorProperty
-            name="TimeStepRangeInfo"
-            command="GetTimeStepRange"
-            information_only="1">
-            <SimpleIntInformationHelper/>
-        </IntVectorProperty>
-        <IntVectorProperty
-            name="TimeStep"
-            command="SetTimeStep"
-            number_of_elements="1"
-            animateable="1"
-            default_values="0"
-            information_property="TimestepValues">
-            <IntRangeDomain
-                name="range">
-                <RequiredProperties>
-                    <Property name="TimeStepRangeInfo"
-                              function="Range"/>
-                </RequiredProperties>
-            </IntRangeDomain>
-        </IntVectorProperty>
--->
-
-<!-- Time step limits boxes -->
-<!--        <IntVectorProperty
-            name="TimeStepLimitsInfo"
-            command="GetTimeStepLimits"
-            information_only="1">
-            <SimpleIntInformationHelper/>
-        </IntVectorProperty>
-        <IntVectorProperty
-            name="TimeStepLimits"
-            command="SetTimeStepLimits"
-            number_of_elements="2"
-            default_values="2 5" >
-            <IntRangeDomain
-                name="range">
-                <RequiredProperties>
-                    <Property name="TimeStepLimitsInfo"
-                              function="Range"/>
-                </RequiredProperties>
-            </IntRangeDomain>
-        </IntVectorProperty>-->
-
 <!-- Available regions array -->
         <StringVectorProperty
             name="RegionArrayInfo"
@@ -233,7 +187,9 @@
         </StringVectorProperty>
 
 <!-- Available times array -->
-<!--        <StringVectorProperty
+<!-- PV3FOAM_TIMESELECTION must be defined when compiling vtkPV3Foam
+     might discard this in the future
+        <StringVectorProperty
             name="TimeArrayInfo"
             information_only="1">
             <ArraySelectionInformationHelper
@@ -255,6 +211,8 @@
                 </RequiredProperties>
             </ArraySelectionDomain>
         </StringVectorProperty>
+
+PV3FOAM_TIMESELECTION
 -->
 
     </SourceProxy>
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options
index b40ecb51d71299823066b9b2278542c40daa0151..2cebe5511260b4c8a1ee47cfe4a3305e70cc5f9a 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options
@@ -1,4 +1,5 @@
 EXE_INC = \
+    /* -DPV3FOAM_TIMESELECTION */ \
     -I$(LIB_SRC)/finiteVolume/lnInclude \
     -I$(LIB_SRC)/lagrangian/basic/lnInclude \
     -I$(LIB_SRC)/meshTools/lnInclude \
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
index 678ae8e9588981fadb579da34f89849d20eda948..7699e94cf25bff1046d5acaffa1932a17939159b 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
@@ -27,8 +27,6 @@ License
 #include "vtkPV3Foam.H"
 
 // Foam includes
-#include "argList.H"
-#include "JobInfo.H"
 #include "Time.H"
 #include "fvMesh.H"
 #include "IOobjectList.H"
@@ -176,11 +174,7 @@ void Foam::vtkPV3Foam::resetCounters()
 
 void Foam::vtkPV3Foam::initializeTime()
 {
-    if (debug)
-    {
-        Info<< "entered Foam::vtkPV3Foam::initializeTime" << endl;
-    }
-
+#ifdef PV3FOAM_TIMESELECTION
     Time& runTime = dbPtr_();
 
     // Get times list
@@ -206,6 +200,7 @@ void Foam::vtkPV3Foam::initializeTime()
             times[timeI].name().c_str()
         );
     }
+#endif /* PV3FOAM_TIMESELECTION */
 }
 
 
@@ -213,8 +208,8 @@ bool Foam::vtkPV3Foam::setTime(const double& requestedTime)
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::setTime("
-            << requestedTime << ")" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::setTime(" << requestedTime << ")"
+            << endl;
     }
 
     Time& runTime = dbPtr_();
@@ -249,12 +244,14 @@ bool Foam::vtkPV3Foam::setTime(const double& requestedTime)
         found = true;
     }
 
+    runTime.setTime(times[nearestIndex], nearestIndex);
+
     if (debug)
     {
-        Info<< "Selecting time " << times[nearestIndex].name() << endl;
+        Info<< "<end> Foam::vtkPV3Foam::setTime() - selected time "
+            << times[nearestIndex].name() << endl;
     }
 
-    runTime.setTime(times[nearestIndex], nearestIndex);
     return found;
 }
 
@@ -263,7 +260,7 @@ void Foam::vtkPV3Foam::updateSelectedRegions()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateSelectedRegions" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateSelectedRegions" << endl;
     }
 
     vtkDataArraySelection* arraySelection = reader_->GetRegionSelection();
@@ -281,10 +278,15 @@ void Foam::vtkPV3Foam::updateSelectedRegions()
 
         if (debug)
         {
-            Info<< "region " << regionId
-                << " = " << selectedRegions_[regionId] << endl;
+            Info<< "  region[" << regionId << "] = "
+                << selectedRegions_[regionId]
+                << " : " << arraySelection->GetArrayName(regionId) << endl;
         }
     }
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateSelectedRegions" << endl;
+    }
 }
 
 
@@ -294,13 +296,14 @@ Foam::stringList Foam::vtkPV3Foam::getSelectedArrayEntries
     const bool firstWord
 )
 {
+    stringList selections(arraySelection->GetNumberOfArrays());
+    label nElem = 0;
+
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::getSelectedArrayEntries" << endl;
+        Info << "selections(";
     }
 
-    stringList selections(arraySelection->GetNumberOfArrays());
-    label nElem = 0;
     forAll (selections, elemI)
     {
         if (arraySelection->GetArraySetting(elemI))
@@ -316,16 +319,22 @@ Foam::stringList Foam::vtkPV3Foam::getSelectedArrayEntries
             {
                 selections[nElem] = arraySelection->GetArrayName(elemI);
             }
+
+            if (debug)
+            {
+                Info << " " << selections[nElem];
+            }
+
             ++nElem;
         }
     }
 
-    selections.setSize(nElem);
     if (debug)
     {
-        Info<< "Active array: " << selections << endl;
+        Info << " )" << endl;
     }
 
+    selections.setSize(nElem);
     return selections;
 }
 
@@ -337,14 +346,14 @@ Foam::stringList Foam::vtkPV3Foam::getSelectedArrayEntries
     const bool firstWord
 )
 {
+    stringList selections(selector.size());
+    label nElem = 0;
+
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::getSelectedArrayEntries" << endl;
+        Info << "selections(";
     }
 
-    stringList selections(selector.size());
-    label nElem = 0;
-
     for
     (
         int regionId = selector.start();
@@ -366,16 +375,22 @@ Foam::stringList Foam::vtkPV3Foam::getSelectedArrayEntries
                 selections[nElem] = arraySelection->GetArrayName(regionId);
             }
 
+            if (debug)
+            {
+                Info << " " << selections[nElem];
+            }
+
             ++nElem;
         }
     }
 
-    selections.setSize(nElem);
     if (debug)
     {
-        Info<< "Active array: " << selections << endl;
+        Info << " )" << endl;
     }
 
+
+    selections.setSize(nElem);
     return selections;
 }
 
@@ -386,9 +401,9 @@ void Foam::vtkPV3Foam::setSelectedArrayEntries
     const stringList& selections
 )
 {
-    if (debug)
+    if (debug > 1)
     {
-        Info<< "entered Foam::vtkPV3Foam::setSelectedArrayEntries" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::setSelectedArrayEntries" << endl;
     }
     const label nEntries = arraySelection->GetNumberOfArrays();
 
@@ -398,7 +413,7 @@ void Foam::vtkPV3Foam::setSelectedArrayEntries
     // Loop through entries, setting values from selectedEntries
     forAll (selections, elemI)
     {
-        if (debug)
+        if (debug > 1)
         {
             Info<< "selections[" << elemI << "] = " << selections[elemI]
                 << endl;
@@ -410,7 +425,7 @@ void Foam::vtkPV3Foam::setSelectedArrayEntries
 
             if (arrayName == selections[elemI])
             {
-                if (debug)
+                if (debug > 1)
                 {
                     Info<< "enabling array: " << arrayName << " Index = "
                         << i
@@ -425,6 +440,10 @@ void Foam::vtkPV3Foam::setSelectedArrayEntries
             }
         }
     }
+    if (debug > 1)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::setSelectedArrayEntries" << endl;
+    }
 }
 
 
@@ -455,8 +474,7 @@ Foam::vtkPV3Foam::vtkPV3Foam
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::vtkPV3Foam with "
-            << FileName << endl;
+        Info<< "Foam::vtkPV3Foam::vtkPV3Foam - " << FileName << endl;
     }
 
     // avoid argList and get rootPath/caseName directly from the file
@@ -471,6 +489,22 @@ Foam::vtkPV3Foam::vtkPV3Foam
         fullCasePath = cwd();
     }
 
+    // Set the case as an environment variable - some BCs might use this
+    if (fullCasePath.name().find("processor", 0) == 0)
+    {
+        setEnv("FOAM_CASE", fullCasePath.path(), true);
+    }
+    else
+    {
+        setEnv("FOAM_CASE", fullCasePath, true);
+    }
+
+    if (debug)
+    {
+        Info<< "fullCasePath=" << fullCasePath << nl
+            << "FOAM_CASE=" << getEnv("FOAM_CASE") << endl;
+    }
+
     // Create time object
     dbPtr_.reset
     (
@@ -504,7 +538,7 @@ Foam::vtkPV3Foam::~vtkPV3Foam()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::~vtkPV3Foam" << endl;
+        Info<< "<end> Foam::vtkPV3Foam::~vtkPV3Foam" << endl;
     }
 
     if (meshPtr_)
@@ -521,7 +555,7 @@ void Foam::vtkPV3Foam::UpdateInformation()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::UpdateInformation" << nl
+        Info<< "<beg> Foam::vtkPV3Foam::UpdateInformation - "
             << "TimeStep = " << reader_->GetTimeStep() << endl;
     }
 
@@ -575,6 +609,12 @@ void Foam::vtkPV3Foam::UpdateInformation()
 
     // Update lagrangian field array
     updateInformationLagrangianFields();
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::UpdateInformation" << endl;
+    }
+
 }
 
 
@@ -585,8 +625,8 @@ void Foam::vtkPV3Foam::Update
 {
     if (debug)
     {
-        cout<< "entered Foam::vtkPV3Foam::Update" << nl
-             <<"Update\n";
+        cout<< "<beg> Foam::vtkPV3Foam::Update" << nl
+            <<"Update\n";
         output->Print(cout);
 
         cout<<"Internally:\n";
@@ -596,7 +636,6 @@ void Foam::vtkPV3Foam::Update
     }
 
 
-
     // Set up region selection(s)
     updateSelectedRegions();
 
@@ -673,15 +712,16 @@ double* Foam::vtkPV3Foam::timeSteps(int& nTimeSteps)
     int nTimes = 0;
     double* ts = NULL;
 
-    vtkDataArraySelection* arraySelection = reader_->GetTimeSelection();
-
     if (dbPtr_.valid())
     {
         Time& runTime = dbPtr_();
 
         instantList times = runTime.times();
+
+#ifdef PV3FOAM_TIMESELECTION
         List<bool> selected = List<bool>(times.size(), false);
 
+        vtkDataArraySelection* arraySelection = reader_->GetTimeSelection();
         const label nSelectedTimes = arraySelection->GetNumberOfArrays();
 
         for (int i = 0; i < nSelectedTimes; ++i)
@@ -694,20 +734,21 @@ double* Foam::vtkPV3Foam::timeSteps(int& nTimeSteps)
              && timeI < times.size()
             )
             {
-#if 0
-                Info<<"timeSelection["
-                    << i
-                    <<"] = "
-                    << arraySelection->GetArraySetting(i)
-                    << " is "
-                    << arraySelection->GetArrayName(i) << endl;
-#endif
+                if (debug > 1)
+                {
+                    Info<<"timeSelection["
+                        << i
+                        <<"] = "
+                        << arraySelection->GetArraySetting(i)
+                            << " is "
+                        << arraySelection->GetArrayName(i) << endl;
+                }
                 selected[timeI] = true;
                 ++nTimes;
             }
         }
 
-        if (debug)
+        if (debug > 1)
         {
             Info<< "selected " << nTimes << " times ";
             Info<< "found " << times.size() << " times: (";
@@ -732,6 +773,27 @@ double* Foam::vtkPV3Foam::timeSteps(int& nTimeSteps)
                 }
             }
         }
+
+#else /* PV3FOAM_TIMESELECTION */
+        // always skip "constant" time, unless there are no other times
+        nTimes = times.size();
+        label timeI = 0;
+
+        if (nTimes > 1)
+        {
+            timeI = 1;
+            --nTimes;
+        }
+
+        if (nTimes)
+        {
+            ts = new double[nTimes];
+            for (label stepI = 0; stepI < nTimes; ++stepI, ++timeI)
+            {
+                ts[stepI] = times[timeI].value();
+            }
+        }
+#endif /* PV3FOAM_TIMESELECTION */
     }
     else
     {
@@ -741,7 +803,7 @@ double* Foam::vtkPV3Foam::timeSteps(int& nTimeSteps)
         }
     }
 
-    // return length via the parameter
+    // return vector length via the parameter
     nTimeSteps = nTimes;
 
     return ts;
@@ -755,7 +817,7 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
 
     if (debug)
     {
-        Info<< "addPatchNames()" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::addPatchNames" << endl;
     }
 
     const fvMesh& mesh = *meshPtr_;
@@ -773,7 +835,7 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
 
     if (debug)
     {
-        Info<<"patches: " << selectedPatches <<endl;
+        Info<<"... add patches: " << selectedPatches <<endl;
     }
 
     // Find the total number of zones
@@ -787,7 +849,7 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
 
     if (debug)
     {
-        Info<< "determining patch zones" << endl;
+        Info<< "... determining patch zones" << endl;
     }
 
     // Loop through all patches to determine zones, and centre of each zone
@@ -926,6 +988,11 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
 
     // Resize the patch names list to the actual number of patch names added
     patchTextActorsPtrs_.setSize(globalZoneI);
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::addPatchNames)" << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFaceSetMesh.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFaceSetMesh.C
index 3de4b9c5d1685c45003d3c16d83bec4e37c6b027..116f503a4dbcfd841e137838f2331440b3b27065 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFaceSetMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFaceSetMesh.C
@@ -48,7 +48,7 @@ void Foam::vtkPV3Foam::addFaceSetMesh
 {
     if (debug)
     {
-        Info<< "entered add face set internal mesh" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::addFaceSetMesh" << endl;
     }
 
     // Construct primitivePatch of faces in fSet.
@@ -96,6 +96,11 @@ void Foam::vtkPV3Foam::addFaceSetMesh
 
     vtkmesh->SetPolys(vtkcells);
     vtkcells->Delete();
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::addFaceSetMesh" << endl;
+    }
 }
 
 // ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFaceZoneMesh.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFaceZoneMesh.C
index 008caece7ca433922e07df4be05676237ee04007..044d4cedaf942ee56941fd1d830ca702ccd84fc7 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFaceZoneMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFaceZoneMesh.C
@@ -47,7 +47,7 @@ void Foam::vtkPV3Foam::addFaceZoneMesh
 {
     if (debug)
     {
-        Info<< "entered addFaceZoneMesh" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::addFaceZoneMesh" << endl;
     }
 
     // Construct primitivePatch of faces in fSet.
@@ -94,6 +94,11 @@ void Foam::vtkPV3Foam::addFaceZoneMesh
 
     vtkmesh->SetPolys(vtkcells);
     vtkcells->Delete();
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::addFaceZoneMesh" << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFields.H b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFields.H
index 3c6580d1d3dac825eb78ecdc29f509187d95c9d9..ff6c48bfe5a0082e20c2850e043f354336a039df 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddFields.H
@@ -64,7 +64,7 @@ Foam::label Foam::vtkPV3Foam::addFields
         {
             if (debug)
             {
-                Info<<"add region " << GeoField::typeName
+                Info<<"    addField to GUI " << GeoField::typeName
                     << ":" << fields[fieldI] << endl;
             }
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddLagrangianMesh.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddLagrangianMesh.C
index b1f3099acd1882d11ba04bd801010d68ae874407..d4d31aa3cca1a62371b4bd85d61a737ab52f384f 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddLagrangianMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddLagrangianMesh.C
@@ -50,7 +50,7 @@ void Foam::vtkPV3Foam::addLagrangianMesh
 {
     if (debug)
     {
-        Info<< "entered add Lagrangian mesh with timePath "
+        Info<< "<beg> Foam::vtkPV3Foam::addLagrangianMesh - timePath "
             << mesh.time().timePath()/"lagrangian" << endl;
     }
 
@@ -61,7 +61,7 @@ void Foam::vtkPV3Foam::addLagrangianMesh
 
     if (debug && cloudDirs.size())
     {
-        Info<< "check cloudDirs: " << cloudDirs << endl;
+        Info<< "... check cloudDirs: " << cloudDirs << endl;
     }
 
     bool foundCloud = false;
@@ -99,6 +99,11 @@ void Foam::vtkPV3Foam::addLagrangianMesh
             vtkpoints->Delete();
         }
     }
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::addLagrangianMesh" << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPatchMesh.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPatchMesh.C
index e23ff924159104abb6f260f4c703c7a51225fbfd..37392c905f71414fa0d88cf1bcf4f19cb2de724a 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPatchMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPatchMesh.C
@@ -48,7 +48,7 @@ void Foam::vtkPV3Foam::addPatchMesh
 {
     if (debug)
     {
-        Info<< "Adding patch: " << p.name() << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::addPatchMesh - " << p.name() << endl;
     }
 
     // Convert Foam mesh vertices to VTK
@@ -84,6 +84,11 @@ void Foam::vtkPV3Foam::addPatchMesh
 
     vtkmesh->SetPolys(vtkcells);
     vtkcells->Delete();
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::addPatchMesh - " << p.name() << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPointSetMesh.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPointSetMesh.C
index 3567b6827f7d8f276e395a4bfb8ea6bfa532d70c..4a19fab3d4d411a4053a53259d0940c6d98638e2 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPointSetMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPointSetMesh.C
@@ -47,7 +47,7 @@ void Foam::vtkPV3Foam::addPointSetMesh
 {
     if (debug)
     {
-        Info<< "entered add point set mesh" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::addPointSetMesh" << endl;
     }
 
     const pointField& meshPoints = mesh.points();
@@ -62,6 +62,11 @@ void Foam::vtkPV3Foam::addPointSetMesh
 
     vtkmesh->SetPoints(vtkpoints);
     vtkpoints->Delete();
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::addPointSetMesh" << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPointZoneMesh.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPointZoneMesh.C
index 51d735a79b485c220473f0a8771f3c212319c1c8..f6369bfa238fb387df1dc3db3f7e0e73b66d4ce4 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPointZoneMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddPointZoneMesh.C
@@ -46,7 +46,7 @@ void Foam::vtkPV3Foam::addPointZoneMesh
 {
     if (debug)
     {
-        Info<< "entered add point zone mesh" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::addPointZoneMesh" << endl;
     }
 
     const pointField& meshPoints = mesh.points();
@@ -61,6 +61,11 @@ void Foam::vtkPV3Foam::addPointZoneMesh
 
     vtkmesh->SetPoints(vtkpoints);
     vtkpoints->Delete();
+
+    if (debug)
+    {
+        Info<< "<beg> Foam::vtkPV3Foam::addPointZoneMesh" << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddVolumeMesh.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddVolumeMesh.C
index c86dbec1dae85eccb4e2d58027aec3efd67a4ec4..5de9114eef42d6c056807e7f53df80cb581fe8ac 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddVolumeMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddVolumeMesh.C
@@ -54,7 +54,7 @@ void Foam::vtkPV3Foam::addVolumeMesh
 {
     if (debug)
     {
-        Info<< "entered add volume mesh" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::addVolumeMesh" << endl;
     }
 
     // Number of additional points needed by the decomposition of polyhedra
@@ -74,13 +74,13 @@ void Foam::vtkPV3Foam::addVolumeMesh
     // and cells
     if (debug)
     {
-        Info<< "building cell-shapes" << endl;
+        Info<< "... building cell-shapes" << endl;
     }
     const cellShapeList& cellShapes = mesh.cellShapes();
 
     if (debug)
     {
-        Info<< "scanning" << endl;
+        Info<< "... scanning" << endl;
     }
     forAll(cellShapes, cellI)
     {
@@ -133,7 +133,7 @@ void Foam::vtkPV3Foam::addVolumeMesh
 
     if (debug)
     {
-        Info<< "converting points" << endl;
+        Info<< "... converting points" << endl;
     }
 
     // Convert Foam mesh vertices to VTK
@@ -150,7 +150,7 @@ void Foam::vtkPV3Foam::addVolumeMesh
 
     if (debug)
     {
-        Info<< "converting cells" << endl;
+        Info<< "... converting cells" << endl;
     }
 
     vtkmesh->Allocate(mesh.nCells() + nAddCells);
@@ -350,6 +350,11 @@ void Foam::vtkPV3Foam::addVolumeMesh
 
     vtkmesh->SetPoints(vtkpoints);
     vtkpoints->Delete();
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::addVolumeMesh" << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamConvertMesh.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamConvertMesh.C
index 4c5f1a10ea0adda7010dbe84faeda15a49aaca96..47239f02d716915e97f92061f0a628d2a0e55631 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamConvertMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamConvertMesh.C
@@ -50,7 +50,7 @@ void Foam::vtkPV3Foam::convertMeshVolume
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshVolume" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshVolume" << endl;
     }
 
     const selectionInfo& selector = selectInfoVolume_;
@@ -88,6 +88,11 @@ void Foam::vtkPV3Foam::convertMeshVolume
         selectedRegionDatasetIds_[regionId] = datasetId;
         vtkmesh->Delete();
     }
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshVolume" << endl;
+    }
 }
 
 
@@ -98,7 +103,7 @@ void Foam::vtkPV3Foam::convertMeshLagrangian
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshLagrangian" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshLagrangian" << endl;
     }
 
     const selectionInfo& selector = selectInfoLagrangian_;
@@ -131,6 +136,10 @@ void Foam::vtkPV3Foam::convertMeshLagrangian
         selectedRegionDatasetIds_[regionId] = datasetId;
         vtkmesh->Delete();
     }
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshLagrangian" << endl;
+    }
 }
 
 
@@ -141,7 +150,7 @@ void Foam::vtkPV3Foam::convertMeshPatches
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshPatches" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshPatches" << endl;
     }
 
     const selectionInfo& selector = selectInfoPatches_;
@@ -196,6 +205,11 @@ void Foam::vtkPV3Foam::convertMeshPatches
             vtkmesh->Delete();
         }
     }
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshPatches" << endl;
+    }
 }
 
 
@@ -206,7 +220,7 @@ void Foam::vtkPV3Foam::convertMeshCellZones
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshCellZones" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshCellZones" << endl;
     }
 
     const selectionInfo& selector = selectInfoCellZones_;
@@ -263,6 +277,11 @@ void Foam::vtkPV3Foam::convertMeshCellZones
             vtkmesh->Delete();
         }
     }
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshCellZones" << endl;
+    }
 }
 
 
@@ -273,7 +292,7 @@ void Foam::vtkPV3Foam::convertMeshCellSet
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshCellSet" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshCellSet" << endl;
     }
 
     const selectionInfo& selector = selectInfoCellSets_;
@@ -337,6 +356,11 @@ void Foam::vtkPV3Foam::convertMeshCellSet
             vtkmesh->Delete();
         }
     }
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshCellSet" << endl;
+    }
 }
 
 void Foam::vtkPV3Foam::convertMeshFaceZones
@@ -346,7 +370,7 @@ void Foam::vtkPV3Foam::convertMeshFaceZones
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshFaceZones" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshFaceZones" << endl;
     }
 
     const selectionInfo& selector = selectInfoFaceZones_;
@@ -393,6 +417,11 @@ void Foam::vtkPV3Foam::convertMeshFaceZones
             vtkmesh->Delete();
         }
     }
+    
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshFaceZones" << endl;
+    }
 }
 
 
@@ -403,7 +432,7 @@ void Foam::vtkPV3Foam::convertMeshFaceSet
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshFaceSet" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshFaceSet" << endl;
     }
 
     const selectionInfo& selector = selectInfoFaceSets_;
@@ -458,6 +487,11 @@ void Foam::vtkPV3Foam::convertMeshFaceSet
             vtkmesh->Delete();
         }
     }
+    
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshFaceSet" << endl;
+    }
 }
 
 
@@ -468,7 +502,7 @@ void Foam::vtkPV3Foam::convertMeshPointZones
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshPointZones" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshPointZones" << endl;
     }
 
     const selectionInfo& selector = selectInfoPointZones_;
@@ -498,7 +532,7 @@ void Foam::vtkPV3Foam::convertMeshPointZones
             const label datasetId = GetNumberOfDataSets(output, selector);
 
             vtkPolyData* vtkmesh = vtkPolyData::New();
-            
+
             addPointZoneMesh
             (
                 mesh,
@@ -515,6 +549,11 @@ void Foam::vtkPV3Foam::convertMeshPointZones
             vtkmesh->Delete();
         }
     }
+    
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshPointZones" << endl;
+    }
 }
 
 
@@ -526,7 +565,7 @@ void Foam::vtkPV3Foam::convertMeshPointSet
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::convertMeshPointSet" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::convertMeshPointSet" << endl;
     }
 
     const selectionInfo& selector = selectInfoPointSets_;
@@ -581,7 +620,11 @@ void Foam::vtkPV3Foam::convertMeshPointSet
             vtkmesh->Delete();
         }
     }
+    
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::convertMeshPointSet" << endl;
+    }
 }
 
-
 // ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamConvertPointFields.H b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamConvertPointFields.H
index 28d7fdfe5d0a8f2ab1bdbc9bc7c4769015c11592..d26a0eb3658b94478e185656e86ac9170240cc9d 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamConvertPointFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamConvertPointFields.H
@@ -66,7 +66,7 @@ void Foam::vtkPV3Foam::convertPointFields
 
                 if (debug)
                 {
-                    Info<< "converting Foam point field: " << fieldName
+                    Info<< "Foam::vtkPV3Foam::convertPointFields : " << fieldName
                         << endl;
                 }
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdate.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdate.C
index 861a8573ac1687fd6802154ae8845ff5661fd564..85493b933ee384c781ce0e8c99e53ddc85b553de 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdate.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdate.C
@@ -47,13 +47,16 @@ void Foam::vtkPV3Foam::updateFoamMesh()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateFoamMesh" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateFoamMesh" << endl;
     }
 
     if
     (
         !reader_->GetCacheMesh()
+#ifdef PV3FOAM_TIMESELECTION
+        // This is only useful if the times are individually selectable
      || reader_->GetTimeSelection()->GetArraySetting(0)
+#endif
     )
     {
         delete meshPtr_;
@@ -84,6 +87,11 @@ void Foam::vtkPV3Foam::updateFoamMesh()
             Info<< "Using existing Foam mesh" << endl;
         }
     }
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateFoamMesh" << endl;
+    }
 }
 
 
@@ -94,7 +102,7 @@ void Foam::vtkPV3Foam::updateVolFields
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateVolFields" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateVolFields" << endl;
     }
 
     const fvMesh& mesh = *meshPtr_;
@@ -155,6 +163,11 @@ void Foam::vtkPV3Foam::updateVolFields
     (
         mesh, pInterp, ppInterpList, objects, arraySelection, output
     );
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateVolFields" << endl;
+    }
 }
 
 
@@ -165,7 +178,7 @@ void Foam::vtkPV3Foam::updatePointFields
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updatePointFields" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updatePointFields" << endl;
     }
 
     const fvMesh& mesh = *meshPtr_;
@@ -175,11 +188,6 @@ void Foam::vtkPV3Foam::updatePointFields
 
     vtkDataArraySelection* arraySelection = reader_->GetPointFieldSelection();
 
-    // Convert point fields
-    if (debug)
-    {
-        Info<< "converting Foam point fields" << endl;
-    }
 /*
     convertPointFields<Foam::label>
     (
@@ -206,6 +214,11 @@ void Foam::vtkPV3Foam::updatePointFields
     (
         mesh, objects, arraySelection, output
     );
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updatePointFields" << endl;
+    }
 }
 
 
@@ -216,7 +229,7 @@ void Foam::vtkPV3Foam::updateLagrangianFields
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateLagrangianFields" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateLagrangianFields" << endl;
     }
 
     const fvMesh& mesh = *meshPtr_;
@@ -264,6 +277,11 @@ void Foam::vtkPV3Foam::updateLagrangianFields
     (
         mesh, objects, arraySelection, output
     );
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateLagrangianFields" << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInformation.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInformation.C
index d86a8a90dc56ba33a316e1051393c0103ffbd2cf..9c2d144dea1cf7a2bb23f5b7c619a61af1a4c5cb 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInformation.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInformation.C
@@ -86,8 +86,7 @@ void Foam::vtkPV3Foam::updateInformationInternalMesh()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateInformationInternalMesh"
-            << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateInformationInternalMesh" << endl;
     }
 
     vtkDataArraySelection* arraySelection = reader_->GetRegionSelection();
@@ -101,6 +100,12 @@ void Foam::vtkPV3Foam::updateInformationInternalMesh()
     selectInfoVolume_ = arraySelection->GetNumberOfArrays();
     arraySelection->AddArray("internalMesh");
     selectInfoVolume_ += 1;
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateInformationInternalMesh" << endl;
+    }
+
 }
 
 
@@ -108,8 +113,8 @@ void Foam::vtkPV3Foam::updateInformationLagrangian()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateInformationLagrangian "
-            << "at timePath " << dbPtr_->timePath()/"lagrangian" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateInformationLagrangian" << nl
+            << "    " << dbPtr_->timePath()/"lagrangian" << endl;
     }
 
     vtkDataArraySelection* arraySelection = reader_->GetRegionSelection();
@@ -144,11 +149,15 @@ void Foam::vtkPV3Foam::updateInformationLagrangian()
     {
         if (debug)
         {
-            Info<<"no clouds identified in "
-                << dbPtr_->timePath()/"lagrangian" << endl;
+            Info<<"no clouds identified in " <<nl
+                << "    " <<dbPtr_->timePath()/"lagrangian" << endl;
         }
     }
 
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateInformationLagrangian" << endl;
+    }
 }
 
 
@@ -156,7 +165,7 @@ void Foam::vtkPV3Foam::updateInformationPatches()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateInformationPatches" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateInformationPatches" << endl;
     }
 
     vtkDataArraySelection *arraySelection = reader_->GetRegionSelection();
@@ -198,6 +207,10 @@ void Foam::vtkPV3Foam::updateInformationPatches()
     }
     selectInfoPatches_ += nPatches;
 
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateInformationPatches" << endl;
+    }
 }
 
 
@@ -205,7 +218,7 @@ void Foam::vtkPV3Foam::updateInformationZones()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateInformationZones" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateInformationZones" << endl;
     }
 
     vtkDataArraySelection *arraySelection = reader_->GetRegionSelection();
@@ -301,6 +314,12 @@ void Foam::vtkPV3Foam::updateInformationZones()
             selectInfoPointZones_ += zones.size();
         }
     }
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateInformationZones" << endl;
+    }
+
 }
 
 
@@ -308,7 +327,7 @@ void Foam::vtkPV3Foam::updateInformationSets()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateInformationSets" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateInformationSets" << endl;
     }
 
     vtkDataArraySelection *arraySelection = reader_->GetRegionSelection();
@@ -346,6 +365,11 @@ void Foam::vtkPV3Foam::updateInformationSets()
         objects,
         " - pointSet"
     );
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateInformationSets" << endl;
+    }
 }
 
 
@@ -353,7 +377,7 @@ void Foam::vtkPV3Foam::updateInformationLagrangianFields()
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateInformationLagrangianFields"
+        Info<< "<beg> Foam::vtkPV3Foam::updateInformationLagrangianFields"
             << endl;
     }
 
@@ -415,8 +439,8 @@ void Foam::vtkPV3Foam::updateInformationLagrangianFields()
 
     if (debug)
     {
-        Info<< "lagrangian objects.size() = " << objects.size()
-            << endl;
+        Info<< "<end> Foam::vtkPV3Foam::updateInformationLagrangianFields - "
+            << "lagrangian objects.size() = " << objects.size() << endl;
     }
 }
 
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInformationFields.H b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInformationFields.H
index 91571ca5f4b276f869b7baecb73d3c936acf6cd6..170ad74ed1be5368b93a348d06984b51526735be 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInformationFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInformationFields.H
@@ -40,7 +40,7 @@ void Foam::vtkPV3Foam::updateInformationFields
 {
     if (debug)
     {
-        Info<< "entered Foam::vtkPV3Foam::updateInformationFields" << endl;
+        Info<< "<beg> Foam::vtkPV3Foam::updateInformationFields" << endl;
     }
 
     // preserve the currently selected values
@@ -94,6 +94,11 @@ void Foam::vtkPV3Foam::updateInformationFields
         arraySelection,
         selectedEntries
     );
+
+    if (debug)
+    {
+        Info<< "<end> Foam::vtkPV3Foam::updateInformationFields" << endl;
+    }
 }
 
 
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/Allwmake b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
similarity index 54%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/Allwmake
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
index f5d718f041b5f6a533033835f390e707db4e53b9..aca3e014c98f47e4f4e185ef81a1246f5dcfdacf 100755
--- a/applications/utilities/postProcessing/graphics/ensight76FoamExec/Allwmake
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
@@ -1 +1,2 @@
+#!/bin/sh
 wmake libso
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/Make/files b/applications/utilities/postProcessing/graphics/ensightFoamReader/Make/files
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/Make/files
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/Make/files
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/Make/options b/applications/utilities/postProcessing/graphics/ensightFoamReader/Make/options
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/Make/options
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/Make/options
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README b/applications/utilities/postProcessing/graphics/ensightFoamReader/README
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README7 b/applications/utilities/postProcessing/graphics/ensightFoamReader/README7
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README7
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README7
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README_1.0_to_2.0 b/applications/utilities/postProcessing/graphics/ensightFoamReader/README_1.0_to_2.0
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README_1.0_to_2.0
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README_1.0_to_2.0
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README_2.01_to_2.03 b/applications/utilities/postProcessing/graphics/ensightFoamReader/README_2.01_to_2.03
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README_2.01_to_2.03
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README_2.01_to_2.03
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_1.0 b/applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_1.0
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_1.0
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_1.0
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_2.0 b/applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_2.0
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_2.0
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_2.0
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_2.01 b/applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_2.01
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_2.01
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_2.01
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_2.03 b/applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_2.03
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_2.03
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_2.03
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_2.03_CHANGES b/applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_2.03_CHANGES
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/README_USERD_2.03_CHANGES
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/README_USERD_2.03_CHANGES
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_bkup.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_bkup.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_bkup.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_bkup.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_exit_routine.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_exit_routine.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_exit_routine.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_exit_routine.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_border_availability.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_border_availability.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_border_availability.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_border_availability.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_border_elements_by_type.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_border_elements_by_type.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_border_elements_by_type.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_border_elements_by_type.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_changing_geometry_status.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_changing_geometry_status.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_changing_geometry_status.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_changing_geometry_status.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_constant_val.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_constant_val.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_constant_val.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_constant_val.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_dataset_query_file_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_dataset_query_file_info.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_dataset_query_file_info.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_dataset_query_file_info.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_descrip_lines.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_descrip_lines.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_descrip_lines.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_descrip_lines.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_element_label_status.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_element_label_status.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_element_label_status.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_element_label_status.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_geom_timeset_number.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_geom_timeset_number.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_geom_timeset_number.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_geom_timeset_number.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_gold_part_build_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_part_build_info.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_gold_part_build_info.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_part_build_info.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_gold_variable_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_variable_info.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_gold_variable_info.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_variable_info.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_matf_set_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_matf_set_info.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_matf_set_info.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_matf_set_info.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_matf_var_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_matf_var_info.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_matf_var_info.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_matf_var_info.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_maxsize_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_maxsize_info.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_maxsize_info.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_maxsize_info.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_model_extents.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_model_extents.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_model_extents.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_model_extents.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_name_of_reader.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_name_of_reader.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_name_of_reader.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_name_of_reader.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_nfaced_conn.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_conn.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_nfaced_conn.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_conn.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_nfaced_nodes_per_face.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_nodes_per_face.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_nfaced_nodes_per_face.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_nodes_per_face.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_node_label_status.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_node_label_status.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_node_label_status.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_node_label_status.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_nsided_conn.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nsided_conn.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_nsided_conn.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nsided_conn.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_num_of_time_steps.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_num_of_time_steps.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_num_of_time_steps.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_num_of_time_steps.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_files_in_dataset.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_files_in_dataset.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_files_in_dataset.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_files_in_dataset.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_material_sets.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_material_sets.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_material_sets.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_material_sets.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_materials.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_materials.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_materials.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_materials.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_model_parts.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_model_parts.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_model_parts.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_model_parts.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_variables.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_variables.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_of_variables.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_of_variables.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_timesets.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_timesets.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_number_timesets.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_number_timesets.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_part_coords.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_coords.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_part_coords.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_coords.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_part_element_ids_by_type.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_element_ids_by_type.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_part_element_ids_by_type.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_element_ids_by_type.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_part_elements_by_type.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_part_elements_by_type.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_part_node_ids.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_node_ids.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_part_node_ids.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_node_ids.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_reader_version.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_reader_version.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_reader_version.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_reader_version.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_sol_times.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_sol_times.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_sol_times.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_sol_times.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_timeset_description.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_timeset_description.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_timeset_description.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_timeset_description.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_var_by_component.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_var_by_component.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_var_by_component.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_var_by_component.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_var_value_at_specific.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_var_value_at_specific.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_get_var_value_at_specific.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_var_value_at_specific.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_load_matf_data.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_load_matf_data.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_load_matf_data.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_load_matf_data.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_set_filenames.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_set_filenames.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_set_server_number.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_server_number.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_set_server_number.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_server_number.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_set_time_set_and_step.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_time_set_and_step.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_set_time_set_and_step.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_time_set_and_step.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_size_matf_data.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_size_matf_data.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_size_matf_data.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_size_matf_data.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_stop_part_building.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_stop_part_building.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_stop_part_building.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_stop_part_building.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_structured_data.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_structured_data.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/USERD_structured_data.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_structured_data.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/getFieldScalar.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getFieldScalar.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/getFieldScalar.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/getFieldScalar.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/getFieldTensor.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getFieldTensor.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/getFieldTensor.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/getFieldTensor.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/getFieldVector.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getFieldVector.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/getFieldVector.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/getFieldVector.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/getLagrangianScalar.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianScalar.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/getLagrangianScalar.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianScalar.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/getLagrangianVector.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/getLagrangianVector.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/getPatchFieldScalar.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldScalar.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/getPatchFieldScalar.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldScalar.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/getPatchFieldTensor.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldTensor.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/getPatchFieldTensor.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldTensor.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/getPatchFieldVector.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldVector.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/getPatchFieldVector.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldVector.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/globalFoam.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/globalFoam.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/globalFoam.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/globalFoam.H
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/global_extern.h b/applications/utilities/postProcessing/graphics/ensightFoamReader/global_extern.h
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/global_extern.h
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/global_extern.h
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/global_extern_proto.h b/applications/utilities/postProcessing/graphics/ensightFoamReader/global_extern_proto.h
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/global_extern_proto.h
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/global_extern_proto.h
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/libuserd.C b/applications/utilities/postProcessing/graphics/ensightFoamReader/libuserd.C
similarity index 96%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/libuserd.C
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/libuserd.C
index 44d3087638042d422e9adf149188b23872da8d18..9057461ea97cc909e1cf7786d65e98554ce5023e 100644
--- a/applications/utilities/postProcessing/graphics/ensight76FoamExec/libuserd.C
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/libuserd.C
@@ -26,10 +26,9 @@ Application
     libuserd-foam
 
 Description
-    Module for EnSight 7.6 to read FOAM data directly without translation
+    EnSight library module to read OpenFOAM data directly without translation
 
-    It can currently handle cells of type:
-    Z_HEX08, Z_PEN06, Z_TET04, Z_PUR05
+    It can currently handle most cell types.
 
     See also: README_USERD_2.0
     24 Sep 2001: NN - Added support for Ensight API 2.0
diff --git a/applications/utilities/postProcessing/graphics/ensight76FoamExec/tensorConversion.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/tensorConversion.H
similarity index 100%
rename from applications/utilities/postProcessing/graphics/ensight76FoamExec/tensorConversion.H
rename to applications/utilities/postProcessing/graphics/ensightFoamReader/tensorConversion.H
diff --git a/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C b/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C
index 920f25165679a9f97ed37f1f1b7b82f3249dfbbe..4e960a7415b1305da80b693a0eb57d8dacdadc60 100644
--- a/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C
+++ b/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
     instantList timeDirs = timeSelector::select0(runTime, args);
 #   include "createMesh.H"
 
-    IOprobes sniff(mesh, "probesDict", true);
+    IOprobes sniff(mesh, "probesDict", IOobject::MUST_READ, true);
 
     forAll(timeDirs, timeI)
     {
diff --git a/applications/utilities/postProcessing/sampling/sample/sample.C b/applications/utilities/postProcessing/sampling/sample/sample.C
index 1cc9115dbaa451fb29be599df84f76503be601f0..f2b27de8ead3eb94729c5c54366f64253b134537 100644
--- a/applications/utilities/postProcessing/sampling/sample/sample.C
+++ b/applications/utilities/postProcessing/sampling/sample/sample.C
@@ -28,39 +28,39 @@ Description
 
     Keywords:
 
-    setFormat: set output format, choice of
-        xmgr
-        jplot
-        gnuplot
-        raw
-
-    surfaceFormat: surface output format, choice of
-        null        : suppress output
-        foamFile    : separate points, faces and values file
-        dx          : DX scalar or vector format
-        vtk         : VTK ascii format
-        raw         : x y z value format for use with e.g. gnuplot 'splot'.
-        stl         : ascii stl. Does not contain values!
-
-    interpolationScheme: interpolation scheme, choice of
-        cell          : use cell-centre value; constant over cells (default)
-        cellPoint     : use cell-centre and vertex values
-   	    cellPointFace : use cell-centre, vertex and face values.
-          1] vertex values determined from neighbouring cell-centre values
-          2] face values determined using the current face interpolation scheme
-             for the field (linear, limitedLinear, etc.)
-
-    fields: list of fields to sample
-
-    sets: list of sets to sample, choice of
-        uniform             evenly distributed points on line
-        face                one point per face intersection
-        midPoint            one point per cell, inbetween two face intersections
-        midPointAndFace     combination of face and midPoint
-
-        curve               specified points, not nessecary on line, uses
+    @param setFormat : set output format, choice of \n
+      - xmgr
+      - jplot
+      - gnuplot
+      - raw
+
+    @param surfaceFormat : surface output format, choice of \n
+      - null        : suppress output
+      - foamFile    : separate points, faces and values file
+      - dx          : DX scalar or vector format
+      - vtk         : VTK ascii format
+      - raw         : x y z value format for use with e.g. gnuplot 'splot'.
+      - stl         : ascii stl. Does not contain values!
+
+    @param interpolationScheme : interpolation scheme, choice of \n
+      - cell          : use cell-centre value; constant over cells (default)
+      - cellPoint     : use cell-centre and vertex values
+      - cellPointFace : use cell-centre, vertex and face values. \n
+        -# vertex values determined from neighbouring cell-centre values
+        -# face values determined using the current face interpolation scheme
+           for the field (linear, limitedLinear, etc.)
+
+    @param fields : list of fields to sample
+
+    @param sets : list of sets to sample, choice of \n
+      - uniform             evenly distributed points on line
+      - face                one point per face intersection
+      - midPoint            one point per cell, inbetween two face intersections
+      - midPointAndFace     combination of face and midPoint
+
+      - curve               specified points, not nessecary on line, uses
                             tracking
-        cloud               specified points, uses findCell
+      - cloud               specified points, uses findCell
 
         Option axis: how to write point coordinate. Choice of
           - x/y/z: x/y/z coordinate only
@@ -74,11 +74,12 @@ Description
             uniform: extra number of sampling points
             curve, cloud: list of coordinates
 
-    surfaces: list of surfaces to sample, choice of
-        plane : values on plane defined by point, normal.
-        patch : values on patch.
+    @param surfaces : list of surfaces to sample, choice of \n
+      - plane : values on plane defined by point, normal.
+      - patch : values on patch.
 
-    Runs in parallel.
+Notes
+    Runs in parallel
 
 \*---------------------------------------------------------------------------*/
 
@@ -100,8 +101,8 @@ int main(int argc, char *argv[])
     instantList timeDirs = timeSelector::select0(runTime, args);
 #   include "createMesh.H"
 
-    IOsampledSets sSets(mesh, "sampleDict", true);
-    IOsampledSurfaces sSurfaces(mesh, "sampleDict", true);
+    IOsampledSets sSets(mesh, "sampleDict", IOobject::MUST_READ, true);
+    IOsampledSurfaces sSurfs(mesh, "sampleDict", IOobject::MUST_READ, true);
 
     forAll(timeDirs, timeI)
     {
@@ -112,10 +113,10 @@ int main(int argc, char *argv[])
         polyMesh::readUpdateState state = mesh.readUpdate();
 
         sSets.readUpdate(state);
-        sSurfaces.readUpdate(state);
+        sSurfs.readUpdate(state);
 
         sSets.write();
-        sSurfaces.write();
+        sSurfs.write();
 
         Info<< endl;
     }
diff --git a/bin/foamClearPolyMesh b/bin/foamClearPolyMesh
index 07531f68bf467ccdc41f02b78632e8d61d3a7288..c354ca0dd3b797baec5adb985363deeed32511ed 100755
--- a/bin/foamClearPolyMesh
+++ b/bin/foamClearPolyMesh
@@ -35,7 +35,7 @@ usage() {
    while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done
    cat <<USAGE 1>&2
 
-usage: ${0##*/} [-case dir]
+usage: ${0##*/} [-case dir] [-region name]
 
     Remove the contents of the constant/polyMesh directory
     as per the Foam::polyMesh::removeFiles() method.
@@ -44,46 +44,60 @@ USAGE
    exit 1
 }
 
-unset caseDir
-unset meshDir
+unset caseDir regionName
 
-# parse options
-if [ "$#" -gt 0 ]; then
+# parse a single option
+while [ "$#" -gt 0 ]
+do
    case "$1" in
    -h | -help)
       usage
       ;;
    -case)
-      shift
-      caseDir=$1
-      [ "$#" -ge 1 ] || usage "'-case' option requires an argument"
+      [ "$#" -ge 2 ] || usage "'-case' option requires an argument"
+      caseDir=$2
+      shift 2
       cd "$caseDir" 2>/dev/null || usage "directory does not exist:  '$caseDir'"
-      meshDir="constant/polyMesh"
+      ;;
+   -region)
+      [ "$#" -ge 2 ] || usage "'-region' option requires an argument"
+      regionName=$2
+      shift 2
       ;;
    *)
       usage "unknown option/argument: '$*'"
       ;;
    esac
+done
+
+if [ -n "$regionName" ]
+then
+   meshDir=$regionName/polyMesh
+else
+   meshDir=polyMesh
 fi
 
-# meshDir is only set if -case was specified: insist upon 'constant/polyMesh'
-if [ -n "$meshDir" ]
+# if -case was specified: insist upon 'constant/polyMesh'
+if [ -n "$caseDir" ]
 then
-   if [ ! -d "$meshDir" ]
+   if [ -d constant/$meshDir ]
    then
-      echo "Error: no '$meshDir' in $caseDir" 1>&2
+      # use constant/polyMesh
+      meshDir=constant/$meshDir
+   else
+      echo "Error: no 'constant/$meshDir' in $caseDir" 1>&2
       exit 1
    fi
 else
-   if [ -d constant/polyMesh ]
+   if [ -d constant/$meshDir ]
    then
       # use constant/polyMesh
-      meshDir=constant/polyMesh
-   elif [ -d polyMesh ]
+      meshDir=constant/$meshDir
+   elif [ -d $meshDir ]
    then
-      # likely already in constant/
-      meshDir=polyMesh
-   elif [ "${PWD##*/}" = polyMesh ]
+      # likely already in constant/ - do not adjust anything
+      :
+   elif [ "${PWD##*/}" = polyMesh -a -z "$regionName" ]
    then
       # apparently already within polyMesh/
       meshDir=.
diff --git a/bin/foamCopySettings b/bin/foamCopySettings
index 22c7a6b32a023f74f9358c011570a9bf593ca78a..bad2904aeae28af0e313b5799f7d2630fc9ec57a 100755
--- a/bin/foamCopySettings
+++ b/bin/foamCopySettings
@@ -84,9 +84,9 @@ for i in $fileList
 do
    name="${i##*/}"
    # skip numerical (results) directories (except 0)
-   # and things that look like queuing system output
+   # and things that look like queuing system output or log files
    case "$name" in
-   [1-9] | [0-9]?* | foam.[eo][1-9]*)
+   [1-9] | [0-9]?* | foam.[eo][1-9]* | log | *.log )
       echo "$i  [skipped]"
       continue
       ;;
diff --git a/bin/foamDiffSourceList b/bin/foamDiffSourceList
deleted file mode 100755
index 560d965032453a5d067441e157b0bafe35a875db..0000000000000000000000000000000000000000
--- a/bin/foamDiffSourceList
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-#    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software; you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by the
-#     Free Software Foundation; either version 2 of the License, or (at your
-#     option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM; if not, write to the Free Software Foundation,
-#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# Script
-#     foamDiffSourceList <oldDir> <newDir> <tarFile>
-#
-# Description
-#     Packs and compresses files that have changed (diff -uw) between
-#     oldDir newDir
-#
-#------------------------------------------------------------------------------
-tmpFile=${TMPDIR:-/tmp}/foamDiffList.$$
-
-if [ $# -ne 3 ]; then
-   echo "Usage : ${0##*/} oldDir newDir tarFile"
-   echo ""
-   echo "Find the files that changed (diff -uw) between <oldDir> and <newDir>"
-   echo "and pack them into <tarFile>"
-   echo ""
-   exit 1
-fi
-
-# canonical form (no double and no trailing dashes)
-oldDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
-newDir=$(echo "$2" | sed -e 's@//*@/@g' -e 's@/$@@')
-packFile=$3
-
-if [ ! -d $oldDir ]; then
-   echo "Error: directory $oldDir does not exist"
-   exit 1
-fi
-
-if [ ! -d $newDir ]; then
-   echo "Error: directory $newDir does not exist"
-   exit 1
-fi
-
-if [ -f $packFile ]; then
-   echo "Error: $packFile already exists"
-   exit 1
-fi
-
-# Clean up on termination and on Ctrl-C
-trap 'rm -f $tmpFile 2>/dev/null; exit 0' EXIT TERM INT
-
-fileCount=0
-cat /dev/null > $tmpFile
-
-find -H $newDir                \
-    ! -type d -type f          \
-    ! -name "*~"               \
- -a ! -name ".*~"              \
- -a ! -name ".#*"              \
- -a ! -name "*.orig"           \
- -a ! -name "*.dep"            \
- -a ! -name "*.o"              \
- -a ! -name "*.so"             \
- -a ! -name "*.a"              \
- -a ! -name "*.tgz"            \
- -a ! -name "core"             \
- -a ! -name "core.[1-9]*"      \
- -a ! -name "log[0-9]*"        \
-| sed                          \
- -e "\@$newDir/.git/@d"        \
- -e "\@$newDir/lib/@d"         \
- -e '\@applications/bin/@d'      \
- -e '\@/t/@d'                    \
- -e '\@Make[.A-Za-z]*/[^/]*/@d'  \
- -e '\@[Dd]oxygen/html@d'        \
- -e '\@[Dd]oxygen/latex@d'       \
- -e '\@[Dd]oxygen/man@d'         \
- -e "s@$newDir/*@@"              \
- | \
- (
-    while read file
-    do
-       (( fileCount=$fileCount + 1))
-
-       if [ -f "$oldDir/$file" ]
-       then
-          diff -uw $oldDir/$file $newDir/$file >/dev/null 2>&1
-          if [ $? = 1 ]
-          then
-             echo "[DIFF]" $file
-             echo $newDir/$file >> $tmpFile
-             continue
-          fi
-       else
-          echo "[NEW]" $file
-          echo $newDir/$file >> $tmpFile
-          continue
-       fi
-       echo $fileCount $file
-    done
- )
-
-# file fileCount
-fileCount=$(cat $tmpFile | wc -l)
-echo "----------------------------------------------------------------------"
-echo "pack $fileCount changed/new files"
-
-tar -czpf $packFile --files-from $tmpFile
-
-if [ $? = 0 ]
-then
-   echo "Finished packing changed files from $newDir into $packFile"
-else
-   echo "Error: failure packing changed files from $newDir into $packFile"
-   rm -f $packFile 2>/dev/null
-fi
-echo "----------------------------------------------------------------------"
-
-# ----------------------------------------------------------------------------
diff --git a/bin/foamExec b/bin/foamExec
index b4ec646637410f24d4cea7d74f68b7ea1aecb742..dea3c664f8a8db087ae3ded028e196de11a48f62 100755
--- a/bin/foamExec
+++ b/bin/foamExec
@@ -37,13 +37,11 @@
 #         foamExec -v <foamVersion> <foamCommand> ... -parallel
 #
 #------------------------------------------------------------------------------
-Script=${0##*/}
-
 usage() {
    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
    cat<<USAGE
 
-usage: $Script [OPTION] <application> ...
+usage: ${0##*/} [OPTION] <application> ...
 
 options:
   -v ver        specify OpenFOAM version
diff --git a/bin/foamJob b/bin/foamJob
index 39d32db801b153471482c22fab894b986f7e5f03..1aad5fca99d81c5d51ab5fa0ef7df55cbf0b8e0f 100755
--- a/bin/foamJob
+++ b/bin/foamJob
@@ -29,13 +29,11 @@
 # Description
 #
 #------------------------------------------------------------------------------
-Script=${0##*/}
-
 usage() {
    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
    cat<<USAGE
 
-usage: $Script [OPTION] <application> ...
+usage: ${0##*/} [OPTION] <application> ...
 
 options:
   -case dir     specify case directory
@@ -108,9 +106,9 @@ do
       usage
       ;;
    -case)
-      shift
-      caseDir=$1
-      [ "$#" -ge 1 ] || usage "'-case' option requires an argument"
+      [ "$#" -ge 2 ] || usage "'-case' option requires an argument"
+      caseDir=$2
+      shift 2
       cd "$caseDir" 2>/dev/null || usage "directory does not exist:  '$caseDir'"
       ;;
    -s)
diff --git a/bin/foamNew b/bin/foamNew
index 3900c3c74c08192d3ce1aeba2441600cabfe7d52..15005c5c8384018d399137f392d82f971616de5e 100755
--- a/bin/foamNew
+++ b/bin/foamNew
@@ -30,13 +30,11 @@
 #     Create a new standard OpenFOAM source file
 #
 #------------------------------------------------------------------------------
-Script=${0##*/}
-
 usage() {
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
 
-usage: $Script <type> {args}
+usage: ${0##*/} <type> {args}
 
 * create a new standard OpenFOAM source file
 
diff --git a/bin/foamPack b/bin/foamPack
index 6541e10c4a9240cb4b5d31b48316110f626ab285..8166714c6b7df695c3ca9b10db275345977b8aff 100755
--- a/bin/foamPack
+++ b/bin/foamPack
@@ -43,7 +43,8 @@ then
 fi
 
 # add optional output directory
-if [ -d "$1" ]; then
+if [ -d "$1" ]
+then
    packFile="$1/$packFile"
 fi
 
diff --git a/bin/foamPackBin b/bin/foamPackBin
index 99ceabb402f9add8e8884df8ff3076c39ee23cca..4c0d673e2732fb27ce7db7009293f33802b97932 100755
--- a/bin/foamPackBin
+++ b/bin/foamPackBin
@@ -31,7 +31,7 @@
 #
 #------------------------------------------------------------------------------
 
-if [ $# = 0 ]
+if [ $# -eq 0 ]
 then
    echo "Error: architecture type expected, exiting"
    echo
diff --git a/bin/foamPackBinAll b/bin/foamPackBinAll
index 76ad4ffb818e81325f1cacb5267b56915e34cbf3..45708b17c32ecc76b13f2de97bf8f6d18cdccb5e 100755
--- a/bin/foamPackBinAll
+++ b/bin/foamPackBinAll
@@ -27,7 +27,7 @@
 #     foamPackBinAll [outputDir]
 #
 # Description
-#     Packs and compresses all binary version of foam for release
+#     Packs and compresses all binary versions of foam for release
 #
 #------------------------------------------------------------------------------
 packDir=$WM_PROJECT-$WM_PROJECT_VERSION
@@ -38,6 +38,7 @@ then
    exit 1
 fi
 
+# obtain arch types from lib/
 for bin in $packDir/lib/*
 do
    foamPackBin ${bin##*/} $@
diff --git a/bin/foamPackChanged b/bin/foamPackChanged
deleted file mode 100755
index 93fac19060557851202dd3be50efe181c7f53d53..0000000000000000000000000000000000000000
--- a/bin/foamPackChanged
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-#    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software; you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by the
-#     Free Software Foundation; either version 2 of the License, or (at your
-#     option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM; if not, write to the Free Software Foundation,
-#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# Script
-#     foamPackChanged <directory> <tarFile>
-#
-# Description
-#     Packs and compresses files that have a corresponding .orig file
-#
-#------------------------------------------------------------------------------
-tmpFile=${TMPDIR:-/tmp}/foamPackChanged.$$
-
-if [ $# -ne 2 ]; then
-   echo "Usage : ${0##*/} directory tarFile"
-   echo ""
-   echo "Packs and compresses files that have a corresponding .orig file"
-   echo ""
-   exit 1
-fi
-
-# canonical form (no double and no trailing dashes)
-packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
-packFile=$2
-
-if [ ! -d $packDir ]; then
-   echo "Error: directory $packDir does not exist"
-   exit 1
-fi
-
-# Clean up on termination and on Ctrl-C
-trap 'rm -f $tmpFile 2>/dev/null; exit 0' EXIT TERM INT
-
-fileCount=0
-cat /dev/null > $tmpFile
-
-find -H $packDir               \
-    ! -type d                  \
-    -type f                    \
-    -name "*.orig"             \
-| sed                          \
- -e "\@$packDir/lib/@d"        \
- -e '\@applications/bin/@d'      \
- -e '\@/t/@d'                    \
- -e '\@Make[.A-Za-z]*/[^/]*/@d'  \
- -e '\@[Dd]oxygen/html@d'        \
- -e '\@[Dd]oxygen/latex@d'       \
- -e '\@[Dd]oxygen/man@d'         \
- -e "s@$packDir/*@@"             \
- | \
- (
-    while read file
-    do
-       (( fileCount=$fileCount + 1 ))
-
-       file=${file%%.orig}
-
-       if [ -f "$packDir/$file" ]
-       then
-          echo $fileCount $file
-          echo $packDir/$file >> $tmpFile
-       else
-          echo "[MISSING]" $file
-       fi
-    done
- )
-
-# file fileCount
-fileCount=$(cat $tmpFile | wc -l)
-echo "----------------------------------------------------------------------"
-echo "pack $fileCount updated (non-.orig) files"
-
-tar -czpf $packFile --files-from $tmpFile
-
-if [ $? = 0 ]
-then
-   echo "Finished packing changed files from $packDir into $packFile"
-else
-   echo "Error: failure packing changed files from $packDir into $packFile"
-   rm -f $packFile 2>/dev/null
-fi
-echo "----------------------------------------------------------------------"
-
-# ----------------------------------------------------------------------------
diff --git a/bin/foamPackDoxygen b/bin/foamPackDoxygen
new file mode 100755
index 0000000000000000000000000000000000000000..239c87c740a8888a01ddd7bab1cd0b881766ee5a
--- /dev/null
+++ b/bin/foamPackDoxygen
@@ -0,0 +1,121 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software; you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by the
+#     Free Software Foundation; either version 2 of the License, or (at your
+#     option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM; if not, write to the Free Software Foundation,
+#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Script
+#     foamPackDoxygen [-prefix DIR] [-o outputDir]
+#
+# Description
+#     Packs and compresses the OpenFOAM doxygen html for release
+#
+#------------------------------------------------------------------------------
+packDir=$WM_PROJECT-$WM_PROJECT_VERSION
+packTag=_Doxygen.gtgz
+
+usage() {
+cat <<USAGE 1>&2
+Usage: ${0##*/} [-prefix DIR] [-o outputDir]
+
+    Packs and compresses the OpenFOAM doxygen html for release
+
+USAGE
+   exit 1
+}
+
+unset prefix outputDir
+
+while [ "$#" -gt 0 ]
+do
+   case $1 in
+   -prefix | --prefix )
+      prefix=${2%%/}
+      shift 2
+      ;;
+   -o | -output )
+      outputDir=${2%%/}
+      shift 2
+      ;;
+   -h | -help )
+      usage
+      ;;
+   -*)
+      usage "unknown option: '$*'"
+      ;;
+   esac
+done
+
+# if packing from within the directory, use -prefix form
+if [ "${PWD##*/}" = "$packDir" ]
+then
+   : ${prefix:=$packDir}
+fi
+
+# pack the directories directly and add prefix afterwards
+if [ -n "$prefix" ]
+then
+   packDir="$prefix"
+elif [ ! -d $packDir ]
+then
+   echo "Error: directory $packDir does not exist"
+   exit 1
+fi
+
+#
+# add optional output directory
+#
+if [ -d "$outputDir" ]
+then
+   packFile="$outputDir/$packDir$packTag"
+else
+   packFile="$packDir$packTag"
+fi
+
+
+if [ -f $packFile ]
+then
+   echo "Error: $packFile already exists"
+   exit 1
+fi
+
+# Pack and compress the packFile using GNU tar
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+echo
+echo "Packing doxygen html into $packFile"
+echo
+
+if [ -n "$prefix" ]
+then
+   tar czpf $packFile --transform="s@^@$prefix/@" doc/Doxygen/html
+else
+   tar czpf $packFile $packDir/doc/Doxygen/html
+fi
+
+if [ $? = 0 ]
+then
+   echo "Finished packing doxygen html into file $packFile"
+else
+   echo "Error: failure packing doxygen html file $packFile"
+fi
+
+#------------------------------------------------------------------------------
diff --git a/bin/foamPackSource b/bin/foamPackSource
index 7db55ed86b60c50debd433f9f580ee8b99ea8e5d..2bdee4916d3a8b8f38051026cb8a503d69857fcd 100755
--- a/bin/foamPackSource
+++ b/bin/foamPackSource
@@ -33,7 +33,8 @@
 #------------------------------------------------------------------------------
 tmpFile=${TMPDIR:-/tmp}/foamPackFiles.$$
 
-if [ $# -ne 2 ]; then
+if [ $# -ne 2 ]
+then
    echo "Usage : ${0##*/} directory tarFile"
    echo ""
    echo "Packs all .C and .H files and Make/options and Make/files into"
@@ -46,12 +47,14 @@ fi
 packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
 packFile=$2
 
-if [ ! -d $packDir ]; then
+if [ ! -d $packDir ]
+then
    echo "Error: directory $packDir does not exist"
    exit 1
 fi
 
-if [ -f $packFile ]; then
+if [ -f $packFile ]
+then
    echo "Error: $packFile already exists"
    exit 1
 fi
diff --git a/bin/foamPackThirdPartyBin b/bin/foamPackThirdPartyBin
index a229ebea9cbd2c3c0d7294505b3064b94818a346..ad0a2a14d00ad03291499ef38b42b6a7dd791d41 100755
--- a/bin/foamPackThirdPartyBin
+++ b/bin/foamPackThirdPartyBin
@@ -33,14 +33,14 @@
 
 if [ $# = 0 ]
 then
-   echo "Error: archOptionsitecture type expected, exiting"
+   echo "Error: archOptions type expected, exiting"
    echo
    echo "Usage : ${0##*/} <archOptions> [outputDir]"
    echo
    exit 1
 fi
 archOptions=$1
-arch=${archOptions%%G*}
+arch=${archOptions%%G*}  # TODO: works for Gcc only
 arch3264=$(echo "$arch" | sed 's@64@-64@')
 
 echo "archOptions=$archOptions"
diff --git a/bin/foamUpdateCaseFileHeader b/bin/foamUpdateCaseFileHeader
index dad6dfc355e61af3f4c77c0af370f56f458ffdd5..6b7aa8439ff85426d5aa82012978712ee8b0583e 100755
--- a/bin/foamUpdateCaseFileHeader
+++ b/bin/foamUpdateCaseFileHeader
@@ -33,85 +33,108 @@
 #     Also removes consecutive blank lines from file.
 #
 #------------------------------------------------------------------------------
+foamVersion=$WM_PROJECT_VERSION
 
-#
-# FUNCTIONS
-#
-printUsage () {
-cat <<EOF
-Usage: $0 <file>
-    Updates the header of application files
-    By default, writes current version in the header
-    Alternatively version can be specified with -v option
-    Also removes consecutive blank lines from file
-
-Options are:
--v "<version>" specifies the version to be written in the header
--h         help
-EOF
+usage() {
+   cat<<USAGE
+
+usage: ${0##*/} [OPTION] <file1> ... <fileN>
+
+options:
+  -v "<version>"  specifies the version to be written in the header
+  -h              help
+
+  Updates the header of application files.
+  By default, writes current version in the header.
+  Alternatively version can be specified with -v option.
+  Also removes consecutive blank lines from file.
+
+USAGE
+   exit 1
 }
 
-printOpenFOAMheader () {
-cat<<EOF
+
+printHeader() {
+   cat<<HEADER
 /*--------------------------------*- C++ -*----------------------------------*\\
 | =========                 |                                                 |
 | \\\\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\\\    /   O peration     | Version:  ${1}                                   |
+|  \\\\    /   O peration     | Version:  ${foamVersion}  |
 |   \\\\  /    A nd           | Web:      http://www.OpenFOAM.org               |
 |    \\\\/     M anipulation  |                                                 |
 \\*---------------------------------------------------------------------------*/
 FoamFile
 {
     version     2.0;
-    format      ${2};
-    class       ${3};
-    object      ${4};
+    format      ${1};
+    class       ${2};
+    object      ${3};
 }
-EOF
+HEADER
 }
 
-FoamFileAttribute () {
-    grep $1 $2 | tr -s " " | cut -d" " -f3 | cut -d\; -f1
+
+#
+# extract attribute '$1' from file '$2'
+#
+FoamFileAttribute() {
+   sed -n -e 's/[ ;]*$//' -e "s/^ *$1 *//p" $2
 }
 
-VERSION=$WM_PROJECT_VERSION
+
 #
 # OPTIONS
 #
 OPTS=`getopt hv: $*`
-if [ $? -ne 0 ] ; then
-    echo "Aborting due to invalid option"
-    printUsage
-    exit 1
+if [ $? -ne 0 ]
+then
+   echo "Aborting due to invalid option"
+   usage
 fi
 eval set -- '$OPTS'
-while [ "$1" != "--" ]; do
-    case $1 in
-        -v) VERSION=$2; shift;;
-        -h) printUsage; exit 1;;
-    esac
-    shift
+while [ "$1" != "--" ]
+do
+   case $1 in
+   -v)
+      foamVersion=$2
+      shift
+      ;;
+   -h)
+      usage
+      ;;
+   esac
+   shift
 done
 shift
 
+[ $# -ge 1 ] || usage
+
+
+# constant width for version
+foamVersion=`printf %-36s $foamVersion`
+
 #
 # MAIN
 #
-CASE_FILE=$1
-if [ "`grep FoamFile $CASE_FILE`" ] ; then
-    echo "Updating case file:" $CASE_FILE
-    sed -n '/FoamFile/,/}/p' $CASE_FILE > FoamFile
-    CLASS=`FoamFileAttribute class FoamFile`
-    OBJECT=`FoamFileAttribute object FoamFile`
-    FORMAT=`FoamFileAttribute format FoamFile`
-    printOpenFOAMheader $VERSION $FORMAT $CLASS $OBJECT > temp
-    sed '1,/}/d' $CASE_FILE | sed '/./,/^$/!d' >> temp
-    mv temp $1
-    rm FoamFile
-else
-    echo "The following file does not appear to be a case file:"
-    echo "    " $CASE_FILE
-fi
+for caseFile
+do
+   if grep FoamFile $caseFile >/dev/null 2>&1
+   then
+      echo "Updating case file: $caseFile"
+      sed -n '/FoamFile/,/}/p' $caseFile > FoamFile
+
+      CLASS=`FoamFileAttribute class FoamFile`
+      OBJECT=`FoamFileAttribute object FoamFile`
+      FORMAT=`FoamFileAttribute format FoamFile`
 
+      printHeader $FORMAT $CLASS $OBJECT $NOTE > FoamFile.tmp
+      sed '1,/}/d' $caseFile | sed '/./,/^$/!d' >> FoamFile.tmp
+
+      mv FoamFile.tmp $caseFile
+      rm FoamFile
+   else
+      echo " Invalid case file: $caseFile"
+   fi
+done
 
 #------------------------------------------------------------------------------
diff --git a/bin/foamUpgradeTurbulenceProperties b/bin/foamUpgradeTurbulenceProperties
index 1f10d8551a6e7194a9991c96fe3f3a1f77a17ccc..8c1437aca6675224f53814c0e7cb2326e1c4e6c6 100755
--- a/bin/foamUpgradeTurbulenceProperties
+++ b/bin/foamUpgradeTurbulenceProperties
@@ -30,59 +30,64 @@
 #     Upgrade the turbulenceProperties dictionary to the new format employed
 #     in OpenFOAM version 1.5
 #     - RAS turbulence models now defined by the RASProperties dictionary,
-#       and RASModel keyword, and
+#       and RASModel keyword.
 #     - LES turbulence models now defined by the LESProperties dictionary,
 #       and LESModel keyword.
 #
 #------------------------------------------------------------------------------
 
-printUsage()
-{
-    echo "Usage: `basename $0` <turbulenceProperties>"
-    echo "    Where <turbulenceProperties> is the full path to the"
-    echo "    turbulenceProperties dictionary"
+usage() {
+   cat<<USAGE
+
+usage: ${0##*/} <turbulenceProperties>
+
+  Where <turbulenceProperties> is the full path to the
+  turbulenceProperties dictionary
+
+  Note: can upgrade several files at once
+
+USAGE
+   exit 1
 }
 
+#
+# $1: turbulence model
+# $2: new properties type
+# $3: original dictionary
+#
 convertDict()
 {
-    echo "    Identified $1 turbulence model"
+    echo "Identified $1 turbulence model in '$3'"
+    outputPath=`dirname $3`
 
     sed -e "s/turbulenceProperties/$1Properties/" \
         -e "s/$2/$1Model/" \
         -e "s/[a-zA-Z0-9]* [ ]*\[[0-9 ]*\]//" \
         $3 > "$outputPath/$1Properties"
 
-    echo "    written $1Properties to $outputPath/"
+     echo "    wrote $outputPath/$1Properties"
 }
 
-outputPath=`dirname $1`
-
-if [ $# -ne 1 ]; then
-    printUsage
-    exit 1
-elif [ ! -e $1 ]; then
-    echo "    Error: file $1 does not exist"
-    echo ""
-    printUsage
-    exit 1
-fi
-
-# Identify type of turbulence model
-RAS=`grep turbulenceModel $1`
-LES=`grep LESmodel $1`
-
-if [ -n "$RAS" ]; then
-    convertDict "RAS" "turbulenceModel" $1
-elif [ -n "$LES" ]; then
-    convertDict "LES" "LESmodel" $1
-else
-    echo "Unable to determine turbulence model type - nothing changed"
-    exit 1
-fi
-
-echo "done."
-
-exit 0
+[ $# -ge 1 ] || usage
 
+for turbDict
+do
+   # Identify type of turbulence model and convert
+   if [ -f $turbDict ]
+   then
+      if grep turbulenceModel $turbDict >/dev/null 2>&1
+      then
+          convertDict RAS turbulenceModel $turbDict
+      elif grep LESmodel $turbDict >/dev/null 2>&1
+      then
+          convertDict LES LESmodel $turbDict
+      else
+          echo "Unable to determine turbulence model type in '$turbDict'"
+          echo "    - nothing changed"
+      fi
+   else
+      echo "Error: file '$turbDict' does not exist"
+   fi
+done
 
 #------------------------------------------------------------------------------
diff --git a/bin/paraFoam b/bin/paraFoam
index 93fb4cf03b12210d8c008ca805eaccb4dceeec7c..217596343a61e3051102dd3dce44e276ee65f411 100755
--- a/bin/paraFoam
+++ b/bin/paraFoam
@@ -30,13 +30,11 @@
 #     start paraview with the OpenFOAM libraries
 #
 #------------------------------------------------------------------------------
-Script=${0##*/}
-
 usage() {
    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
    cat<<USAGE
 
-usage: $Script [-case dir]
+usage: ${0##*/} [-case dir]
 
 * start paraview $ParaView_VERSION with the OpenFOAM libraries
 
@@ -45,25 +43,27 @@ USAGE
 }
 
 # parse options
-if [ "$#" -gt 0 ]; then
+while [ "$#" -gt 0 ]
+do
    case "$1" in
    -h | -help)
       usage
       ;;
    -case)
-      shift
-      caseDir=$1
-      [ "$#" -ge 1 ] || usage "'-case' option requires an argument"
+      [ "$#" -ge 2 ] || usage "'-case' option requires an argument"
+      caseDir=$2
+      shift 2
       cd "$caseDir" 2>/dev/null || usage "directory does not exist:  '$caseDir'"
       ;;
    *)
       usage "unknown option/argument: '$*'"
       ;;
    esac
-fi
+done
 
 # get a sensible caseName
 caseName=${PWD##*/}
+caseFile="$caseName.OpenFOAM"
 
 # parent directory for normal or parallel results
 case "$caseName" in
@@ -77,8 +77,6 @@ do
    [ -s "$parentDir/$check" ] || usage "file does not exist:  '$parentDir/$check'"
 done
 
-#caseFile="$caseName.foam"
-caseFile="$caseName.OpenFOAM"
 
 case "$ParaView_VERSION" in
 2*)
diff --git a/bin/rmcore b/bin/rmcore
index 6014adc4148df98b79727ddc69862391d3025407..1245878ff311755659c7fbe23b8c054e803d2b0a 100755
--- a/bin/rmcore
+++ b/bin/rmcore
@@ -1,3 +1,3 @@
 #!/bin/sh
-#find . \( -name 'core' \) -exec ls -l {} \; -exec rm {} \;
+# find . \( -name 'core' \) -exec ls -l {} \; -exec rm {} \;
 find . \( -type f -name 'core' -o -name 'core.[1-9]*' -o -name 'vgcore.*' \) -print | xargs -t rm
diff --git a/bin/rmdepall b/bin/rmdepall
index 89e6e4c5664c674b9392a07a3b08768edcfd0b67..84e65267410fa146989f744ada55c549876d2f49 100755
--- a/bin/rmdepall
+++ b/bin/rmdepall
@@ -1,12 +1,15 @@
 #!/bin/sh
 
-if [ $# -eq 0 ]; then
-    find . \( -name '*.dep' \) -print | xargs -t rm
-elif [ $# -eq 1 ]; then
-    echo "Removing all dep files containing $1..."
-    find . -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \;
+if [ $# -eq 0 ]
+then
+   find . \( -name '*.dep' \) -print | xargs -t rm
+elif [ $# -eq 1 ]
+then
+   echo "Removing all dep files containing $1..."
+   find . -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \;
 else
-    echo "Usage: `basename $0`        to remove all .dep files"
-    echo "       `basename $0` <file> to remove all .dep files referring to <file>"
-    exit 1
+   echo "Usage: ${0##/}        to remove all .dep files"
+   echo "       ${0##/} <file> to remove all .dep files referring to <file>"
+   exit 1
 fi
+
diff --git a/bin/rm~all b/bin/rm~all
index 73ea1d55693c8a92a7e182a1a36e4b342b83d893..6ee2bad3700447e1bb99ffef67ec4a9b699aece4 100755
--- a/bin/rm~all
+++ b/bin/rm~all
@@ -1,3 +1,3 @@
 #!/bin/sh
-#find . \( -name '*~' -o -name '.*~'  \) -exec ls -l {} \; -exec rm {} \;
+# find . \( -name '*~' -o -name '.*~'  \) -exec ls -l {} \; -exec rm {} \;
 find . \( -name '*~' -o -name '.*~' \) -print | xargs -t rm
diff --git a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C
index 3564ae9ab1cc137fc8f74d9cc77a85c6a5cd90e1..966ef841362dacd5cddbb40b6297c0e959dc10c2 100644
--- a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C
+++ b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C
@@ -83,10 +83,7 @@ bool Foam::IOobject::readHeader(Istream& is)
         }
 
         // The note entry is optional
-        if (headerDict.found("note"))
-        {
-            note_ = string(headerDict.lookup("note"));
-        }
+        headerDict.readIfPresent("note", note_);
     }
     else
     {
diff --git a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C
index cbf78006065add53ff3b1c7ebf82f7f7cebb3f20..20030c2ea55ed4f9402f9feddb7b11f79f041bc6 100644
--- a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C
+++ b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C
@@ -49,7 +49,6 @@ bool Foam::IOobject::writeHeader(Ostream& os) const
         << "    format      " << os.format() << ";\n"
         << "    class       " << type() << ";\n";
 
-    // outdent for visibility and more space
     if (note().size())
     {
         os  << "    note        " << note() << ";\n";
diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C
index f0948b77dea214339e5c8a1b7f85bcb0c5e1d728..dd1e944067fb78f36fce921dad44d4eca9730c76 100644
--- a/src/OpenFOAM/db/Time/Time.C
+++ b/src/OpenFOAM/db/Time/Time.C
@@ -101,14 +101,12 @@ void Foam::Time::setControls()
 {
     // default is to resume calculation from "latestTime"
     word startFrom("latestTime");
-    if (controlDict_.found("startFrom"))
-    {
-        controlDict_.lookup("startFrom") >> startFrom;
-    }
+
+    controlDict_.readIfPresent("startFrom", startFrom);
 
     if (startFrom == "startTime")
     {
-        startTime_ = readScalar(controlDict_.lookup("startTime"));
+        controlDict_.lookup("startTime") >> startTime_;
     }
     else
     {
@@ -158,7 +156,7 @@ void Foam::Time::setControls()
             FatalErrorIn("Time::setControls()")
                 << "Start time is not the same for all processors" << nl
                 << "processor " << Pstream::myProcNo() << " has startTime "
-                << startTime_ << exit(FatalError); 
+                << startTime_ << exit(FatalError);
         }
     }
 
@@ -176,15 +174,13 @@ void Foam::Time::setControls()
         )
     );
 
-    if (timeDict.found("deltaT"))
+    if (timeDict.readIfPresent("deltaT", deltaTSave_))
     {
-        deltaTSave_ = readScalar(timeDict.lookup("deltaT"));
         deltaT0_ = deltaTSave_;
     }
 
-    if (timeDict.found("index"))
+    if (timeDict.readIfPresent("index", startTimeIndex_))
     {
-        timeDict.lookup("index") >> startTimeIndex_;
         timeIndex_ = startTimeIndex_;
     }
 }
@@ -503,20 +499,9 @@ void Foam::Time::setTime(const instant& inst, const label newIndex)
         )
     );
 
-    if (timeDict.found("deltaT"))
-    {
-        deltaT_ = readScalar(timeDict.lookup("deltaT"));
-    }
-
-    if (timeDict.found("deltaT0"))
-    {
-        deltaT0_ = readScalar(timeDict.lookup("deltaT0"));
-    }
-
-    if (timeDict.found("index"))
-    {
-        timeIndex_ = readLabel(timeDict.lookup("index"));
-    }
+    timeDict.readIfPresent("deltaT", deltaT_);
+    timeDict.readIfPresent("deltaT0", deltaT0_);
+    timeDict.readIfPresent("index", timeIndex_);
 }
 
 
@@ -647,7 +632,7 @@ Foam::Time& Foam::Time::operator++()
         case wcRunTime:
         case wcAdjustableRunTime:
         {
-            label outputTimeIndex = 
+            label outputTimeIndex =
                 label(((value() - startTime_) + 0.5*deltaT_)/writeInterval_);
 
             if (outputTimeIndex > outputTimeIndex_)
diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C
index 45eaefed64ebba159c2227d258c81d68c7e603da..fc3ad8857cca9f384296f6ab8ad3588179b248a1 100644
--- a/src/OpenFOAM/db/Time/TimeIO.C
+++ b/src/OpenFOAM/db/Time/TimeIO.C
@@ -44,10 +44,8 @@ void Foam::Time::readDict()
         );
     }
 
-    if (controlDict_.found("writeInterval"))
+    if (controlDict_.readIfPresent("writeInterval", writeInterval_))
     {
-        controlDict_.lookup("writeInterval") >> writeInterval_;
-
         if (writeControl_ == wcTimeStep && label(writeInterval_) < 1)
         {
             FatalIOErrorIn("Time::readDict()", controlDict_)
@@ -60,10 +58,8 @@ void Foam::Time::readDict()
         controlDict_.lookup("writeFrequency") >> writeInterval_;
     }
 
-    if (controlDict_.found("purgeWrite"))
+    if (controlDict_.readIfPresent("purgeWrite", purgeWrite_))
     {
-        purgeWrite_ = readInt(controlDict_.lookup("purgeWrite"));
-
         if (purgeWrite_ < 0)
         {
             WarningIn("Time::readDict()")
@@ -106,10 +102,7 @@ void Foam::Time::readDict()
         }
     }
 
-    if (controlDict_.found("timePrecision"))
-    {
-        precision_ = readLabel(controlDict_.lookup("timePrecision"));
-    }
+    controlDict_.readIfPresent("timePrecision", precision_);
 
     // stopAt at 'endTime' or a specified value
     // if nothing is specified, the endTime is zero
@@ -119,18 +112,14 @@ void Foam::Time::readDict()
 
         if (stopAt_ == saEndTime)
         {
-            endTime_ = readScalar(controlDict_.lookup("endTime"));
+            controlDict_.lookup("endTime") >> endTime_;
         }
         else
         {
             endTime_ = GREAT;
         }
     }
-    else if (controlDict_.found("endTime"))
-    {
-        endTime_ = readScalar(controlDict_.lookup("endTime"));
-    }
-    else
+    else if (!controlDict_.readIfPresent("endTime", endTime_))
     {
         endTime_ = 0;
     }
@@ -175,10 +164,7 @@ void Foam::Time::readDict()
         );
     }
 
-    if (controlDict_.found("graphFormat"))
-    {
-        graphFormat_ = word(controlDict_.lookup("graphFormat"));
-    }
+    controlDict_.readIfPresent("graphFormat", graphFormat_);
 
     if (controlDict_.found("runTimeModifiable"))
     {
diff --git a/src/OpenFOAM/db/functionObject/functionObject.H b/src/OpenFOAM/db/functionObject/functionObject.H
index d729c1c8cb83307cec7e677fe511cc86d371eb4d..476163661370b4c872a8261ca40dfcf585a710da 100644
--- a/src/OpenFOAM/db/functionObject/functionObject.H
+++ b/src/OpenFOAM/db/functionObject/functionObject.H
@@ -28,6 +28,9 @@ Class
 Description
     Abstract base-class for Time/database function objects.
 
+See Also
+    Foam::OutputFilterFunctionObject
+
 SourceFiles
     functionObject.C
 
diff --git a/src/OpenFOAM/db/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjectList/functionObjectList.H
index 752c6d8a0d79d3e144847e0e3a1899b08a7d2ac8..bd71c1578c6c82359bd360db7c9f406add2e1215 100644
--- a/src/OpenFOAM/db/functionObjectList/functionObjectList.H
+++ b/src/OpenFOAM/db/functionObjectList/functionObjectList.H
@@ -29,6 +29,9 @@ Description
     List of function objects with execute function which is called for
     each object.
 
+See Also
+    Foam::functionObject and Foam::OutputFilterFunctionObject
+
 SourceFiles
     functionObjectList.C
 
diff --git a/src/OpenFOAM/db/memberFunctionSelection/addToMemberFunctionSelectionTable.H b/src/OpenFOAM/db/memberFunctionSelection/addToMemberFunctionSelectionTable.H
index 5d6b78db47d347112ec91fe18a51ca768ac2be05..7bfd089dc3ac434b507a4aef5001469ad3ed17eb 100644
--- a/src/OpenFOAM/db/memberFunctionSelection/addToMemberFunctionSelectionTable.H
+++ b/src/OpenFOAM/db/memberFunctionSelection/addToMemberFunctionSelectionTable.H
@@ -26,7 +26,7 @@ InClass
     Foam::memberFunctionSelectionTables
 
 Description
-    Macros to enable the easy insertion into member function selection tables.
+    Macros for easy insertion into member function selection tables
 
 \*---------------------------------------------------------------------------*/
 
@@ -47,14 +47,13 @@ Description
                                                                               \
     /* Add the thisType constructor function to the table */                  \
     baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType>  \
-    add##thisType##memberFunction##argNames##MemberFunctionTo##baseType##Table_(#lookup)
+    add_##lookup##_##thisType##memberFunction##argNames##MemberFunctionTo##baseType##Table_(#lookup)
 
 #define addTemplateToMemberFunctionSelectionTable\
 (baseType,thisType,Targ,memberFunction,argNames)                              \
                                                                               \
     /* Add the thisType constructor function to the table */                  \
-    baseType::add##memberFunction##argNames##MemberFunctionToTable            \
-    <thisType<Targ> >                                                         \
+    baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType<Targ> > \
     add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##baseType##Table_
 
 
diff --git a/src/OpenFOAM/db/runTimeSelection/addToRunTimeSelectionTable.H b/src/OpenFOAM/db/runTimeSelection/addToRunTimeSelectionTable.H
index b3bbf50cb74a6f3c4352312f8619a6d568b64489..3a1d74e28aa7bbbdf2eb91b4630f935c1292fd6e 100644
--- a/src/OpenFOAM/db/runTimeSelection/addToRunTimeSelectionTable.H
+++ b/src/OpenFOAM/db/runTimeSelection/addToRunTimeSelectionTable.H
@@ -26,7 +26,7 @@ InClass
     Foam::runTimeSelectionTables
 
 Description
-    Macros to enable the easy insertion into run-time selection tables.
+    Macros for easy insertion into run-time selection tables
 
 \*---------------------------------------------------------------------------*/
 
@@ -45,7 +45,7 @@ Description
                                                                               \
     /* Add the thisType constructor function to the table */                  \
     baseType::add##argNames##ConstructorToTable<thisType>                     \
-        add##thisType##argNames##ConstructorTo##baseType##Table_(#lookup)
+        add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_(#lookup)
 
 #define addTemplateToRunTimeSelectionTable(baseType,thisType,Targ,argNames)   \
                                                                               \
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H
index 20b41f17b86ace0a59cf5a5630b8e028df361f6b..958e2f259bebf809d248ebbd222c95c05f8db0aa 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::FieldField\<T\>
+    Foam::FieldField
 
 Description
     Generic field type.
@@ -134,7 +134,7 @@ public:
             );
 
             forAll(*nffPtr, i)
-            { 
+            {
                 nffPtr->set(i, Field<Type>::NewCalculatedType(ff[i]).ptr());
             }
 
diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C
index 59ee6e57b55cb9edab39097c54484c85e14d105c..d8b90d013b5981722997608b06bcddad49cbc6a4 100644
--- a/src/OpenFOAM/global/argList/argList.C
+++ b/src/OpenFOAM/global/argList/argList.C
@@ -168,7 +168,6 @@ Foam::argList::argList
 {
     // Check if this run is a parallel run by searching for any parallel option
     // If found call runPar (might filter argv)
-
     for (int argi=0; argi<argc; argi++)
     {
         if (argv[argi][0] == '-')
@@ -183,12 +182,6 @@ Foam::argList::argList
         }
     }
 
-    // Print the banner once only for parallel runs
-    if (Pstream::master())
-    {
-        IOobject::writeBanner(Info, true);
-    }
-
     // convert argv -> args_ and capture ( ... ) lists
     // for normal arguments and for options
     regroupArgv(argc, argv);
@@ -291,8 +284,10 @@ Foam::argList::argList
     string dateString = clock::date();
     string timeString = clock::clockTime();
 
+    // Print the banner once only for parallel runs
     if (Pstream::master())
     {
+        IOobject::writeBanner(Info, true);
         Info<< "Exec   : " << argListString.c_str() << nl
             << "Date   : " << dateString.c_str() << nl
             << "Time   : " << timeString.c_str() << nl
@@ -609,9 +604,9 @@ void Foam::argList::printUsage() const
         Info<< ']';
     }
 
-    // place help/doc options of the way at the end,
+    // place help/doc/srcDoc options of the way at the end,
     // but with an extra space to separate it a little
-    Info<< "  [-help] [-doc] [-srcDoc]" << endl;
+    Info<< "  [-help] [-doc] [-srcDoc]\n" << endl;
 }
 
 
@@ -663,7 +658,9 @@ void Foam::argList::displayDoc(bool source) const
     }
     else
     {
-        Info<< "No documentation found" << endl;
+        Info<< nl
+            << "No documentation found for " << executable_
+            << ", but you can use -help to display the usage\n" << endl;
     }
 }
 
diff --git a/src/OpenFOAM/include/addRegionOption.H b/src/OpenFOAM/include/addRegionOption.H
index a67d1e0fbd040a9edd114f13891665b623050a6a..382836d3299051bca85c37a483628aa602a883de 100644
--- a/src/OpenFOAM/include/addRegionOption.H
+++ b/src/OpenFOAM/include/addRegionOption.H
@@ -1 +1 @@
-    argList::validOptions.insert("region", "region name");
+    argList::validOptions.insert("region", "name");
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
index 2d89ac4e79415ac0079c7a8a22c48e6953be5300..33fcda639db8e0bc5d10ac7118e27cece792139e 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
@@ -87,8 +87,7 @@ class lduMatrix
 
 public:
 
-    //- Class returned by the solver
-    //  containing performance statistics
+    //- Class returned by the solver, containing performance statistics
     class solverPerformance
     {
         word   solverName_;
@@ -237,16 +236,6 @@ public:
 
         // Protected Member Functions
 
-            //- Read a control parameter from controlDict
-            template<class T>
-            inline void readControl
-            (
-                const dictionary& controlDict,
-                T& control,
-                const word& controlName
-            );
-
-
             //- Read the control parameters from the controlDict_
             virtual void readControls();
 
@@ -318,7 +307,6 @@ public:
                 Istream& solverData
             );
 
-
         // Selectors
 
             //- Return a new solver
@@ -333,6 +321,7 @@ public:
             );
 
 
+
         // Destructor
 
             virtual ~solver()
@@ -749,7 +738,7 @@ public:
                 const lduInterfaceFieldPtrsList&,
                 const direction cmpt
             ) const;
-    
+
             //- Matrix transpose multiplication with updated interfaces.
             void Tmul
             (
@@ -800,7 +789,7 @@ public:
                 scalarField& result,
                 const direction cmpt
             ) const;
-    
+
             //- Update interfaced interfaces for matrix operations
             void updateMatrixInterfaces
             (
@@ -810,7 +799,7 @@ public:
                 scalarField& result,
                 const direction cmpt
             ) const;
-    
+
 
             template<class Type>
             tmp<Field<Type> > H(const Field<Type>&) const;
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C
index 4db27fde042ec2b0fc06e2b39abafb794efcd9f4..19fd2435a08ecad0afb0b37a487888042ce719eb 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C
@@ -171,9 +171,9 @@ Foam::lduMatrix::solver::solver
 
 void Foam::lduMatrix::solver::readControls()
 {
-    readControl(controlDict_, maxIter_, "maxIter");
-    readControl(controlDict_, tolerance_, "tolerance");
-    readControl(controlDict_, relTol_, "relTol");
+    controlDict_.readIfPresent("maxIter", maxIter_);
+    controlDict_.readIfPresent("tolerance", tolerance_);
+    controlDict_.readIfPresent("relTol", relTol_);
 }
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C
index 50767e741e69b5f6e2a5e2a6d13a4c3d15b347e9..6209d81c861a4e71283244fc66afecd2046ffccc 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C
@@ -31,21 +31,6 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-template<class T>
-inline void Foam::lduMatrix::solver::readControl
-(
-    const dictionary& controlDict,
-    T& control,
-    const word& controlName
-)
-{
-    if (controlDict.found(controlName))
-    {
-        controlDict.lookup(controlName) >> control;
-    }
-}
-
-
 template<class Type>
 Foam::tmp<Foam::Field<Type> > Foam::lduMatrix::H(const Field<Type>& psi) const
 {
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C
index 2042ac6ac3d4b1b84e3a203e46e05b2b7e2f16f8..cfd2f4513ef64ee6dc58a999459006f520f15e91 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C
@@ -75,7 +75,7 @@ Foam::GAMGPreconditioner::~GAMGPreconditioner()
 void Foam::GAMGPreconditioner::readControls()
 {
     GAMGSolver::readControls();
-    readControl(controlDict_, nVcycles_, "nVcycles");
+    controlDict_.readIfPresent("nVcycles", nVcycles_);
 }
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.C
index fa13572601e883d237b08d3690357e6138f65fe0..f8a29ba2413738a3820aae190206287e74c314c8 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.C
@@ -154,13 +154,12 @@ void Foam::GAMGSolver::readControls()
 {
     lduMatrix::solver::readControls();
 
-    readControl(controlDict_, cacheAgglomeration_, "cacheAgglomeration");
-
-    readControl(controlDict_, nPreSweeps_, "nPreSweeps");
-    readControl(controlDict_, nPostSweeps_, "nPostSweeps");
-    readControl(controlDict_, nFinestSweeps_, "nFinestSweeps");
-    readControl(controlDict_, scaleCorrection_, "scaleCorrection");
-    readControl(controlDict_, directSolveCoarsest_, "directSolveCoarsest");
+    controlDict_.readIfPresent("cacheAgglomeration", cacheAgglomeration_);
+    controlDict_.readIfPresent("nPreSweeps", nPreSweeps_);
+    controlDict_.readIfPresent("nPostSweeps", nPostSweeps_);
+    controlDict_.readIfPresent("nFinestSweeps", nFinestSweeps_);
+    controlDict_.readIfPresent("scaleCorrection", scaleCorrection_);
+    controlDict_.readIfPresent("directSolveCoarsest", directSolveCoarsest_);
 }
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C b/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C
index c07a626ec376b460fef053b471530ad539c9b55f..6b7c1cbcc3c66d9c9c33f9c1361f76433ca0602f 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C
@@ -72,7 +72,7 @@ Foam::smoothSolver::smoothSolver
 void Foam::smoothSolver::readControls()
 {
     lduMatrix::solver::readControls();
-    readControl(controlDict_, nSweeps_, "nSweeps");
+    controlDict_.readIfPresent("nSweeps", nSweeps_);
 }
 
 
diff --git a/src/OpenFOAM/matrices/solution/solution.H b/src/OpenFOAM/matrices/solution/solution.H
index 7b295cc18a1068c51de2fbf071ec772d65d1920b..3d455fdecc31e8f8ee3d18e80a394082e2d2877f 100644
--- a/src/OpenFOAM/matrices/solution/solution.H
+++ b/src/OpenFOAM/matrices/solution/solution.H
@@ -97,7 +97,7 @@ public:
             const dictionary& solverDict(const word& name) const;
 
             //- Return the stream of solver parameters for the given field
-            //  (Provided for backward compatibility only)
+            //  @deprecated Backward compatibility only - should use solverDict
             ITstream& solver(const word& name) const;
 
 
diff --git a/src/OpenFOAM/meshes/patchIdentifier/patchIdentifier.C b/src/OpenFOAM/meshes/patchIdentifier/patchIdentifier.C
index bdbde0c06f759d1630c3eb5107b910646ecc4398..c0d90270df0bed74e39f19a7061481433df152af 100644
--- a/src/OpenFOAM/meshes/patchIdentifier/patchIdentifier.C
+++ b/src/OpenFOAM/meshes/patchIdentifier/patchIdentifier.C
@@ -52,10 +52,7 @@ Foam::patchIdentifier::patchIdentifier
     name_(name),
     boundaryIndex_(index)
 {
-    if (dict.found("physicalType"))
-    {
-        dict.lookup("physicalType") >> physicalType_;
-    }
+    dict.readIfPresent("physicalType", physicalType_);
 }
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.H
index a5a0614b99826b0de1ed61c4abb7a268b54c2951..6ab6354a0888ad46148797a01673560e3dd68159 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.H
@@ -23,14 +23,15 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::genericPolyPatch.C
+    Foam::genericPolyPatch
 
 Description
     Determines a mapping between patch face centres and mesh cell centres and
     processors they're on.
 
-    Note: storage is not optimal. It stores all face centres and cells on
-    all processors to keep the addressing calculation simple.
+Note
+    Storage is not optimal. It stores all face centres and cells on all
+    processors to keep the addressing calculation simple.
 
 SourceFiles
     genericPolyPatch.C
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
index b1cd7a02f667f6b3b7bd32ec39fc4d07db5fdcd7..31faea5669f6cb899fb41f8aaaa81180771ff215 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
@@ -637,10 +637,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
     rotationAxis_(vector::zero),
     rotationCentre_(point::zero)
 {
-    if (dict.found("featureCos"))
-    {
-        dict.lookup("featureCos") >> featureCos_;
-    }
+    dict.readIfPresent("featureCos", featureCos_);
+
     if (dict.found("transform"))
     {
         transform_ = transformTypeNames.read(dict.lookup("transform"));
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/newPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/newPolyPatch.C
index 67a3e2886bdac40fb508af90aa54a1df4c2ca319..fde52b3e75a9f796ae54298d08665bd9007a2a88 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/newPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/newPolyPatch.C
@@ -27,14 +27,9 @@ License
 #include "polyPatch.H"
 #include "dictionary.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-autoPtr<polyPatch> polyPatch::New
+Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
 (
     const word& patchType,
     const word& name,
@@ -72,7 +67,7 @@ autoPtr<polyPatch> polyPatch::New
 }
 
 
-autoPtr<polyPatch> polyPatch::New
+Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
 (
     const word& name,
     const dictionary& dict,
@@ -89,10 +84,7 @@ autoPtr<polyPatch> polyPatch::New
 
     word patchType(dict.lookup("type"));
 
-    if (dict.found("geometricType"))
-    {
-        dict.lookup("geometricType") >> patchType;
-    }
+    dict.readIfPresent("geometricType", patchType);
 
     dictionaryConstructorTable::iterator cstrIter =
         dictionaryConstructorTablePtr_->find(patchType);
@@ -124,8 +116,4 @@ autoPtr<polyPatch> polyPatch::New
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/preservePatchTypes/preservePatchTypes.C b/src/OpenFOAM/meshes/preservePatchTypes/preservePatchTypes.C
index 2f46854f6fd3b74a5bf73b0d07534c229a46708d..7c6aecf8f44cb041935a8372610b27980dad1466 100644
--- a/src/OpenFOAM/meshes/preservePatchTypes/preservePatchTypes.C
+++ b/src/OpenFOAM/meshes/preservePatchTypes/preservePatchTypes.C
@@ -77,19 +77,14 @@ void Foam::preservePatchTypes
                 const dictionary& patchDict = 
                     patchDictionary.subDict(patchNames[patchi]);
 
-                patchTypes[patchi] = word(patchDict.lookup("type"));
-
-                if (patchDict.found("geometricType"))
-                {
-                    patchTypes[patchi] =
-                        word(patchDict.lookup("geometricType"));
-                }
-
-                if (patchDict.found("physicalType"))
-                {
-                    patchPhysicalTypes[patchi] =
-                        word(patchDict.lookup("physicalType"));
-                }
+                patchDict.lookup("type") >> patchTypes[patchi];
+
+                patchDict.readIfPresent("geometricType", patchTypes[patchi]);
+                patchDict.readIfPresent
+                (
+                    "physicalType",
+                    patchPhysicalTypes[patchi]
+                );
             }
         }
 
@@ -98,10 +93,7 @@ void Foam::preservePatchTypes
             const dictionary& patchDict = 
                 patchDictionary.subDict(defaultFacesName);
 
-            if (patchDict.found("geometricType"))
-            {
-                defaultFacesType = word(patchDict.lookup("geometricType"));
-            }
+            patchDict.readIfPresent("geometricType", defaultFacesType);
         }
     }
 
diff --git a/src/OpenFOAM/primitives/Scalar/doubleFloat.H b/src/OpenFOAM/primitives/Scalar/doubleFloat.H
index 58e8f65002540185eb138dccbfd057a8ebdef0b0..40ccb272799019473c61ac26376763425cac5b43 100644
--- a/src/OpenFOAM/primitives/Scalar/doubleFloat.H
+++ b/src/OpenFOAM/primitives/Scalar/doubleFloat.H
@@ -22,9 +22,6 @@ License
     along with OpenFOAM; if not, write to the Free Software Foundation,
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
-Typedef
-    Foam::double and float
-
 \*---------------------------------------------------------------------------*/
 
 #ifndef doubleFloat_H
diff --git a/src/OpenFOAM/primitives/strings/fileName/fileName.H b/src/OpenFOAM/primitives/strings/fileName/fileName.H
index 71cdfbdb46506ca6801fa4e70e191ae2a21f29fb..1ef3839ea5ee4ef4dd254aedbce48246e3153634 100644
--- a/src/OpenFOAM/primitives/strings/fileName/fileName.H
+++ b/src/OpenFOAM/primitives/strings/fileName/fileName.H
@@ -147,7 +147,7 @@ public:
             wordList components(const char delimiter='/') const;
 
             //- Return a component of the path
-            word component(const size_t, const char delimiter='/') const;
+            word component(const size_type, const char delimiter='/') const;
 
 
         // Interogation
diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C
index a2fd5ca976afe7c1891bdaf20e8b5b5dfdaed26d..17ad2db042f1463287fc7fb349baee0d169662fd 100644
--- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C
+++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C
@@ -175,9 +175,7 @@ Foam::layerParameters::layerParameters
     featureAngle_(readScalar(dict.lookup("featureAngle"))),
     concaveAngle_
     (
-        dict.found("concaveAngle")
-      ? readScalar(dict.lookup("concaveAngle"))
-      : defaultConcaveAngle
+        dict.lookupOrDefault("concaveAngle", defaultConcaveAngle)
     ),
     nGrow_(readLabel(dict.lookup("nGrow"))),
     nSmoothSurfaceNormals_
@@ -242,9 +240,7 @@ Foam::layerParameters::layerParameters
     featureAngle_(readScalar(dict.lookup("featureAngle"))),
     concaveAngle_
     (
-        dict.found("concaveAngle")
-      ? readScalar(dict.lookup("concaveAngle"))
-      : defaultConcaveAngle
+        dict.lookupOrDefault("concaveAngle", defaultConcaveAngle)
     ),
     nGrow_(readLabel(dict.lookup("nGrow"))),
     nSmoothSurfaceNormals_
diff --git a/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H b/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H
index b996e98e8972f76544c73d032babc2a73ffd5778..0ec93cbeb19f2eb5b40d597bb45d116a5035acd4 100644
--- a/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H
+++ b/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H
@@ -23,7 +23,7 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    shellSurfaces
+    Foam::shellSurfaces
 
 Description
     Encapsulates queries for volume refinement ('refine all cells within
diff --git a/src/conversion/ensight/part/ensightPart.C b/src/conversion/ensight/part/ensightPart.C
index 5ccb17e8200db5521d78b231b6e316f628c5d032..ff870658f640dd1f8c67112303ef129b8317d80f 100644
--- a/src/conversion/ensight/part/ensightPart.C
+++ b/src/conversion/ensight/part/ensightPart.C
@@ -171,14 +171,10 @@ void Foam::ensightPart::reconstruct(Istream& is)
     forAll(elementTypes(), elemI)
     {
         word key(elementTypes()[elemI]);
-        if (dict.found(key))
-        {
-            dict.lookup(key) >> elemLists_[elemI];
-        }
-        else
-        {
-            elemLists_[elemI].clear();
-        }
+
+        elemLists_[elemI].clear();
+        dict.readIfPresent(key, elemLists_[elemI]);
+
         size_ += elemLists_[elemI].size();
     }
 
diff --git a/src/conversion/ensight/part/ensightPart.H b/src/conversion/ensight/part/ensightPart.H
index b511c6d095afcf07b101ce26d9e0d5f46739fb6f..5df840ea019d96a6fdb44714a1f70b87b9e17f57 100644
--- a/src/conversion/ensight/part/ensightPart.H
+++ b/src/conversion/ensight/part/ensightPart.H
@@ -137,7 +137,7 @@ protected:
         (
             ensightFile& os,
             const List<scalar>& field,
-            const labelList& idList
+            const List<label>& idList
         ) const;
 
         //- track points used
diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.C b/src/conversion/meshReader/starcd/STARCDMeshReader.C
index 751be41c57860ba85f06fdca65bf787ff1156b3b..084a79270412ec189609019c5404da0a6cbcdfde 100644
--- a/src/conversion/meshReader/starcd/STARCDMeshReader.C
+++ b/src/conversion/meshReader/starcd/STARCDMeshReader.C
@@ -745,17 +745,17 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName)
             iter != boundaryRegion_.end()
         )
         {
-            if (iter().found("BoundaryType"))
-            {
-                iter().lookup("BoundaryType") >> patchTypes_[patchI];
-                foundType = true;
-            }
-
-            if (iter().found("Label"))
-            {
-                iter().lookup("Label") >> patchNames_[patchI];
-                foundName = true;
-            }
+            foundType = iter().readIfPresent
+            (
+                "BoundaryType",
+                patchTypes_[patchI]
+            );
+
+            foundName = iter().readIfPresent
+            (
+                "Label",
+                patchNames_[patchI]
+            );
         }
 
         // consistent names, in long form and in lowercase
diff --git a/src/decompositionAgglomeration/decompositionMethods/metisDecomp/metisDecomp.C b/src/decompositionAgglomeration/decompositionMethods/metisDecomp/metisDecomp.C
index 964556f074210733c06176131055640cda221b94..74804f4e753742a8dbf3f05bc060a46064b72576 100644
--- a/src/decompositionAgglomeration/decompositionMethods/metisDecomp/metisDecomp.C
+++ b/src/decompositionAgglomeration/decompositionMethods/metisDecomp/metisDecomp.C
@@ -69,7 +69,7 @@ Foam::label Foam::metisDecomp::decompose
 
     // Method of decomposition
     // recursive: multi-level recursive bisection (default)
-    // k-way: multi-level k-way 
+    // k-way: multi-level k-way
     word method("k-way");
 
     // decomposition options. 0 = use defaults
@@ -88,15 +88,12 @@ Foam::label Foam::metisDecomp::decompose
     // Check for user supplied weights and decomp options
     if (decompositionDict_.found("metisCoeffs"))
     {
-        dictionary metisDecompCoeffs
-        (
-            decompositionDict_.subDict("metisCoeffs")
-        );
+        const dictionary& metisCoeffs =
+            decompositionDict_.subDict("metisCoeffs");
+        word weightsFile;
 
-        if (metisDecompCoeffs.found("method"))
+        if (metisCoeffs.readIfPresent("method", method))
         {
-            metisDecompCoeffs.lookup("method") >> method;
-
             if (method != "recursive" && method != "k-way")
             {
                 FatalErrorIn("metisDecomp::decompose()")
@@ -106,14 +103,12 @@ Foam::label Foam::metisDecomp::decompose
                     << exit(FatalError);
             }
 
-            Info<< "metisDecomp : Using Metis options     " << options
-                << endl << endl;
+            Info<< "metisDecomp : Using Metis method     " << method
+                << nl << endl;
         }
 
-        if (metisDecompCoeffs.found("options"))
+        if (metisCoeffs.readIfPresent("options", options))
         {
-            metisDecompCoeffs.lookup("options") >> options;
-
             if (options.size() != 5)
             {
                 FatalErrorIn("metisDecomp::decompose()")
@@ -124,12 +119,11 @@ Foam::label Foam::metisDecomp::decompose
             }
 
             Info<< "metisDecomp : Using Metis options     " << options
-                << endl << endl;
+                << nl << endl;
         }
 
-        if (metisDecompCoeffs.found("processorWeights"))
+        if (metisCoeffs.readIfPresent("processorWeights", processorWeights))
         {
-            metisDecompCoeffs.lookup("processorWeights") >> processorWeights;
             processorWeights /= sum(processorWeights);
 
             if (processorWeights.size() != nProcessors_)
@@ -142,20 +136,15 @@ Foam::label Foam::metisDecomp::decompose
             }
         }
 
-        if (metisDecompCoeffs.found("cellWeightsFile"))
+        if (metisCoeffs.readIfPresent("cellWeightsFile", weightsFile))
         {
             Info<< "metisDecomp : Using cell-based weights." << endl;
 
-            word cellWeightsFile
-            (
-                metisDecompCoeffs.lookup("cellWeightsFile")
-            );
-
             IOList<int> cellIOWeights
             (
                 IOobject
                 (
-                    cellWeightsFile,
+                    weightsFile,
                     mesh_.time().timeName(),
                     mesh_,
                     IOobject::MUST_READ,
@@ -174,20 +163,15 @@ Foam::label Foam::metisDecomp::decompose
         }
 
         //- faceWeights disabled. Only makes sense for cellCells from mesh.
-        //if (metisDecompCoeffs.found("faceWeightsFile"))
+        //if (metisCoeffs.readIfPresent("faceWeightsFile", weightsFile))
         //{
         //    Info<< "metisDecomp : Using face-based weights." << endl;
         //
-        //    word faceWeightsFile
-        //    (
-        //        metisDecompCoeffs.lookup("faceWeightsFile")
-        //    );
-        //
         //    IOList<int> weights
         //    (
         //        IOobject
         //        (
-        //            faceWeightsFile,
+        //            weightsFile,
         //            mesh_.time().timeName(),
         //            mesh_,
         //            IOobject::MUST_READ,
@@ -366,7 +350,7 @@ Foam::labelList Foam::metisDecomp::decompose(const pointField& points)
     // number of internal faces
     label nInternalFaces = 2*mesh_.nInternalFaces();
 
-    // Check the boundary for coupled patches and add to the number of 
+    // Check the boundary for coupled patches and add to the number of
     // internal faces
     const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
 
diff --git a/src/decompositionAgglomeration/parMetisDecomp/parMetisDecomp.C b/src/decompositionAgglomeration/parMetisDecomp/parMetisDecomp.C
index 38a03e392a629fb9d532543e8047baf2558d9433..a5778bcdf0507b346c71426e353158b2061ef737 100644
--- a/src/decompositionAgglomeration/parMetisDecomp/parMetisDecomp.C
+++ b/src/decompositionAgglomeration/parMetisDecomp/parMetisDecomp.C
@@ -516,26 +516,20 @@ Foam::labelList Foam::parMetisDecomp::decompose(const pointField& points)
     // Check for user supplied weights and decomp options
     if (decompositionDict_.found("metisCoeffs"))
     {
-        dictionary parMetisDecompCoeffs
-        (
-            decompositionDict_.subDict("metisCoeffs")
-        );
+        const dictionary& metisCoeffs =
+            decompositionDict_.subDict("metisCoeffs");
+        word weightsFile;
 
-        if (parMetisDecompCoeffs.found("cellWeightsFile"))
+        if (metisCoeffs.readIfPresent("cellWeightsFile", weightsFile))
         {
-            word cellWeightsFile
-            (
-                parMetisDecompCoeffs.lookup("cellWeightsFile")
-            );
-
             Info<< "parMetisDecomp : Using cell-based weights read from "
-                << cellWeightsFile << endl;
+                << weightsFile << endl;
 
             labelIOField cellIOWeights
             (
                 IOobject
                 (
-                    cellWeightsFile,
+                    weightsFile,
                     mesh_.time().timeName(),
                     mesh_,
                     IOobject::MUST_READ,
@@ -554,21 +548,16 @@ Foam::labelList Foam::parMetisDecomp::decompose(const pointField& points)
             }
         }
 
-        if (parMetisDecompCoeffs.found("faceWeightsFile"))
+        if (metisCoeffs.readIfPresent("faceWeightsFile", weightsFile))
         {
-            word faceWeightsFile
-            (
-                parMetisDecompCoeffs.lookup("faceWeightsFile")
-            );
-
             Info<< "parMetisDecomp : Using face-based weights read from "
-                << faceWeightsFile << endl;
+                << weightsFile << endl;
 
             labelIOField weights
             (
                 IOobject
                 (
-                    faceWeightsFile,
+                    weightsFile,
                     mesh_.time().timeName(),
                     mesh_,
                     IOobject::MUST_READ,
@@ -621,12 +610,10 @@ Foam::labelList Foam::parMetisDecomp::decompose(const pointField& points)
             }
         }
 
-        if (parMetisDecompCoeffs.found("options"))
+        if (metisCoeffs.readIfPresent("options", options))
         {
-            parMetisDecompCoeffs.lookup("options") >> options;
-
             Info<< "Using Metis options     " << options
-                << endl << endl;
+                << nl << endl;
 
             if (options.size() != 3)
             {
@@ -835,26 +822,20 @@ Foam::labelList Foam::parMetisDecomp::decompose
     // Check for user supplied weights and decomp options
     if (decompositionDict_.found("metisCoeffs"))
     {
-        dictionary parMetisDecompCoeffs
-        (
-            decompositionDict_.subDict("metisCoeffs")
-        );
+        const dictionary& metisCoeffs = 
+            decompositionDict_.subDict("metisCoeffs");
+        word weightsFile;
 
-        if (parMetisDecompCoeffs.found("cellWeightsFile"))
+        if (metisCoeffs.readIfPresent("cellWeightsFile", weightsFile))
         {
-            word cellWeightsFile
-            (
-                parMetisDecompCoeffs.lookup("cellWeightsFile")
-            );
-
             Info<< "parMetisDecomp : Using cell-based weights read from "
-                << cellWeightsFile << endl;
+                << weightsFile << endl;
 
             labelIOField cellIOWeights
             (
                 IOobject
                 (
-                    cellWeightsFile,
+                    weightsFile,
                     mesh_.time().timeName(),
                     mesh_,
                     IOobject::MUST_READ,
@@ -877,21 +858,16 @@ Foam::labelList Foam::parMetisDecomp::decompose
         }
 
         //- faceWeights disabled. Only makes sense for cellCells from mesh.
-        //if (parMetisDecompCoeffs.found("faceWeightsFile"))
+        //if (metisCoeffs.readIfPresent("faceWeightsFile", weightsFile))
         //{
-        //    word faceWeightsFile
-        //    (
-        //        parMetisDecompCoeffs.lookup("faceWeightsFile")
-        //    );
-        //
         //    Info<< "parMetisDecomp : Using face-based weights read from "
-        //        << faceWeightsFile << endl;
+        //        << weightsFile << endl;
         //
         //    labelIOField weights
         //    (
         //        IOobject
         //        (
-        //            faceWeightsFile,
+        //            weightsFile,
         //            mesh_.time().timeName(),
         //            mesh_,
         //            IOobject::MUST_READ,
@@ -944,12 +920,10 @@ Foam::labelList Foam::parMetisDecomp::decompose
         //    }
         //}
 
-        if (parMetisDecompCoeffs.found("options"))
+        if (metisCoeffs.readIfPresent("options", options))
         {
-            parMetisDecompCoeffs.lookup("options") >> options;
-
             Info<< "Using Metis options     " << options
-                << endl << endl;
+                << nl << endl;
 
             if (options.size() != 3)
             {
diff --git a/src/dynamicMesh/boundaryMesh/octreeDataFaceList.C b/src/dynamicMesh/boundaryMesh/octreeDataFaceList.C
index 27028e0df637f0416171d268754c9478458d19f0..2249bc006ecae81697ec0b144c74d89e3cd4aff8 100644
--- a/src/dynamicMesh/boundaryMesh/octreeDataFaceList.C
+++ b/src/dynamicMesh/boundaryMesh/octreeDataFaceList.C
@@ -501,7 +501,7 @@ Foam::scalar Foam::octreeDataFaceList::calcSign
 (
     const label index,
     const point& sample,
-    point&
+    vector&
 ) const
 {
     label faceI = faceLabels_[index];
diff --git a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C
index 2835bee5cda0163003d2cfb82498c12864141595..c90ad7e878276a644c41a6ea7e12b1dc0e8c5ce6 100644
--- a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C
+++ b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C
@@ -102,14 +102,7 @@ Foam::scalar Foam::layerAdditionRemoval::readOldThickness
     const dictionary& dict
 )
 {
-    if (dict.found("oldLayerThickness"))
-    {
-        return readScalar(dict.lookup("oldLayerThickness"));
-    }
-    else
-    {
-        return -1.0;
-    }
+    dict.lookupOrDefault("oldLayerThickness", -1.0);
 }
 
 
@@ -279,7 +272,7 @@ bool Foam::layerAdditionRemoval::changeTopology() const
             << "Layer thickness: min: " << minDelta
             << " max: " << maxDelta << " avg: " << avgDelta
             << " old thickness: " << oldLayerThickness_ << nl
-            << "Removal threshold: " << minLayerThickness_ 
+            << "Removal threshold: " << minLayerThickness_
             << " addition threshold: " << maxLayerThickness_ << endl;
     }
 
@@ -295,7 +288,7 @@ bool Foam::layerAdditionRemoval::changeTopology() const
         }
 
         // No topological changes allowed before first mesh motion
-        // 
+        //
         oldLayerThickness_ = avgDelta;
 
         topologicalChange = false;
@@ -314,7 +307,7 @@ bool Foam::layerAdditionRemoval::changeTopology() const
                     // At this point, info about moving the old mesh
                     // in a way to collapse the cells in the removed
                     // layer is available.  Not sure what to do with
-                    // it.  
+                    // it.
 
                     if (debug)
                     {
diff --git a/src/dynamicMesh/motionSmoother/motionSmoother.H b/src/dynamicMesh/motionSmoother/motionSmoother.H
index 92cee05637351c585448752d3ace614f366c3495..c9e20f6a55afdd329cdd657d5a0dc88e4e9dccc9 100644
--- a/src/dynamicMesh/motionSmoother/motionSmoother.H
+++ b/src/dynamicMesh/motionSmoother/motionSmoother.H
@@ -27,18 +27,18 @@ Class
 
 Description
     Given a displacement moves the mesh by scaling the displacement back
-    until there are no more mesh errors. Holds displacement field
-    (read upon construction since need boundary conditions) and scaling factor
-    and optional patch number on which to scale back displacement.
+    until there are no more mesh errors.
 
-    E.g.
+    Holds displacement field (read upon construction since need boundary
+    conditions) and scaling factor and optional patch number on which to
+    scale back displacement.
 
     E.g.
     @verbatim
         // Construct iterative mesh mover.
         motionSmoother meshMover(mesh, labelList(1, patchI));
 
-        // Set wanted displacement:
+        // Set desired displacement:
         meshMover.displacement() = ..
 
         for (label iter = 0; iter < maxIter; iter++)
@@ -49,19 +49,20 @@ Description
                 return true;
             }
         }
-    @envverbatim
-
-
-    Note: shared points (parallel). A processor can have points which are
-    part of pp on another processor but have no pp itself (i.e. it has points
-    and/or edges but no faces of pp). Hence we have to be careful when
-    e.g. synchronising displacements that the value from the processor which
-    has faces of pp get priority. This is currently handled in setDisplacement
-    by resetting the internal displacement to zero before doing anything else.
-    The combine operator used will give preference to non-zero values.
-
-    Note: various routines take baffles. These are sets of boundary faces
-    that are treated as a single internal face. This is a hack used to apply
+    @endverbatim
+
+Note
+    Shared points (parallel): a processor can have points which are part of
+    pp on another processor but have no pp itself (i.e. it has points
+    and/or edges but no faces of pp). Hence we have to be careful when e.g.
+    synchronising displacements that the value from the processor which has
+    faces of pp get priority. This is currently handled in setDisplacement
+    by resetting the internal displacement to zero before doing anything
+    else. The combine operator used will give preference to non-zero
+    values.
+
+    Various routines take baffles. These are sets of boundary faces that
+    are treated as a single internal face. This is a hack used to apply
     movement to internal faces.
 
 SourceFiles
@@ -420,7 +421,7 @@ public:
                 labelHashSet& wrongFaces
             );
 
-            //- Check (subset of mesh including baffles) with mesh settings 
+            //- Check (subset of mesh including baffles) with mesh settings
             //  in dict. Collects incorrect faces in set. Returns true if one
             //  or more faces in error. Parallel ok.
             static bool checkMesh
diff --git a/src/engine/engineTime/engineTime.C b/src/engine/engineTime/engineTime.C
index 7be803d3206dab1c0899505390f1a622e2d6db9c..edbd35038809a41d0eec1af4920e458000269d72 100644
--- a/src/engine/engineTime/engineTime.C
+++ b/src/engine/engineTime/engineTime.C
@@ -84,23 +84,11 @@ Foam::engineTime::engineTime
     stroke_(dimensionedScalar("stroke", dimLength, 0)),
     clearance_(dimensionedScalar("clearance", dimLength, 0))
 {
-    // the geometric parameters are not strictly required for Time
-    if (dict_.found("conRodLength"))
-    {
-        dict_.lookup("conRodLength") >> conRodLength_;
-    }
-    if (dict_.found("bore"))
-    {
-        dict_.lookup("bore") >> bore_;
-    }
-    if (dict_.found("stroke"))
-    {
-        dict_.lookup("stroke") >> stroke_;
-    }
-    if (dict_.found("clearance"))
-    {
-        dict_.lookup("clearance") >> clearance_;
-    }
+    // geometric parameters are not strictly required for Time
+    dict_.readIfPresent("conRodLength", conRodLength_);
+    dict_.readIfPresent("bore", bore_);
+    dict_.readIfPresent("stroke", stroke_);
+    dict_.readIfPresent("clearance", clearance_);
 
     timeAdjustment();
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.H
index 21198d936eaff29ec63932bf956f79abd57aa5af..aab658efeda999a1b1823062e6d6c56acd907bed 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingFlowRateInletVelocity/timeVaryingFlowRateInletVelocityFvPatchVectorField.H
@@ -35,8 +35,8 @@ Description
         type            timeVaryingFlowRateInletVelocity;
         flowRate        0.2;         // Volumetric/mass flow rate [m3/s or kg/s]
         value           uniform (0 0 0);  // placeholder
-        fileName        "time-series";
-        boundAction     repeat;           // (error|warn|clamp|repeat)
+        fileName        "$FOAM_CASE/time-series";
+        outOfBounds     repeat;           // (error|warn|clamp|repeat)
     }
     @endverbatim
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchField.H
index b6ce246cc6d92dbfa4c2234abe7642823badb0f2..2dfeb31d7cccb1ee3ba53071f97390b09a3d1760 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFvPatchField.H
@@ -33,8 +33,8 @@ Description
     inlet
     {
         type            timeVaryingUniformFixedValue;
-        fileName        "time-series";
-        boundAction      clamp;           // (error|warn|clamp|repeat)
+        fileName        "$FOAM_CASE/time-series";
+        outOfBounds     clamp;           // (error|warn|clamp|repeat)
     }
     @endverbatim
 
diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H
index 44e66e3cb75cdcd8b8ff9da1770578393b073e26..f9c82a2d58cf1228795bc7112a124fd6ffc8eaa1 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H
@@ -342,11 +342,11 @@ public:
 
             //- Relax matrix (for steady-state solution).
             //  alpha = 1 : diagonally equal
-            //  alpha < 1 :    ,,      dominant
+            //  alpha < 1 : diagonally dominant
             //  alpha = 0 : do nothing
             void relax(const scalar alpha);
 
-            //- Relax matrix (for steadty-state solution).
+            //- Relax matrix (for steady-state solution).
             //  alpha is read from controlDict
             void relax();
 
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.H b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.H
index b146fe8c8e41d705872b575772272ebb54253db3..04f3eda5cc15f8e8535afb040da2afc4c864310f 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.H
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.H
@@ -35,7 +35,7 @@ Description
     - interpolates the displacement of all points based on the
       faceZone motion.
 
-    Tables are in the <verbatim>constant/tables</verbatim> directory.
+    Tables are in the @a constant/tables directory.
 
 Note
     could be a motionSolver - does not use any fvMesh structure.
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H
index a3a6d0dd78d1bdb75bdf37281d65e99034544c94..3aba7306e79ce7523884be50b073657cec400d43 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H
@@ -27,15 +27,17 @@ Class
 
 Description
     Manual injection
+
     - User specifies
       - Total mass to inject
-      - Parcel positions in file <positionsFile>
+      - Parcel positions in file @c positionsFile
       - Initial parcel velocity
     - Parcel diameters obtained by PDF model
     - All parcels introduced at the start of the calculation
 
-    NOTE - not suitable for 2-D slab/wedge simulations unless the positions
-           file describes 2-D data!
+Note
+    Not suitable for 2-D slab/wedge simulations unless the @c positionsFile
+    describes 2-D data.
 
 SourceFiles
     ManualInjection.C
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H
index 4f180cdec1b0ee5e3c874ec81d1a8025f7fb9f1a..f0104963ac8230e150d84e90d0423eab52205987 100644
--- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H
+++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H
@@ -23,9 +23,10 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    molecule
+    Foam::molecule
 
 Description
+    Foam::molecule
 
 SourceFiles
     moleculeI.H
@@ -59,12 +60,12 @@ class molecule
 {
     // Private data
 
-        //- Be careful with the ordering of data.  It has an impact on binary
-        //  transfer:
-        //  1) Put the largest data members 1st
-        //  2) Pair up labels,
-        //  3) Don't go scalar-label, scalar-label, becasue in 64bit mode,
-        //     the labels will be padded by 4bytes.
+        //- Be careful with the ordering of data.
+        //  It has an impact on binary transfer:
+        //    -# Put the largest data members 1st
+        //    -# Pair up labels,
+        //    -# Don't go scalar-label, scalar-label, because in 64bit mode,
+        //       the labels will be padded by 4bytes.
 
         // - mass of molecule
         scalar mass_;
@@ -200,16 +201,15 @@ public:
 
     // Member Operators
 
-        //- Overridable function to handle the particle hitting a
-        //  processorPatch
+        //- Overridable function to handle the particle hitting a processorPatch
         void hitProcessorPatch
         (
             const processorPolyPatch&,
             molecule::trackData& td
         );
 
-        //- Overridable function to handle the particle hitting a
-        //  processorPatch without trackData
+        //- Overridable function to handle the particle hitting a processorPatch
+        //  without trackData
         void hitProcessorPatch
         (
             const processorPolyPatch&,
@@ -224,7 +224,7 @@ public:
         );
 
         //- Overridable function to handle the particle hitting a wallPatch
-        //- without trackData
+        //  without trackData
         void hitWallPatch
         (
             const wallPolyPatch&,
@@ -239,7 +239,7 @@ public:
         );
 
         //- Overridable function to handle the particle hitting a polyPatch
-        //- without trackData
+        //  without trackData
         void hitPatch
         (
             const polyPatch&,
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellOccupancy.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellOccupancy.C
index 4356a4ee6280dc122ae58e9ab8d295eeac021d44..a5f82d375cf2e70c33ba62e0aa9898f00b9b0fca 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellOccupancy.C
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudBuildCellOccupancy.C
@@ -22,11 +22,6 @@ License
     along with OpenFOAM; if not, write to the Free Software Foundation,
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
-Class
-    moleculeCloud
-
-Description
-
 \*----------------------------------------------------------------------------*/
 
 #include "moleculeCloud.H"
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C
index 7ab692ef1f6d1ced2e91068ffc38dbbae4782736..a8ee7b89d100c2ae52a7f0d17c69ec88fa64d2b9 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C
@@ -22,9 +22,6 @@ License
     along with OpenFOAM; if not, write to the Free Software Foundation,
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
-Class
-    energyScalingFunction
-
 \*---------------------------------------------------------------------------*/
 
 #include "energyScalingFunction.H"
diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C
index 4306dba017ef062846cdbb2a48f8cf6f875c7ffa..33b3bf99f699e9aae8dd7faeba7afdb87159b6f1 100644
--- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C
+++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C
@@ -22,9 +22,6 @@ License
     along with OpenFOAM; if not, write to the Free Software Foundation,
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
-Class
-    energyScalingFunction
-
 \*---------------------------------------------------------------------------*/
 
 #include "energyScalingFunction.H"
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C
index cbbebc5350e778766cfb9e5e2d281191eaba45d4..45156e57110df06d9fb4e0cafb261099b565dd01 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C
@@ -22,9 +22,6 @@ License
     along with OpenFOAM; if not, write to the Free Software Foundation,
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
-Class
-    pairPotential
-
 \*---------------------------------------------------------------------------*/
 
 #include "pairPotential.H"
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C
index efe4b52582440a00366b4f71773f8bd54fee1f31..2566941f242e064abbfa1d35eceb95db0ef33f7c 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C
@@ -22,9 +22,6 @@ License
     along with OpenFOAM; if not, write to the Free Software Foundation,
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
-Class
-    pairPotential
-
 \*---------------------------------------------------------------------------*/
 
 #include "pairPotential.H"
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
index 8382ae44226452fda50fdcfaad035aa477d4999b..998be3d7f27e793373538410c09e1a2ba00d585e 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
@@ -26,22 +26,24 @@ Class
     Foam::pairPotentials::azizChen
 
 Description
+    Foam::pairPotentials::azizChen
 
     From:
-
-    @article{MA_Aziz_Chen,
-    author = {R. A. Aziz and H. H. Chen},
-    collaboration = {},
-    title = {An accurate intermolecular potential for argon},
-    publisher = {AIP},
-    year = {1977},
-    journal = {The Journal of Chemical Physics},
-    volume = {67},
-    number = {12},
-    pages = {5719-5726},
-    url = {http://link.aip.org/link/?JCP/67/5719/1},
-    doi = {10.1063/1.434827}
-    }
+    @verbatim
+        @article{MA_Aziz_Chen,
+        author = {R. A. Aziz and H. H. Chen},
+        collaboration = {},
+        title = {An accurate intermolecular potential for argon},
+        publisher = {AIP},
+        year = {1977},
+        journal = {The Journal of Chemical Physics},
+        volume = {67},
+        number = {12},
+        pages = {5719-5726},
+        url = {http://link.aip.org/link/?JCP/67/5719/1},
+        doi = {10.1063/1.434827}
+        }
+    @endverbatim
 
 SourceFiles
     azizChen.C
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
index cea92c8c907dc4b271721431ffa0feb59528a36c..a9c7bdfa28b205e2a66eaccfd8612ee891ca0d29 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
@@ -26,28 +26,32 @@ Class
     Foam::pairPotentials::maitlandSmith
 
 Description
+    Foam::pairPotentials::maitlandSmith
 
     From:
-
-    @ARTICLE{MA_Maitland_Smith,
-    author = {{Maitland}, G.~C. and {Smith}, E.~B.},
-    title = {A simplified representation of intermolecular potential energy},
-    journal = {Chemical Physics Letters},
-    year = 1973,
-    month = oct,
-    volume = 22,
-    pages = {443-446},
-    adsurl = {http://adsabs.harvard.edu/abs/1973CPL....22..443M},
-    adsnote = {Provided by the SAO/NASA Astrophysics Data System}
-    }
+    @verbatim
+        @ARTICLE{MA_Maitland_Smith,
+        author = {{Maitland}, G.~C. and {Smith}, E.~B.},
+        title = {A simplified representation of intermolecular potential energy},
+        journal = {Chemical Physics Letters},
+        year = 1973,
+        month = oct,
+        volume = 22,
+        pages = {443-446},
+        adsurl = {http://adsabs.harvard.edu/abs/1973CPL....22..443M},
+        adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+        }
+    @endverbatim
 
     Parameters for other monoatomics from:
-    @BOOK{MD_Maitland_Rigby_Smith_Wakeham,
-    AUTHOR =       {Geoffrey C. Maitland and Maurice Rigby and E. Brian Smith and William A. Wakeham},
-    TITLE =        {Intermolecular Forces: Their Origin and Determination},
-    PUBLISHER =    {Oxford University Press},
-    YEAR =         {1981}
-    }
+    @verbatim
+        @BOOK{MD_Maitland_Rigby_Smith_Wakeham,
+        AUTHOR =       {Geoffrey C. Maitland and Maurice Rigby and E. Brian Smith and William A. Wakeham},
+        TITLE =        {Intermolecular Forces: Their Origin and Determination},
+        PUBLISHER =    {Oxford University Press},
+        YEAR =         {1981}
+        }
+    @endverbatim
 
 SourceFiles
     maitlandSmith.C
diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C
index bd51dfd9703fcf823c29ad6d75a1be98eb204717..b88b28b46c9f4df97572813384c8e54ba32d0326 100644
--- a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C
+++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C
@@ -22,9 +22,6 @@ License
     along with OpenFOAM; if not, write to the Free Software Foundation,
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
-Class
-    tetherPotential
-
 \*---------------------------------------------------------------------------*/
 
 #include "tetherPotential.H"
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C
index e01f39c97d31b3dacb4e9d85379bb845b0bc1b15..649013fdf10f5fc160099ef9c1d97b569da46d72 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C
+++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C
@@ -162,10 +162,7 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
 
     // default type is self (alias: "axes")
     word rotType(typeName_());
-    if (dict.found("type"))
-    {
-	dict.lookup("type") >> rotType;
-    }
+    dict.readIfPresent("type", rotType);
 
     // can (must) construct base class directly
     if (rotType == typeName_() || rotType == "axes")
diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPolyPatch.H b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPolyPatch.H
index f77f922d147d7c89eb2831b0fb79a0e09e64d315..6439020f5dda8a6d2a8f8a1938b10b37c7c5b0ad 100644
--- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPolyPatch.H
+++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPolyPatch.H
@@ -23,14 +23,15 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::directMappedPolyPatch.C
+    Foam::directMappedPolyPatch
 
 Description
     Determines a mapping between patch face centres and mesh cell centres and
     processors they're on.
 
-    Note: storage is not optimal. It stores all face centres and cells on
-    all processors to keep the addressing calculation simple.
+Note
+    Storage is not optimal. It stores all face centres and cells on all
+    processors to keep the addressing calculation simple.
 
 SourceFiles
     directMappedPolyPatch.C
diff --git a/src/meshTools/searchableSurface/searchableSurfaces.C b/src/meshTools/searchableSurface/searchableSurfaces.C
index 9689744fca45e4c8f6ca84a84125b69625803a1a..cd7171ed5eb4adfef9b3180d6c9ead4f94e8774b 100644
--- a/src/meshTools/searchableSurface/searchableSurfaces.C
+++ b/src/meshTools/searchableSurface/searchableSurfaces.C
@@ -176,12 +176,7 @@ Foam::searchableSurfaces::searchableSurfaces
         const dictionary& dict = topDict.subDict(key);
 
         names_[surfI] = key;
-
-        if (dict.found("name"))
-        {
-            dict.lookup("name") >> names_[surfI];
-        }
-
+        dict.readIfPresent("name", names_[surfI]);
 
         // Make IOobject with correct name
         autoPtr<IOobject> namedIO(io.clone());
diff --git a/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H
index 5c080e187354c51534e6bce177188122787593ca..7d7b22af8294bdcc2c366632e55b3062342a2548 100644
--- a/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H
+++ b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H
@@ -66,7 +66,7 @@ Description
 
     Information regarding the number of averaging steps, and total averaging
     time are written on a (base) per-field basis to the
-    fieldAveragingProperties dictionary, located in <time>/uniform
+    fieldAveragingProperties dictionary, located in \<time\>/uniform
 
 SourceFiles
     fieldAverage.C
diff --git a/src/postProcessing/forces/forces/forces.H b/src/postProcessing/forces/forces/forces.H
index 7f37217b988228eb3440dfd28bf6ee16a5924f41..7b03805b9c17851ab1027a7eb261c4be11099d62 100644
--- a/src/postProcessing/forces/forces/forces.H
+++ b/src/postProcessing/forces/forces/forces.H
@@ -33,7 +33,7 @@ Description
     moments.
 
     Member function forces::write() calls calcForcesMoment() and writes the
-    forces and moments into the file <time dir>/forces.dat
+    forces and moments into the file \<timeDir\>/forces.dat
 
 SourceFiles
     forces.C
diff --git a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C
index b2ee559eaa671ab9d39ddb38951b301bc7dcb3dd..e76c2252d476afde8a40196ccdf551bdc4ef140f 100644
--- a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C
+++ b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C
@@ -34,6 +34,7 @@ Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
 (
     const objectRegistry& obr,
     const fileName& dictName,
+    const IOobject::readOption rOpt,
     const bool readFromFiles
 )
 :
@@ -44,7 +45,7 @@ Foam::IOOutputFilter<OutputFilter>::IOOutputFilter
             dictName,
             obr.time().system(),
             obr,
-            IOobject::MUST_READ,
+            rOpt,
             IOobject::NO_WRITE
         )
     ),
diff --git a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H
index 77d308773710cb2fb15b582f0c868ece8af8d9ac..bd69a5f3d3a01b7be3f94bb778e87011e7db6413 100644
--- a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H
+++ b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H
@@ -70,11 +70,13 @@ public:
     // Constructors
 
         //- Construct for given objectRegistry and dictionary
-        //  allow the possibility to load fields from files
+        //  Allow dictionary to be optional
+        //  Allow the possibility to load fields from files
         IOOutputFilter
         (
             const objectRegistry&,
             const fileName& dictName = OutputFilter::typeName() + "Dict",
+            const IOobject::readOption rOpt = IOobject::MUST_READ,
             const bool loadFromFile = false
         );
 
diff --git a/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.C b/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.C
index df3598e953ce2dd817c284f19d2fb9d0a9e144e5..ee7c3c6ef1e82abc41f0d88481ea9a40d335b339 100644
--- a/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.C
+++ b/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.C
@@ -34,25 +34,10 @@ License
 template<class OutputFilter>
 void Foam::OutputFilterFunctionObject<OutputFilter>::readDict()
 {
-    if (dict_.found("region"))
-    {
-        dict_.lookup("region") >> regionName_;
-    }
-
-    if (dict_.found("dictionary"))
-    {
-        dict_.lookup("dictionary") >> dictName_;
-    }
-
-    if (dict_.found("interval"))
-    {
-        dict_.lookup("interval") >> interval_;
-    }
-
-    if (dict_.found("enabled"))
-    {
-        dict_.lookup("enabled") >> execution_;
-    }
+    dict_.readIfPresent("region", regionName_);
+    dict_.readIfPresent("dictionary", dictName_);
+    dict_.readIfPresent("interval", interval_);
+    dict_.readIfPresent("enabled", execution_);
 }
 
 
diff --git a/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.H b/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.H
index 00a95fc72cccdaa645a29159eddbd80189bc063f..62834c67e2301ff6907769d27defcd405553744d 100644
--- a/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.H
+++ b/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.H
@@ -26,8 +26,14 @@ Class
     Foam::OutputFilterFunctionObject
 
 Description
-    FunctionObject wrapper around OutputFilter to allow them to be created
-    via the functions list within controlDict.
+    A functionObject wrapper around OutputFilter to allow them to be
+    created via the functions list within controlDict.
+
+Note
+    Since the timeIndex is used directly from Foam::Time, it is unaffected
+    by user-time conversions. For example, Foam::engineTime might cause @a
+    writeInterval to be degrees crank angle, but the functionObject
+    execution @a interval would still be in timestep.
 
 SourceFiles
     OutputFilterFunctionObject.C
diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.C b/src/sampling/sampledSet/sampledSets/sampledSets.C
index 1877e39df523eccab3911ecd76a62bea78338156..7c1e86fd0111f634be71b3f33185fce1bd909683 100644
--- a/src/sampling/sampledSet/sampledSets/sampledSets.C
+++ b/src/sampling/sampledSet/sampledSets/sampledSets.C
@@ -289,16 +289,10 @@ void Foam::sampledSets::read(const dictionary& dict)
     fieldNames_ = wordList(dict_.lookup("fields"));
 
     interpolationScheme_ = "cell";
-    if (dict_.found("interpolationScheme"))
-    {
-        dict_.lookup("interpolationScheme") >> interpolationScheme_;
-    }
+    dict_.readIfPresent("interpolationScheme", interpolationScheme_);
 
     writeFormat_ = "null";
-    if (dict_.found("setFormat"))
-    {
-        dict_.lookup("setFormat") >> writeFormat_;
-    }
+    dict_.readIfPresent("setFormat", writeFormat_);
 
     scalarFields_.clear();
     vectorFields_.clear();
diff --git a/src/sampling/sampledSurface/plane/sampledPlane.C b/src/sampling/sampledSurface/plane/sampledPlane.C
index 7a9dfdd641c94a110eb3923872512bfdb3e5ee28..d3a7f799f8109f38303f500a437a25bfae7949f0 100644
--- a/src/sampling/sampledSurface/plane/sampledPlane.C
+++ b/src/sampling/sampledSurface/plane/sampledPlane.C
@@ -156,9 +156,8 @@ Foam::sampledPlane::sampledPlane
 
 
     label zoneId = -1;
-    if (dict.found("zone"))
+    if (dict.readIfPresent("zone", zoneName_))
     {
-        dict.lookup("zone") >> zoneName_;
         zoneId = mesh.cellZones().findZoneID(zoneName_);
         if (debug && zoneId < 0)
         {
diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C
index a9418c8046c9d97dbfdcf8bd3eabc57e6e3402a0..8d5c60df918ce241677f331b337723645149057a 100644
--- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C
+++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C
@@ -188,10 +188,7 @@ Foam::sampledSurface::sampledSurface
     CfPtr_(NULL),
     area_(-1)
 {
-    if (dict.found("name"))
-    {
-        dict.lookup("name") >> name_;
-    }
+    dict.readIfPresent("name", name_);
 }
 
 
diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C
index b3aff7e2358b92eea74eb343debe810d51a845a4..4fb6b6c43b0f31e9dfac6fdab2aa1b0535953b7a 100644
--- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C
+++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C
@@ -327,16 +327,10 @@ void Foam::sampledSurfaces::read(const dictionary& dict)
     fieldNames_ = wordList(dict.lookup("fields"));
 
     interpolationScheme_ = "cell";
-    if (dict.found("interpolationScheme"))
-    {
-        dict.lookup("interpolationScheme") >> interpolationScheme_;
-    }
+    dict.readIfPresent("interpolationScheme", interpolationScheme_);
 
     writeFormat_ = "null";
-    if (dict.found("surfaceFormat"))
-    {
-        dict.lookup("surfaceFormat") >> writeFormat_;
-    }
+    dict.readIfPresent("surfaceFormat", writeFormat_);
 
 
     PtrList<sampledSurface> newList
diff --git a/src/thermophysicalModels/combustion/chemistryReaders/chemistryReader/chemistryReader.C b/src/thermophysicalModels/combustion/chemistryReaders/chemistryReader/chemistryReader.C
index 6f278a7f7191b6ef18c77ec594e2f31bc85f9ca2..be4c7b6eae9d6feb265e1087a6ff5de9e3df3113 100644
--- a/src/thermophysicalModels/combustion/chemistryReaders/chemistryReader/chemistryReader.C
+++ b/src/thermophysicalModels/combustion/chemistryReaders/chemistryReader/chemistryReader.C
@@ -46,10 +46,7 @@ Foam::autoPtr<Foam::chemistryReader> Foam::chemistryReader::New
     word chemistryReaderTypeName("chemkinReader");
 
     // otherwise use the specified reader
-    if (thermoDict.found("chemistryReader"))
-    {
-        thermoDict.lookup("chemistryReader") >> chemistryReaderTypeName;
-    }
+    thermoDict.readIfPresent("chemistryReader", chemistryReaderTypeName);
 
     Info<< "Selecting chemistryReader " << chemistryReaderTypeName << endl;
 
diff --git a/src/thermophysicalModels/combustion/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/combustion/chemistryReaders/chemkinReader/chemkinLexer.L
index 18e5366eb5f14bc572682f415abcf650b2f46d83..bfbb4de1e6f8aad3d3db14519a950d27c0d0b746 100644
--- a/src/thermophysicalModels/combustion/chemistryReaders/chemkinReader/chemkinLexer.L
+++ b/src/thermophysicalModels/combustion/chemistryReaders/chemkinReader/chemkinLexer.L
@@ -37,6 +37,7 @@ License
 int Foam::chemkinReader::yyBufSize = YY_BUF_SIZE;
 
 // Dummy yyFlexLexer::yylex() to keep the linker happy. It is not called
+//! @cond dummy
 int yyFlexLexer::yylex()
 {
     Foam::FatalErrorIn("yyFlexLexer::yylex()")
@@ -45,11 +46,13 @@ int yyFlexLexer::yylex()
 
     return 0;
 }
+//! @endcond dummy
 
 
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
+//! @cond dummy
 #if YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
@@ -58,6 +61,8 @@ int yyFlexLexer::yywrap()
 {
     return 1;
 }
+//! @endcond dummy
+
 
 Foam::string foamSpecieString(const char* YYText)
 {
diff --git a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
index eaef9e7803fddc055f7a8cf9fa2f2c4512f957f7..e0652edd8c5345db32918f46b61454e4b03c98ff 100644
--- a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
+++ b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
@@ -40,6 +40,7 @@ License
 using namespace Foam;
 
 // Dummy yyFlexLexer::yylex() to keep the linker happy. It is not called
+//! @cond dummy
 int yyFlexLexer::yylex()
 {
     FatalErrorIn("yyFlexLexer::yylex()")
@@ -47,10 +48,12 @@ int yyFlexLexer::yylex()
         << abort(FatalError);
     return 0;
 }
+//! @endcond dummy
 
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
+//! @cond dummy
 #if YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
@@ -59,6 +62,7 @@ int yyFlexLexer::yywrap()
 {
     return 1;
 }
+//! @endcond dummy
 
 
 class STLLexer
diff --git a/src/turbulenceModels/LES/compressible/LESModel/LESModel.C b/src/turbulenceModels/LES/compressible/LESModel/LESModel.C
index 841d116e62a34ebd01c611fe417fc0a26bc72097..8591c4c7b466669571e3afe13e468c2ef47acb6c 100644
--- a/src/turbulenceModels/LES/compressible/LESModel/LESModel.C
+++ b/src/turbulenceModels/LES/compressible/LESModel/LESModel.C
@@ -88,10 +88,7 @@ LESModel::LESModel
 
     delta_(LESdelta::New("delta", U.mesh(), *this))
 {
-    if (found("k0"))
-    {
-        lookup("k0") >> k0_;
-    }
+    readIfPresent("k0", k0_);
 }
 
 
@@ -117,10 +114,7 @@ bool LESModel::read()
 
         delta_().read(*this);
 
-        if (found("k0"))
-        {
-            lookup("k0") >> k0_;
-        }
+        readIfPresent("k0", k0_);
 
         return true;
     }
diff --git a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C b/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C
index 7be12ff448460e82225eec89cb2d1e32773101ab..4eefbe2d6082dcd951ebe6e0b3b73be97cb24073 100644
--- a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C
+++ b/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C
@@ -87,10 +87,7 @@ LESModel::LESModel
 
     delta_(LESdelta::New("delta", U.mesh(), *this))
 {
-    if (found("k0"))
-    {
-        lookup("k0") >> k0_;
-    }
+    readIfPresent("k0", k0_);
 }
 
 
@@ -117,10 +114,7 @@ bool LESModel::read()
 
         delta_().read(*this);
 
-        if (found("k0"))
-        {
-            lookup("k0") >> k0_;
-        }
+        readIfPresent("k0", k0_);
 
         return true;
     }
diff --git a/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H
index b680174e69f6a14d4e0e6d345caf338761deb716..3ba67f6b24fe36f5292295f285c527abec91a8fe 100644
--- a/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H
+++ b/src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H
@@ -47,7 +47,7 @@ Description
         D = symm(grad(U));
         nuSgs = ck*sqrt(k)*delta
         nuEff = nuSgs + nu
-    @endverabtim
+    @endverbatim
 
 SourceFiles
     dynOneEqEddy.C
diff --git a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H
index 3fac316cdf1b1af73498f59c5b5166436c6328e8..1708dde2446b5b2136a2f994834880d97cf5fcab 100644
--- a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H
+++ b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H
@@ -41,7 +41,7 @@ Description
         Etemad, S., et al.,
         "Turbulent flow and heat transfer in a square-sectioned U bend"
         Progress in compuational fluid dynamics 6, 89-100. 2006.
-    @verbatim
+    @endverbatim
 
 SourceFiles
     LienCubicKELowRe.C
diff --git a/wmake/MakefileOptions b/wmake/MakefileOptions
index f4da8edd9a5996d044351036af773a8148bac68f..9cb02871166b51bb7a78bffd57e209c622768d3e 100644
--- a/wmake/MakefileOptions
+++ b/wmake/MakefileOptions
@@ -23,7 +23,7 @@
 #     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 #
 # Script
-#     MakefileFiles
+#     MakefileOptions
 #
 # Description
 #     General, easy to use make system for multi-platform development.
diff --git a/wmake/makeWmake b/wmake/makeWmake
index 5b2c477257306cb8002f5ec9f26f666ba179df49..a18f72f009be2aa88eab732b57bc3068a0e15aae 100755
--- a/wmake/makeWmake
+++ b/wmake/makeWmake
@@ -27,10 +27,13 @@
 #     makeWmake
 #
 # Description
-#     Script to build all the system specific parts of wmake
+#     Script to build all the system-specific parts of wmake
 #
 #------------------------------------------------------------------------------
 
+# run from this directory only
+cd ${0%/*} || exit 1
+
 ( cd src && make )
 
 #------------------------------------------------------------------------------
diff --git a/wmake/scripts/addCompile b/wmake/scripts/addCompile
index c56f4043b9996284cc03d130729c57182554f2d4..f5d70d2c80acf72617ec618580a5f07344ed27b4 100755
--- a/wmake/scripts/addCompile
+++ b/wmake/scripts/addCompile
@@ -28,8 +28,6 @@
 #
 # Description
 #     Cleans up the dependency list and add the compilation statement.
-#     It has to be written in the C-shell rather than the Bourne shell
-#     because it uses file name manipulators.
 #
 #     Usage: wmkdep <fileName> | addCompile <fileName>
 #
@@ -52,11 +50,11 @@ if [ "$WM_PROJECT_DIR" ]
 then
     sed -e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% > $depName
 else
-	cat > $depName
+    cat > $depName
 fi
 
 
-if [ "$sub" = "java" ]
+if [ "$sub" = java ]
 then
 
     sed -e s%"\(.*\).class.*:"%'$(CLASSES_DIR)/'"\1.class\:"%   \
diff --git a/wmake/scripts/makeFiles b/wmake/scripts/makeFiles
index f0423240c37d968c96f2ab2ec38347a4a7455e63..acda08ccaf7b9b109b1345634b03768ad590948e 100755
--- a/wmake/scripts/makeFiles
+++ b/wmake/scripts/makeFiles
@@ -28,43 +28,36 @@
 #
 # Description
 #     Scan the current directory for source files and construct Make/files
-#     It has to be written in the C-shell rather than the Bourne shell
-#     because it uses file name manipulators.
 #
 #     Usage : makeFiles
 #
 #------------------------------------------------------------------------------
 
-if [ -r "Make/files" ]
+if [ -r Make/files ]
 then
-    echo "makeFiles: Make/files already exists, exiting"
-    exit 1
-fi
-
-
-if [ ! -d "Make" ]
-then
-    mkdir Make
+   echo "makeFiles: Make/files already exists, exiting"
+   exit 1
 fi
 
 rulesPath=$WM_DIR/rules/$WM_ARCH$WM_COMPILER
 
+[ -d Make ] || mkdir Make
 rm -f Make/files
 
 dirs=`find . -name "*" -type d -print`
 
 for dir in $dirs
 do
-	if [ $dir != "." ]
-	then
-        baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
-        baseDir=`echo $dir | sed 's%^\./%%'`
+   if [ $dir != . ]
+   then
+      baseDirName=`echo $dir | sed 's%^\./%%' | $rulesPath/dirToString`
+      baseDir=`echo $dir | sed 's%^\./%%'`
 
-        if [ $baseDirName != "Make" ]
-        then
-            echo $baseDirName " = " $baseDir >> Make/files
-        fi
-	fi
+      if [ $baseDirName != Make ]
+      then
+         echo $baseDirName " = " $baseDir >> Make/files
+      fi
+   fi
 done
 
 echo >> Make/files
@@ -86,7 +79,6 @@ done
 
 echo >> Make/files
 
-pwd=`pwd`
-echo 'EXE = $(FOAM_APPBIN)/'${pwd##*/} >> Make/files
+echo 'EXE = $(FOAM_APPBIN)/'${PWD##*/} >> Make/files
 
 #------------------------------------------------------------------------------
diff --git a/wmake/scripts/makeOptions b/wmake/scripts/makeOptions
index 6847125ab92bcd525cbcebc9d9963bce7a291169..774df99117755f880d5edf005710758f0880abd5 100755
--- a/wmake/scripts/makeOptions
+++ b/wmake/scripts/makeOptions
@@ -28,26 +28,18 @@
 #
 # Description
 #     Scan the current directory for options and construct Make/options
-#     It has to be written in the C-shell rather than the Bourne shell
-#     because it uses file name manipulators.
 #
 #     Usage : makeOptions
 #
 #------------------------------------------------------------------------------
 
-if [ -r "Make/options" ]
+if [ -r Make/options ]
 then
-    echo "makeOptions: Make/options already exists, exiting"
-    exit 1
+   echo "makeOptions: Make/options already exists, exiting"
+   exit 1
 fi
 
-
-if [ ! -d "Make" ]
-then
-    mkdir Make
-fi
-
-rulesPath=$WM_DIR/rules/$WM_ARCH
+[ -d Make ] || mkdir Make
 
 rm -f Make/options
 
diff --git a/wmake/scripts/mkObjectDir b/wmake/scripts/mkObjectDir
index f4a281c6f370cc69723b7ce8dd4040d725b310a7..c367a5322f63bdda8f1eb3a9096141aa9cf23a57 100755
--- a/wmake/scripts/mkObjectDir
+++ b/wmake/scripts/mkObjectDir
@@ -27,15 +27,13 @@
 #     mkObjectDir
 #
 # Description
-#     Makes a directory hierachy for the given object file
-#     It has to be written in the C-shell rather than the Bourne shell
-#     because it uses file name manipulators.
+#     Makes a directory hierarchy for the given object file
 #
 #     Usage: mkObjectDir <directory>
 #
 #------------------------------------------------------------------------------
 
-if [ $# = 1 ]
+if [ $# -eq 1 ]
 then
     if [ ! -d ${1%/*} -a $1 != ${1%/*} ]
     then
diff --git a/wmake/wclean b/wmake/wclean
index d9b932bebb455bc73357a0676e8b01a21f4b03f4..1ea917eec52bd840b1cc66146fc6f2f4a4131860 100755
--- a/wmake/wclean
+++ b/wmake/wclean
@@ -54,7 +54,8 @@ USAGE
 }
 
 # provide immediate help
-if [ "$1" = "-h" -o "$1" = "-help" ]; then
+if [ "$1" = "-h" -o "$1" = "-help" ]
+then
    usage
 fi
 
@@ -93,7 +94,7 @@ then
          echo "$Script error"
          echo "    could not change to directory '$dir'"
          exit 1
-      }      
+      }
    fi
 
    # provide some feedback
diff --git a/wmake/wcleanAll b/wmake/wcleanAll
index 4b8fc3cbb03dd1328692774e5221324094172cec..e7d3477cb7d65cb6252a2a285ed786d89e14f1e1 100755
--- a/wmake/wcleanAll
+++ b/wmake/wcleanAll
@@ -24,7 +24,7 @@
 #     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 #
 # Script
-#     wmakeAll
+#     wcleanAll
 #
 # Description
 #     script that searches all the directories below the current for the
@@ -32,19 +32,14 @@
 #
 #------------------------------------------------------------------------------
 
-if [ ! -d bin -o ! -d src ]
-then
-   echo $0: not in the project top level directory !
+[ -d bin -a -d src ] || {
+   echo "${0##*/}: not in the project top level directory"
    exit 1
-fi
-
+}
 
 for dir in lib applications/bin
 do
-   if [ -d $dir ]
-   then
-      rm -rf $dir/*
-   fi
+   [ -d $dir ] && rm -rf $dir/*
 done
 
 ( cd tutorials && ./Allclean )
diff --git a/wmake/wcleanAlmostAll b/wmake/wcleanAlmostAll
index 8ceaaf7865b3352f36601bd71f0aea5b3a433a28..515c3110d856507686bddbc0fc60f687cb5c5396 100755
--- a/wmake/wcleanAlmostAll
+++ b/wmake/wcleanAlmostAll
@@ -32,18 +32,14 @@
 #
 #------------------------------------------------------------------------------
 
-if [ ! -d bin -o ! -d src ]
-then
-   echo $0: not in the project top level directory !
+[ -d bin -a -d src ] || {
+   echo "${0##*/}: not in the project top level directory"
    exit 1
-fi
-
+}
 
 for dir in lib applications/bin
 do
-   if [ -d $dir ]
-      rm -rf $dir/*
-   fi
+   [ -d $dir ] && rm -rf $dir/*
 done
 
 ( cd tutorials && ./Allclean )
diff --git a/wmake/wcleanMachine b/wmake/wcleanMachine
index d3fcfc0c1684faa7c3a7e33ea4eacca283e61f32..a3deba2322c505a98fd1b2adc9460ae25aaf9003 100755
--- a/wmake/wcleanMachine
+++ b/wmake/wcleanMachine
@@ -27,44 +27,39 @@
 #     wcleanMachine
 #
 # Description
-#     Searches all the directories below the current for the
-#     object file directories of the specified machine and then deletes them.
+#     Searches the directories below the current directory for the object
+#     file directories of the specified machine type(s) and deletes them
 #
-#     Usage: wcleanMachine <machineType>
+#     Usage: wcleanMachine <machineType> [ .. <machineTypeN> ]
 #
 #------------------------------------------------------------------------------
 
-if [ $# = 0 ]
+if [ $# -eq 0 ]
 then
-   echo $0: wcleanMachine : Machine type expected, exiting !
+   echo "${0##*/}: Machine type(s) expected, exiting !"
    exit 1
 fi
 
-
-if [ ! -d lib -o ! -d src ]
-then
-   echo $0: not in the project top level directory !
+[ -d lib -a -d src ] || {
+   echo "${0##*/}: not in the project top level directory !"
    exit 1
-fi
+}
 
-find `find . -depth \( -name "Make.[A-Za-z]*" -o -name "Make" \) -type d -print` \
-    -depth \( -type d -name "*$1" -o -name "*$1$WM_MPLIB" \) -exec rm -r {} \;
 
-#find . -depth -type d \( -name ii_files -o -name Templates.DB \) -exec rm -rf {} \;
+for machType
+do
+   echo "Cleaning machine type: $machType"
 
+   find `find . -depth \( -name "Make.[A-Za-z]*" -o -name "Make" \) -type d -print` \
+       -depth \( -type d -name "*$machType" -o -name "*$machType$WM_MPLIB" \) -exec rm -r {} \;
 
-if [ -d lib/$1 ]
-then
-    rm -r lib/$1
-fi
+   # find . -depth -type d \( -name ii_files -o -name Templates.DB \) -exec rm -rf {} \;
 
-if [ applications/bin ]
-then
-    if [ -d applications/bin/$1 ]
-    then
-       rm -r applications/bin/$1
-    fi
-fi
+   for dir in lib/$machType applications/bin/$machType
+   do
+      [ -d $dir ] && rm -r $dir
+   done
 
+done
 
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeDerivedFiles b/wmake/wmakeDerivedFiles
index a88c85900e92c0b948145bf11a58fb0f18c8ad60..e4fd037a25703b86b9dcbdf7f0fb890a161e597e 100755
--- a/wmake/wmakeDerivedFiles
+++ b/wmake/wmakeDerivedFiles
@@ -32,14 +32,17 @@
 #
 #------------------------------------------------------------------------------
 
-if [ ! -d $WM_OPTIONS ]
+if [ ! -d "$WM_OPTIONS" ]
 then
-    echo The $WM_OPTIONS directory does not exist, exiting \!
+    echo "The $WM_OPTIONS directory does not exist, exiting"
     exit 1
 fi
 
 # change to the $WM_OPTIONS directory
-cd $WM_OPTIONS
+cd $WM_OPTIONS 2>/dev/null || {
+   echo "Could not change to directory '$WM_OPTIONS'"
+   exit 1
+}
 
 # Find and keep macro definitions in files list
 grep "=" files > filesMacros
@@ -141,5 +144,4 @@ rm files.$$
 
 cd ..
 
-
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeFilesAndOptions b/wmake/wmakeFilesAndOptions
index 54ced8b28d72234010ceb4d2ba969417e1694463..f65b7c435e1ee55c3ce68dcb30dd420bf700254d 100755
--- a/wmake/wmakeFilesAndOptions
+++ b/wmake/wmakeFilesAndOptions
@@ -35,48 +35,34 @@
 #------------------------------------------------------------------------------
 Script=${0##*/}
 
-if [ ! "$WM_OPTIONS" ]
-then
-    echo "$Script: environment variable $WM_OPTIONS not set, exiting!"
-    exit 1
-fi
-
-
-if [ ! "$WM_DIR" ]
-then
-    echo "$Script: environment variable $WM_DIR not set"
-    exit 1
-fi
-
-
-if [ ! "$WM_LINK_LANGUAGE" ]
-then
-    echo "$Script: environment variable $WM_LINK_LANGUAGE not set"
-    exit 1
-fi
-
+#
+# check environment variables
+#
+for check in WM_OPTIONS WM_LINK_LANGUAGE WM_DIR
+do
+   eval test "\$$check" || {
+      echo "$Script error"
+      echo "    environment variable \$$check not set"
+      exit 1
+   }
+done
 
-if [ -d "Make" ]
+if [ -d Make ]
 then
-    echo "$Script: Make directory already exists"
-    exit 1
+   echo "$Script: Make directory already exists"
+   exit 1
 else
-    mkdir Make
-fi
-
-
-if [ ! -e "Make/files"  ]
-then
-    echo "$Script: Creating files"
-    $WM_DIR/scripts/makeFiles
+   mkdir Make
 fi
 
+[ -e Make/files ] || {
+   echo "$Script: Creating files"
+   $WM_DIR/scripts/makeFiles
+}
 
-if [ ! -e "Make/options"  ]
-then
-    echo "$Script: Creating options"
-    $WM_DIR/scripts/makeOptions
-fi
-
+[ -e Make/options ] || {
+   echo "$Script: Creating options"
+   $WM_DIR/scripts/makeOptions
+}
 
 #------------------------------------------------------------------------------