From 334caa501858f98dbf0208fe41cc1ffc5d15353f Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Thu, 12 Oct 2017 19:20:56 +0200
Subject: [PATCH] TUT: script cleanup, provide cleanCase0 for commonly used
 operation

---
 .../surface/surfaceBooleanFeatures/Allwmake   |   2 +-
 bin/foamCleanTutorials                        |   4 +-
 bin/foamRunTutorials                          |   8 +-
 bin/tools/CleanFunctions                      |  30 ++--
 bin/tools/RunFunctions                        | 150 ++++++++++--------
 src/mesh/Allwmake                             |   2 +-
 tutorials/DNS/dnsFoam/boxTurb16/Allclean      |   6 +-
 tutorials/DNS/dnsFoam/boxTurb16/Allrun        |   6 +-
 tutorials/IO/fileHandler/Allclean             |   6 +-
 tutorials/IO/fileHandler/Allrun               |   6 +-
 tutorials/IO/fileHandler/Alltest              |   6 +-
 tutorials/basic/laplacianFoam/flange/Allclean |   6 +-
 tutorials/basic/laplacianFoam/flange/Allrun   |   6 +-
 .../heatTransfer/Allclean                     |   9 +-
 .../overLaplacianDyMFoam/heatTransfer/Allrun  |   4 +-
 .../heatTransfer/Allrun.pre                   |   4 +-
 .../basic/potentialFoam/cylinder/Allclean     |   9 +-
 tutorials/basic/potentialFoam/cylinder/Allrun |   6 +-
 .../basic/potentialFoam/pitzDaily/Allclean    |   9 +-
 .../basic/potentialFoam/pitzDaily/Allrun      |   6 +-
 .../flamePropagationWithObstacles/Allclean    |   9 +-
 .../flamePropagationWithObstacles/Allrun      |   6 +-
 .../annularCombustorTurbine/Allclean          |   9 +-
 .../XiDyMFoam/annularCombustorTurbine/Allrun  |   6 +-
 .../annularCombustorTurbine/Allrun.mesh       |   6 +-
 tutorials/combustion/XiFoam/RAS/Allclean      |  12 +-
 tutorials/combustion/XiFoam/RAS/Allrun        |   6 +-
 tutorials/combustion/chemFoam/gri/Allclean    |   9 +-
 tutorials/combustion/chemFoam/gri/Allrun      |   6 +-
 tutorials/combustion/chemFoam/h2/Allclean     |   9 +-
 tutorials/combustion/chemFoam/h2/Allrun       |   6 +-
 tutorials/combustion/chemFoam/ic8h18/Allclean |   9 +-
 tutorials/combustion/chemFoam/ic8h18/Allrun   |   6 +-
 .../combustion/chemFoam/ic8h18_TDAC/Allclean  |   9 +-
 .../combustion/chemFoam/ic8h18_TDAC/Allrun    |   6 +-
 .../ic8h18_TDAC/validation/createGraph        |   2 +-
 tutorials/combustion/chemFoam/nc7h16/Allclean |   9 +-
 tutorials/combustion/chemFoam/nc7h16/Allrun   |   6 +-
 .../combustion/engineFoam/kivaTest/Allclean   |   9 +-
 .../combustion/engineFoam/kivaTest/Allrun     |   6 +-
 .../fireFoam/LES/compartmentFire/Allclean     |   8 +-
 .../fireFoam/LES/compartmentFire/Allrun       |   8 +-
 .../flameSpreadWaterSuppressionPanel/Allclean |   6 +-
 .../flameSpreadWaterSuppressionPanel/Allrun   |   6 +-
 .../LES/oppositeBurningPanels/Allclean        |   6 +-
 .../fireFoam/LES/oppositeBurningPanels/Allrun |   6 +-
 .../fireFoam/LES/simplePMMApanel/Allclean     |   8 +-
 .../fireFoam/LES/simplePMMApanel/Allrun       |   8 +-
 .../fireFoam/LES/smallPoolFire2D/Allclean     |   6 +-
 .../fireFoam/LES/smallPoolFire2D/Allrun       |   6 +-
 .../fireFoam/LES/smallPoolFire3D/Allclean     |   6 +-
 .../fireFoam/LES/smallPoolFire3D/Allrun       |   6 +-
 .../reactingFoam/RAS/DLR_A_LTS/Allclean       |   6 +-
 .../reactingFoam/RAS/DLR_A_LTS/Allrun         |   6 +-
 .../reactingFoam/RAS/SandiaD_LTS/Allclean     |  10 +-
 .../reactingFoam/RAS/SandiaD_LTS/Allrun       |   6 +-
 .../rhoCentralFoam/biconic25-55Run35/Allclean |   6 +-
 .../rhoCentralFoam/biconic25-55Run35/Allrun   |   6 +-
 .../rhoCentralFoam/shockTube/Allclean         |   9 +-
 .../rhoCentralFoam/shockTube/Allrun           |   6 +-
 .../rutlandVortex2D/Allclean                  |  10 +-
 .../rutlandVortex2D/Allrun                    |   8 +-
 .../annularThermalMixer/Allclean              |   9 +-
 .../annularThermalMixer/Allrun                |   6 +-
 .../rhoPimpleFoam/RAS/angledDuct/Allrun       |   6 +-
 .../rhoPimpleFoam/RAS/angledDuctLTS/Allrun    |   6 +-
 .../rhoPimpleFoam/RAS/mixerVessel2D/Allrun    |   6 +-
 .../rhoPimpleFoam/RAS/mixerVessel2D/makeMesh  |   8 +-
 .../laminar/helmholtzResonance/Allclean       |   6 +-
 .../laminar/helmholtzResonance/Allrun         |   6 +-
 .../laminar/sineWaveDamping/Allclean          |   6 +-
 .../laminar/sineWaveDamping/Allrun            |   6 +-
 .../angledDuct/explicit/Allclean              |  10 +-
 .../angledDuct/explicit/Allrun                |   6 +-
 .../angledDuct/implicit/Allclean              |  10 +-
 .../angledDuct/implicit/Allrun                |   6 +-
 .../angledDuctExplicitFixedCoeff/Allrun       |   6 +-
 .../gasMixing/injectorPipe/Allclean           |   9 +-
 .../gasMixing/injectorPipe/Allrun             |   6 +-
 .../gasMixing/injectorPipe/Allrun.mesh        |   6 +-
 .../sonicFoam/RAS/nacaAirfoil/Allclean        |   6 +-
 .../sonicFoam/RAS/nacaAirfoil/Allrun          |   6 +-
 .../sonicFoam/laminar/shockTube/Allclean      |   9 +-
 .../sonicFoam/laminar/shockTube/Allrun        |   6 +-
 .../compressible/sonicLiquidFoam/Allclean     |   6 +-
 tutorials/compressible/sonicLiquidFoam/Allrun |   6 +-
 .../dsmcFoam/freeSpacePeriodic/Allclean       |   7 +-
 .../dsmcFoam/freeSpacePeriodic/Allrun         |   6 +-
 .../dsmcFoam/freeSpaceStream/Allclean         |   7 +-
 .../dsmcFoam/freeSpaceStream/Allrun           |   6 +-
 .../dsmcFoam/supersonicCorner/Allclean        |   7 +-
 .../dsmcFoam/supersonicCorner/Allrun          |   6 +-
 .../dsmcFoam/wedge15Ma5/Allclean              |   7 +-
 .../dsmcFoam/wedge15Ma5/Allrun                |   6 +-
 .../periodicCubeArgon/Allclean                |   6 +-
 .../periodicCubeArgon/Allrun                  |   6 +-
 .../periodicCubeWater/Allclean                |   6 +-
 .../periodicCubeWater/Allrun                  |   6 +-
 .../mdFoam/nanoNozzle/Allclean                |   6 +-
 .../mdFoam/nanoNozzle/Allrun                  |   6 +-
 .../mhdFoam/hartmann/Allclean                 |   6 +-
 .../electromagnetics/mhdFoam/hartmann/Allrun  |   6 +-
 .../hotRoom/Allclean                          |   6 +-
 .../hotRoom/Allrun                            |   6 +-
 .../hotRoom/Allclean                          |   6 +-
 .../hotRoom/Allrun                            |   6 +-
 .../iglooWithFridges/Allrun                   |   6 +-
 .../buoyantPimpleFoam/hotRoom/Allclean        |   9 +-
 .../buoyantPimpleFoam/hotRoom/Allrun          |   6 +-
 .../thermocoupleTestCase/Allclean             |   6 +-
 .../thermocoupleTestCase/Allrun               |   6 +-
 .../buoyantSimpleFoam/buoyantCavity/Allclean  |   6 +-
 .../buoyantSimpleFoam/buoyantCavity/Allrun    |   6 +-
 .../circuitBoardCooling/Allclean              |   9 +-
 .../circuitBoardCooling/Allrun                |   6 +-
 .../hotRadiationRoom/Allclean                 |   6 +-
 .../buoyantSimpleFoam/hotRadiationRoom/Allrun |   6 +-
 .../hotRadiationRoomFvDOM/Allclean            |   6 +-
 .../hotRadiationRoomFvDOM/Allrun              |   6 +-
 .../externalCoupledMultiRegionHeater/Allclean |   8 +-
 .../externalCoupledMultiRegionHeater/Allrun   |   8 +-
 .../Allrun.pre                                |   8 +-
 .../externalSolarLoad/Allclean                |   9 +-
 .../externalSolarLoad/Allrun                  |   8 +-
 .../externalSolarLoad/Allrun-parallel         |   2 +-
 .../externalSolarLoad/Allrun.pre              |   2 +-
 .../multiRegionHeater/Allclean                |   6 +-
 .../multiRegionHeater/Allrun                  |   6 +-
 .../snappyMultiRegionHeater/Allclean          |   6 +-
 .../snappyMultiRegionHeater/Allrun            |   6 +-
 .../windshieldCondensation/Allclean           |   9 +-
 .../windshieldCondensation/Allrun             |   6 +-
 .../windshieldCondensation/Allrun-parallel    |   6 +-
 .../windshieldDefrost/Allclean                |   9 +-
 .../windshieldDefrost/Allrun                  |   8 +-
 .../windshieldDefrost/Allrun-parallel         |   8 +-
 .../windshieldDefrost/Allrun.pre              |   8 +-
 .../heatExchanger/Allclean                    |   9 +-
 .../heatExchanger/Allrun                      |   8 +-
 .../heatExchanger/Allrun-parallel             |   8 +-
 .../heatExchanger/Allrun.pre                  |   8 +-
 .../jouleHeatingSolid/Allclean                |   9 +-
 .../jouleHeatingSolid/Allrun                  |   8 +-
 .../jouleHeatingSolid/Allrun-parallel         |   8 +-
 .../jouleHeatingSolid/Allrun.pre              |   8 +-
 .../multiRegionHeaterRadiation/Allclean       |   7 +-
 .../multiRegionHeaterRadiation/Allrun         |   6 +-
 .../Allrun-parallel                           |   6 +-
 .../multiRegionHeaterRadiation/Allrun.pre     |   6 +-
 .../SRFPimpleFoam/rotor2D/Allrun              |   6 +-
 .../boundaryWallFunctionsProfile/Allclean     |   6 +-
 .../boundaryWallFunctionsProfile/Allrun       |   6 +-
 .../incompressible/icoFoam/cavity/Allclean    |  11 +-
 .../incompressible/icoFoam/cavity/Allrun      |  19 ++-
 .../icoFoam/cavityMappingTest/Allclean        |   6 +-
 .../icoFoam/cavityMappingTest/Allrun          |   8 +-
 .../icoFoam/cavityMappingTest/Allrun-parallel |   8 +-
 .../incompressible/icoFoam/elbow/Allclean     |   6 +-
 tutorials/incompressible/icoFoam/elbow/Allrun |   6 +-
 .../lumpedPointMotion/building/Allrun         |   4 +-
 .../lumpedPointMotion/building/Allrun.move    |   4 +-
 .../building/files/Allrun.movement            |   4 +-
 .../building/files/Allrun.transient           |   4 +-
 .../building/steady/Allclean                  |   7 +-
 .../lumpedPointMotion/building/steady/Allrun  |   4 +-
 .../building/steady/Allrun.pre                |   4 +-
 .../overPimpleDyMFoam/cylinder/Allclean       |   2 +-
 .../overPimpleDyMFoam/cylinder/Allrun         |   5 +-
 .../overPimpleDyMFoam/cylinder/Allrun.pre     |   5 +-
 .../cylinder/cylinderAndBackground/Allclean   |   9 +-
 .../cylinder/cylinderAndBackground/Allrun     |   4 +-
 .../cylinder/cylinderAndBackground/Allrun.pre |   4 +-
 .../cylinder/cylinderMesh/Allrun.pre          |   5 +-
 .../overPimpleDyMFoam/simpleRotor/Allclean    |   9 +-
 .../overPimpleDyMFoam/simpleRotor/Allrun      |   4 +-
 .../overPimpleDyMFoam/simpleRotor/Allrun.pre  |   4 +-
 .../twoSimpleRotors/Allclean                  |   9 +-
 .../overPimpleDyMFoam/twoSimpleRotors/Allrun  |   4 +-
 .../twoSimpleRotors/Allrun.pre                |   4 +-
 .../overSimpleFoam/aeroFoil/Allclean          |  27 ++--
 .../overSimpleFoam/aeroFoil/Allrun            |  12 +-
 .../overSimpleFoam/aeroFoil/Allrun.pre        |  15 +-
 .../aeroFoil/aeroFoil_overset/Allrun.pre      |   9 +-
 .../aeroFoil_snappyHexMesh/Allrun.pre         |   8 +-
 .../aeroFoil/background_overset/Allclean      |   9 +-
 .../aeroFoil/background_overset/Allrun        |   4 +-
 .../aeroFoil/background_overset/Allrun.pre    |   4 +-
 .../background_snappyHexMesh/Allrun.pre       |   9 +-
 .../pimpleDyMFoam/mixerVesselAMI2D/Allrun     |   6 +-
 .../pimpleDyMFoam/mixerVesselAMI2D/makeMesh   |   6 +-
 .../oscillatingInletACMI2D/Allclean           |   9 +-
 .../oscillatingInletACMI2D/Allrun             |   8 +-
 .../oscillatingInletACMI2D/Allrun-parallel    |   8 +-
 .../oscillatingInletACMI2D/Allrun.pre         |   8 +-
 .../pimpleDyMFoam/propeller/Allclean          |   9 +-
 .../pimpleDyMFoam/propeller/Allrun            |   8 +-
 .../pimpleDyMFoam/propeller/Allrun.pre        |   7 +-
 .../pimpleDyMFoam/wingMotion/Allclean         |  23 +--
 .../pimpleDyMFoam/wingMotion/Allrun           |   6 +-
 .../pimpleFoam/LES/channel395/Allrun          |   6 +-
 .../pimpleFoam/LES/channel395DFSEM/Allrun     |   8 +-
 .../pimpleFoam/LES/vortexShed/Allclean        |  10 +-
 .../pimpleFoam/LES/vortexShed/Allrun          |   8 +-
 .../pimpleFoam/RAS/TJunctionFan/Allclean      |   9 +-
 .../pimpleFoam/RAS/TJunctionFan/Allrun        |   8 +-
 .../pimpleFoam/RAS/elipsekkLOmega/Allclean    |   6 +-
 .../pimpleFoam/RAS/elipsekkLOmega/Allrun      |   6 +-
 .../laminar/planarPoiseuille/Allclean         |   6 +-
 .../laminar/planarPoiseuille/Allrun           |   6 +-
 .../planarPoiseuille/validation/createGraph   |   2 +-
 .../pisoFoam/LES/motorBike/Allclean           |   6 +-
 .../pisoFoam/LES/motorBike/Allrun             |   4 +-
 .../pisoFoam/LES/motorBike/lesFiles/Allrun    |   6 +-
 .../pisoFoam/LES/motorBike/motorBike/Allclean |   9 +-
 .../pisoFoam/LES/motorBike/motorBike/Allrun   |   6 +-
 .../pisoFoam/laminar/porousBlockage/Allrun    |   6 +-
 .../angledDuct/explicit/Allclean              |  10 +-
 .../angledDuct/explicit/Allrun                |   6 +-
 .../angledDuct/implicit/Allclean              |  10 +-
 .../angledDuct/implicit/Allrun                |   6 +-
 .../straightDuctImplicit/Allclean             |   6 +-
 .../straightDuctImplicit/Allrun               |   6 +-
 .../straightDuctImplicit/Allrun.pre           |   6 +-
 .../incompressible/simpleFoam/T3A/Allclean    |   6 +-
 .../incompressible/simpleFoam/T3A/Allrun      |   6 +-
 .../simpleFoam/airFoil2D/Allrun               |   6 +-
 .../simpleFoam/mixerVessel2D/Allrun           |   6 +-
 .../simpleFoam/mixerVessel2D/makeMesh         |   6 +-
 .../simpleFoam/motorBike/Allclean             |   9 +-
 .../simpleFoam/motorBike/Allrun               |   8 +-
 .../simpleFoam/pipeCyclic/Allclean            |   9 +-
 .../simpleFoam/pipeCyclic/Allrun              |   6 +-
 .../simpleFoam/rotorDisk/Allclean             |   6 +-
 .../simpleFoam/rotorDisk/Allrun               |   6 +-
 .../simpleFoam/simpleCar/Allrun               |   6 +-
 .../simpleFoam/turbineSiting/Allclean         |   9 +-
 .../simpleFoam/turbineSiting/Allrun           |   6 +-
 .../simpleFoam/windAroundBuildings/Allclean   |   6 +-
 .../simpleFoam/windAroundBuildings/Allrun     |   6 +-
 .../lagrangian/MPPICFoam/cyclone/Allclean     |   6 +-
 tutorials/lagrangian/MPPICFoam/cyclone/Allrun |   6 +-
 .../coalChemistryFoam/simplifiedSiwek/Allrun  |   6 +-
 .../mixerVesselAMI2D/Allrun                   |   8 +-
 .../hopper/Allclean                           |  19 +--
 .../hopper/Allrun                             |   6 +-
 .../reactingParcelFoam/cylinder/Allclean      |   9 +-
 .../reactingParcelFoam/cylinder/Allrun        |   6 +-
 .../reactingParcelFoam/cylinder/Allrun.pre    |   6 +-
 .../reactingParcelFoam/filter/Allclean        |   9 +-
 .../reactingParcelFoam/filter/Allrun          |   6 +-
 .../reactingParcelFoam/hotBoxes/Allclean      |   9 +-
 .../reactingParcelFoam/hotBoxes/Allrun        |   6 +-
 .../hotBoxes/Allrun-parallel                  |   6 +-
 .../reactingParcelFoam/hotBoxes/Allrun.pre    |   6 +-
 .../reactingParcelFoam/rivuletPanel/Allclean  |   9 +-
 .../reactingParcelFoam/rivuletPanel/Allrun    |   6 +-
 .../rivuletPanel/Allrun.pre                   |   6 +-
 .../reactingParcelFoam/splashPanel/Allclean   |   9 +-
 .../reactingParcelFoam/splashPanel/Allrun     |   6 +-
 .../reactingParcelFoam/splashPanel/Allrun.pre |   6 +-
 .../verticalChannel/Allclean                  |   9 +-
 .../reactingParcelFoam/verticalChannel/Allrun |   6 +-
 .../verticalChannelLTS/Allclean               |   9 +-
 .../verticalChannelLTS/Allrun                 |   6 +-
 .../verticalChannel/Allclean                  |   9 +-
 .../verticalChannel/Allrun                    |   6 +-
 tutorials/mesh/blockMesh/pipe/Allrun          |   6 +-
 tutorials/mesh/blockMesh/sphere/Allrun        |   6 +-
 tutorials/mesh/blockMesh/sphere7/Allrun       |   6 +-
 .../blockMesh/sphere7ProjectedEdges/Allrun    |   6 +-
 tutorials/mesh/foamyHexMesh/Allrun            |  26 +--
 tutorials/mesh/foamyHexMesh/blob/Allclean     |   9 +-
 tutorials/mesh/foamyHexMesh/blob/Allrun       |   6 +-
 .../mesh/foamyHexMesh/blob/Allrun-parallel    |   6 +-
 tutorials/mesh/foamyHexMesh/flange/Allclean   |   9 +-
 tutorials/mesh/foamyHexMesh/flange/Allrun     |   6 +-
 .../mesh/foamyHexMesh/flange/Allrun-parallel  |   6 +-
 .../mesh/foamyHexMesh/mixerVessel/Allclean    |   9 +-
 .../mesh/foamyHexMesh/mixerVessel/Allrun      |   6 +-
 .../mesh/foamyHexMesh/mixerVessel/Allrun-pre  |   8 +-
 .../mixerVessel/Allrun-simulation             |   6 +-
 .../mesh/foamyHexMesh/simpleShapes/Allclean   |   9 +-
 .../mesh/foamyHexMesh/simpleShapes/Allrun     |   6 +-
 tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean |   9 +-
 tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun   |   6 +-
 .../OpenCFD/Allrun-rhoCentralFoam             |   6 +-
 .../foamyQuadMesh/jaggedBoundary/Allclean     |   6 +-
 .../mesh/foamyQuadMesh/jaggedBoundary/Allrun  |   6 +-
 tutorials/mesh/foamyQuadMesh/square/Allclean  |   6 +-
 tutorials/mesh/foamyQuadMesh/square/Allrun    |   6 +-
 .../moveDynamicMesh/relativeMotion/Allclean   |  18 +--
 .../moveDynamicMesh/relativeMotion/Allrun     |   6 +-
 tutorials/mesh/parallel/cavity/Allclean       |   2 +-
 tutorials/mesh/parallel/cavity/Allrun         |   2 +-
 tutorials/mesh/parallel/filter/Allclean       |   9 +-
 tutorials/mesh/parallel/filter/Allrun         |   8 +-
 .../mesh/refineMesh/refineFieldDirs/Allclean  |   9 +-
 .../mesh/refineMesh/refineFieldDirs/Allrun    |   6 +-
 tutorials/mesh/snappyHexMesh/Allrun           |  18 +--
 .../addLayersToFaceZone/Allclean              |   6 +-
 .../snappyHexMesh/addLayersToFaceZone/Allrun  |   6 +-
 tutorials/mesh/snappyHexMesh/flange/Allclean  |   9 +-
 tutorials/mesh/snappyHexMesh/flange/Allrun    |   6 +-
 .../mesh/snappyHexMesh/gap_detection/Allclean |   6 +-
 .../mesh/snappyHexMesh/gap_detection/Allrun   |   6 +-
 .../MPPICInterFoam/twoPhasePachuka/Allclean   |   8 +-
 .../MPPICInterFoam/twoPhasePachuka/Allrun     |   8 +-
 .../multiphase/cavitatingFoam/LES/Allrun      |  11 +-
 .../cavitatingFoam/LES/throttle/Allclean      |   6 +-
 .../cavitatingFoam/LES/throttle/Allrun        |   6 +-
 .../cavitatingFoam/LES/throttle3D/Allclean    |   9 +-
 .../cavitatingFoam/LES/throttle3D/Allrun      |   6 +-
 .../cavitatingFoam/RAS/throttle/Allclean      |   6 +-
 .../cavitatingFoam/RAS/throttle/Allrun        |   6 +-
 .../laminar/sloshingTank2D/Allrun             |   6 +-
 .../laminar/sphereDrop/Allclean               |   8 +-
 .../laminar/sphereDrop/Allrun                 |   4 +-
 .../laminar/sphereDrop/Allrun.parallel        |   4 +-
 .../laminar/depthCharge2D/Allclean            |   9 +-
 .../laminar/depthCharge2D/Allrun              |   6 +-
 .../laminar/depthCharge3D/Allclean            |   9 +-
 .../laminar/depthCharge3D/Allrun              |   6 +-
 .../laminar/damBreak4phase/Allclean           |   9 +-
 .../laminar/damBreak4phase/Allrun             |   6 +-
 .../driftFluxFoam/RAS/mixerVessel2D/Allrun    |   6 +-
 .../driftFluxFoam/RAS/mixerVessel2D/makeMesh  |   2 +
 .../driftFluxFoam/RAS/tank3D/Allrun           |   6 +-
 .../condensatingVessel/Allclean               |   6 +-
 .../condensatingVessel/Allrun                 |   6 +-
 .../interDyMFoam/RAS/DTCHull/Allclean         |   8 +-
 .../interDyMFoam/RAS/DTCHull/Allrun           |   6 +-
 .../interDyMFoam/RAS/floatingObject/Allclean  |   9 +-
 .../interDyMFoam/RAS/floatingObject/Allrun    |   6 +-
 .../interDyMFoam/RAS/mixerVesselAMI/Allclean  |   9 +-
 .../interDyMFoam/RAS/mixerVesselAMI/Allrun    |   6 +-
 .../RAS/mixerVesselAMI/Allrun.pre             |   6 +-
 .../interDyMFoam/RAS/motorBike/Allclean       |  11 +-
 .../interDyMFoam/RAS/motorBike/Allrun         |   8 +-
 .../interDyMFoam/RAS/motorBike/Allrun.pre     |   6 +-
 .../laminar/damBreakWithObstacle/Allclean     |   9 +-
 .../laminar/damBreakWithObstacle/Allrun       |   6 +-
 .../laminar/sloshingCylinder/Allrun           |   6 +-
 .../laminar/sloshingTank2D/Allrun             |   6 +-
 .../laminar/sloshingTank2D3DoF/Allrun         |   6 +-
 .../laminar/sloshingTank3D/Allrun             |   6 +-
 .../laminar/sloshingTank3D3DoF/Allrun         |   6 +-
 .../laminar/sloshingTank3D6DoF/Allrun         |   6 +-
 .../laminar/testTubeMixer/Allclean            |   6 +-
 .../interDyMFoam/laminar/testTubeMixer/Allrun |   6 +-
 .../interFoam/LES/nozzleFlow2D/Allclean       |   6 +-
 .../interFoam/LES/nozzleFlow2D/Allrun         |   6 +-
 .../multiphase/interFoam/RAS/DTCHull/Allclean |   9 +-
 .../multiphase/interFoam/RAS/DTCHull/Allrun   |   6 +-
 .../interFoam/RAS/angledDuct/Allrun           |   6 +-
 .../interFoam/RAS/damBreak/Allclean           |   6 +-
 .../multiphase/interFoam/RAS/damBreak/Allrun  |   6 +-
 .../interFoam/RAS/damBreak/damBreak/Allclean  |   6 +-
 .../interFoam/RAS/damBreak/damBreak/Allrun    |   6 +-
 .../RAS/damBreakPorousBaffle/Allclean         |   6 +-
 .../interFoam/RAS/damBreakPorousBaffle/Allrun |   6 +-
 .../interFoam/RAS/waterChannel/Allclean       |   6 +-
 .../interFoam/RAS/waterChannel/Allmesh        |   6 +-
 .../interFoam/RAS/waterChannel/Allrun         |   6 +-
 .../interFoam/RAS/weirOverflow/Allclean       |   9 +-
 .../interFoam/RAS/weirOverflow/Allrun         |   6 +-
 .../interFoam/laminar/capillaryRise/Allrun    |   6 +-
 .../interFoam/laminar/damBreak/Allclean       |   6 +-
 .../interFoam/laminar/damBreak/Allrun         |   6 +-
 .../laminar/damBreak/damBreak/Allclean        |   6 +-
 .../laminar/damBreak/damBreak/Allrun          |   6 +-
 .../interFoam/laminar/mixerVessel2D/Allrun    |   6 +-
 .../interFoam/laminar/mixerVessel2D/makeMesh  |   2 +
 .../interFoam/laminar/vofToLagrangian/Allrun  |   8 +-
 .../eulerianInjection/Allclean                |   9 +-
 .../vofToLagrangian/eulerianInjection/Allrun  |   6 +-
 .../lagrangianDistributionInjection/Allclean  |   9 +-
 .../lagrangianDistributionInjection/Allrun    |   8 +-
 .../lagrangianParticleInjection/Allclean      |   9 +-
 .../lagrangianParticleInjection/Allrun        |   8 +-
 .../laminar/waveExampleCnoidal/Allclean       |  11 +-
 .../laminar/waveExampleCnoidal/Allrun         |   8 +-
 .../laminar/waveExampleSolitary/Allclean      |  11 +-
 .../laminar/waveExampleSolitary/Allrun        |   8 +-
 .../waveExampleSolitaryGrimshaw/Allclean      |  11 +-
 .../waveExampleSolitaryGrimshaw/Allrun        |   8 +-
 .../waveExampleSolitaryMcCowan/Allclean       |  11 +-
 .../laminar/waveExampleSolitaryMcCowan/Allrun |   8 +-
 .../laminar/waveExampleStokesI/Allclean       |  11 +-
 .../laminar/waveExampleStokesI/Allrun         |   8 +-
 .../laminar/waveExampleStokesII/Allclean      |  11 +-
 .../laminar/waveExampleStokesII/Allrun        |   8 +-
 .../laminar/waveExampleStokesV/Allclean       |  11 +-
 .../laminar/waveExampleStokesV/Allrun         |   8 +-
 .../multiphase/interIsoFoam/damBreak/Allclean |  11 +-
 .../multiphase/interIsoFoam/damBreak/Allrun   |   8 +-
 .../interIsoFoam/damBreak/Allrun-parallel     |   8 +-
 .../interIsoFoam/discInConstantFlow/Allclean  |   9 +-
 .../interIsoFoam/discInConstantFlow/Allrun    |   9 +-
 .../discInReversedVortexFlow/Allclean         |  10 +-
 .../discInReversedVortexFlow/Allrun           |   8 +-
 .../notchedDiscInSolidBodyRotation/Allclean   |  10 +-
 .../notchedDiscInSolidBodyRotation/Allrun     |   8 +-
 .../sphereInReversedVortexFlow/Allclean       |  10 +-
 .../sphereInReversedVortexFlow/Allrun         |   8 +-
 .../interIsoFoam/standingWave/Allclean        |  10 +-
 .../interIsoFoam/standingWave/Allrun          |   8 +-
 .../interMixingFoam/laminar/damBreak/Allrun   |   6 +-
 .../propeller/Allclean                        |   9 +-
 .../interPhaseChangeDyMFoam/propeller/Allrun  |   6 +-
 .../propeller/Allrun.pre                      |  10 +-
 .../cavitatingBullet/Allclean                 |   9 +-
 .../cavitatingBullet/Allrun                   |   6 +-
 .../damBreak4phase/Allclean                   |   9 +-
 .../multiphaseEulerFoam/damBreak4phase/Allrun |   6 +-
 .../damBreak4phaseFine/Allclean               |   9 +-
 .../damBreak4phaseFine/Allrun                 |   6 +-
 .../multiphaseEulerFoam/mixerVessel2D/Allrun  |   6 +-
 .../mixerVessel2D/makeMesh                    |   2 +
 .../laminar/mixerVesselAMI2D/Allrun           |   6 +-
 .../laminar/mixerVesselAMI2D/makeMesh         |   6 +-
 .../laminar/damBreak4phase/Allclean           |   9 +-
 .../laminar/damBreak4phase/Allrun             |   6 +-
 .../laminar/damBreak4phaseFine/Allclean       |   9 +-
 .../laminar/damBreak4phaseFine/Allrun         |   6 +-
 .../laminar/mixerVessel2D/Allclean            |   6 +-
 .../laminar/mixerVessel2D/Allrun              |   6 +-
 .../laminar/mixerVessel2D/makeMesh            |   2 +
 .../overInterDyMFoam/floatingBody/Allclean    |   8 +-
 .../overInterDyMFoam/floatingBody/Allrun      |   8 +-
 .../overInterDyMFoam/floatingBody/Allrun.pre  |   5 +-
 .../floatingBody/background/Allclean          |   8 +-
 .../floatingBody/background/Allrun.pre        |   4 +-
 .../floatingBody/floatingBody/Allclean        |  12 +-
 .../floatingBody/floatingBody/Allrun.pre      |   8 +-
 .../oscillatingBox/Allclean                   |   9 +-
 .../oscillatingBox/Allrun                     |   6 +-
 .../oscillatingBox/extractHeightData          |   3 +
 .../oscillatingBox/Allclean                   |   9 +-
 .../oscillatingBox/Allrun                     |   6 +-
 .../oscillatingBox/extractHeightData          |   3 +
 .../laminar/mixerVessel2D/Allrun              |   6 +-
 .../laminar/mixerVessel2D/makeMesh            |   2 +
 .../RAS/wallBoiling/Allclean                  |   6 +-
 .../RAS/wallBoiling/Allrun                    |   6 +-
 .../RAS/wallBoilingIATE/Allclean              |   6 +-
 .../RAS/wallBoilingIATE/Allrun                |   6 +-
 .../laminar/mixerVessel2D/Allrun              |   6 +-
 .../laminar/mixerVessel2D/makeMesh            |   2 +
 .../twoLiquidMixingFoam/lockExchange/Allclean |   9 +-
 .../twoLiquidMixingFoam/lockExchange/Allrun   |   6 +-
 .../laminar/mixerVessel2D/Allrun              |   6 +-
 .../laminar/mixerVessel2D/makeMesh            |   2 +
 .../createZeroDirectory/cavity/Allclean       |   9 +-
 .../createZeroDirectory/cavity/Allrun         |   6 +-
 .../createZeroDirectory/motorBike/Allclean    |   9 +-
 .../createZeroDirectory/motorBike/Allrun      |   8 +-
 .../snappyMultiRegionHeater/Allclean          |  11 +-
 .../snappyMultiRegionHeater/Allrun            |   8 +-
 .../solidDisplacementFoam/plateHole/Allclean  |   6 +-
 .../solidDisplacementFoam/plateHole/Allrun    |   6 +-
 460 files changed, 1283 insertions(+), 2129 deletions(-)

diff --git a/applications/utilities/surface/surfaceBooleanFeatures/Allwmake b/applications/utilities/surface/surfaceBooleanFeatures/Allwmake
index db490161d8..d1ec8b77c1 100755
--- a/applications/utilities/surface/surfaceBooleanFeatures/Allwmake
+++ b/applications/utilities/surface/surfaceBooleanFeatures/Allwmake
@@ -15,4 +15,4 @@ fi
 
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/bin/foamCleanTutorials b/bin/foamCleanTutorials
index 8712bb25fa..c313a9a2a5 100755
--- a/bin/foamCleanTutorials
+++ b/bin/foamCleanTutorials
@@ -30,9 +30,7 @@
 #     and all its subdirectories.
 #
 #------------------------------------------------------------------------------
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 thisScript=$0
 if [ "/${thisScript#/}" != "$thisScript" ]
diff --git a/bin/foamRunTutorials b/bin/foamRunTutorials
index df8f148ca5..5c2b49435b 100755
--- a/bin/foamRunTutorials
+++ b/bin/foamRunTutorials
@@ -30,19 +30,18 @@
 #     and all its subdirectories.
 #
 #------------------------------------------------------------------------------
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Normally use standard "make"
 make="make"
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
 thisScript=$0
 if [ "/${thisScript#/}" != "$thisScript" ]
 then
     thisScript="$PWD/$thisScript"
 fi
 
+unset passArgs runTests
 skipFirst=false
 
 # Parse options
@@ -52,16 +51,15 @@ do
     -t | -test)
         passArgs="-test"
         runTests=true
-        shift
         ;;
     -s | -skipFirst)
         skipFirst=true
-        shift
         ;;
     *)
         break
         ;;
     esac
+    shift
 done
 
 # If an argument is supplied do not execute ./Allrun to avoid recursion
diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions
index 91867f1051..8bd95eea84 100644
--- a/bin/tools/CleanFunctions
+++ b/bin/tools/CleanFunctions
@@ -31,7 +31,7 @@
 
 cleanTimeDirectories()
 {
-    echo "Cleaning $PWD case"
+    echo "Cleaning case $PWD"
     zeros=""
     while [ ${#zeros} -lt 8 ]
     do
@@ -105,15 +105,13 @@ cleanCase()
     cleanSnappyFiles
     rm -f 0/cellDist > /dev/null 2>&1
 
-    if [ -d constant ]
-    then
-        (cd constant && \
-            rm -rf \
-            cellDecomposition cellToRegion cellLevel* pointLevel* \
-            polyMesh tetDualMesh \
-            > /dev/null 2>&1 \
-        )
-    fi
+    (
+        cd constant 2>/dev/null && \
+        rm -rf \
+          cellDecomposition cellToRegion cellLevel* pointLevel* \
+          polyMesh tetDualMesh \
+          > /dev/null 2>&1 \
+    )
 
     if [ -e system/blockMeshDict.m4 ]
     then
@@ -122,9 +120,17 @@ cleanCase()
 }
 
 
+# Frequently used - cleanCase and rm -rf 0/
+cleanCase0()
+{
+    cleanCase
+    rm -rf 0
+}
+
+
 removeCase()
 {
-    echo "Removing ${1:-unknown} case"
+    echo "Removing case ${1:-unknown}"
     [ "$#" -ge 1 ] && rm -rf "$1"
 }
 
@@ -143,7 +149,7 @@ cleanUcomponents()
 
 cleanApplication()
 {
-    echo "Cleaning $PWD application"
+    echo "Cleaning application $PWD"
     wclean
 }
 
diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
index e4a49bef18..06272605bc 100644
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -3,7 +3,7 @@
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
 #   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-#    \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
+#    \\/     M anipulation  | Copyright (C) 2015-2017 OpenCFD Ltd.
 #------------------------------------------------------------------------------
 # License
 #     This file is part of OpenFOAM.
@@ -43,6 +43,7 @@ isParallel()
     return 1
 }
 
+
 #
 # Look for '-test' in the argument list.
 #
@@ -52,6 +53,7 @@ isTest()
     return 1
 }
 
+
 #
 # Extract 'numberOfSubdomains' from system/decomposeParDict
 # (or alternative location).
@@ -100,120 +102,139 @@ getApplication()
     fi
 }
 
+
+#
+# Run given application in serial with logfile output.
+# The preexistence of the log file prevents rerunning.
+#
 runApplication()
 {
-    APP_RUN=
-    LOG_IGNORE=false
-    LOG_APPEND=false
-    LOG_SUFFIX=
-
-    # Parse options and executable
-    while [ $# -gt 0 ] && [ -z "$APP_RUN" ]; do
-        key="$1"
-        case "$key" in
-            -append|-a)
-                LOG_IGNORE=true
-                LOG_APPEND=true
+    local appRun logFile logMode
+
+    # Any additional parsed arguments (eg, decomposeParDict)
+    local appArgs
+
+    # Parse options until executable is encountered
+    while [ $# -gt 0 -a -z "$appRun" ]
+    do
+        case "$1" in
+            -a | -append)
+                logMode=append
                 ;;
-            -overwrite|-o)
-                LOG_IGNORE=true
+            -o | -overwrite)
+                logMode=overwrite
                 ;;
-            -suffix|-s)
-                LOG_SUFFIX=".$2"
+            -s | -suffix)
+                logFile=".$2"
                 shift
                 ;;
+            -decomposeParDict)
+                appArgs="$appArgs $1 $2"
+                shift
+                ;;
+            '')
+                ;;
             *)
-                APP_RUN="$key"
-                APP_NAME="${key##*/}"
-                LOG_SUFFIX="${APP_NAME}${LOG_SUFFIX}"
+                appRun="$1"
                 ;;
         esac
         shift
     done
 
-    if [ -f log.$LOG_SUFFIX ] && [ "$LOG_IGNORE" = "false" ]
+    local appName="${appRun##*/}"
+    logFile="log.$appName$logFile"
+
+    if [ -f "$logFile" -a -z "$logMode" ]
     then
-        echo "$APP_NAME already run on $PWD:" \
-             "remove log file 'log.$LOG_SUFFIX' to re-run"
+        echo "$appName already run on $PWD:" \
+             "remove log file '$logFile' to re-run"
     else
-        echo "Running $APP_RUN on $PWD"
-        if [ "$LOG_APPEND" = "true" ]; then
-            $APP_RUN "$@" >> log.$LOG_SUFFIX 2>&1
+        echo "Running $appRun on $PWD"
+        if [ "$logMode" = append ]
+        then
+            $appRun $appArgs "$@" >> $logFile 2>&1
         else
-            $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1
+            $appRun $appArgs "$@" > $logFile 2>&1
         fi
     fi
 }
 
+
+#
+# Run given application in parallel with logfile output.
+# The preexistence of the log file prevents rerunning.
+#
 runParallel()
 {
-    APP_RUN=
-    LOG_IGNORE=false
-    LOG_APPEND=false
-    LOG_SUFFIX=
-
-    # Store any parsed additional arguments e.g. decomposeParDict
-    APP_PARARGS=
-
-    # Initialise number of procs to unset value
-    nProcs=-1
-
-    # Parse options and executable
-    while [ $# -gt 0 ] && [ -z "$APP_RUN" ]; do
-        key="$1"
-        case "$key" in
-            -append|-a)
-                LOG_IGNORE=true
-                LOG_APPEND=true
+    local appRun logFile logMode nProcs
+
+    # Any additional parsed arguments (eg, decomposeParDict)
+    local appArgs="-parallel"
+
+    # Parse options until executable is encountered
+    while [ $# -gt 0 -a -z "$appRun" ]
+    do
+        case "$1" in
+            -a | -append)
+                logMode=append
                 ;;
-            -overwrite|-o)
-                LOG_IGNORE=true
+            -o | -overwrite)
+                logMode=overwrite
                 ;;
-            -suffix|-s)
-                LOG_SUFFIX=".$2"
+            -s | -suffix)
+                logFile=".$2"
                 shift
                 ;;
-            -np|-n)
+            -n | -np)
                 nProcs="$2"
                 shift
                 ;;
             -decomposeParDict)
+                appArgs="$appArgs $1 $2"
                 nProcs=$(getNumberOfProcessors "$2")
-                APP_PARARGS="$APP_PARARGS -decomposeParDict $2"
                 shift
                 ;;
+            '')
+                ;;
             *)
-                APP_RUN="$key"
-                APP_NAME="${key##*/}"
-                LOG_SUFFIX="${APP_NAME}${LOG_SUFFIX}"
+                appRun="$1"
                 ;;
         esac
-
         shift
     done
 
-    [ "$nProcs" -eq -1 ] && nProcs=$(getNumberOfProcessors system/decomposeParDict)
+    [ -n "$nProcs" ] || nProcs=$(getNumberOfProcessors system/decomposeParDict)
 
-    if [ -f log.$LOG_SUFFIX ] && [ "$LOG_IGNORE" = "false" ]
+    local appName="${appRun##*/}"
+    logFile="log.$appName$logFile"
+
+    if [ -f "$logFile" -a -z "$logMode" ]
     then
-        echo "$APP_NAME already run on $PWD:" \
-             "remove log file 'log.$LOG_SUFFIX' to re-run"
+        echo "$appName already run on $PWD:" \
+             "remove log file '$logFile' to re-run"
     else
-        echo "Running $APP_RUN in parallel on $PWD using $nProcs processes"
-        if [ "$LOG_APPEND" = "true" ]; then
-            ( mpirun -np $nProcs $APP_RUN $APP_PARARGS -parallel "$@" < /dev/null >> log.$LOG_SUFFIX 2>&1 )
+        echo "Running $appRun ($nProcs processes) on $PWD "
+        if [ "$logMode" = append ]
+        then
+        (
+            mpirun -np $nProcs $appRun $appArgs "$@" </dev/null >> $logFile 2>&1
+        )
         else
-            ( mpirun -np $nProcs $APP_RUN $APP_PARARGS -parallel "$@" < /dev/null > log.$LOG_SUFFIX 2>&1 )
+        (
+            mpirun -np $nProcs $appRun $appArgs "$@" </dev/null > $logFile 2>&1
+        )
         fi
     fi
 }
 
+
 compileApplication()
 {
     echo "Compiling $1 application"
     wmake $1
 }
 
+
 #
 # cloneCase srcDir dstDir
 #
@@ -249,6 +270,7 @@ cloneCase()
     return 0
 }
 
+
 #
 # cloneParallelCase srcDir dstDir [...times]
 #
@@ -312,6 +334,7 @@ cloneParallelCase()
     return 0
 }
 
+
 # Overwrite 0/ with the contents of 0.orig/ if it exists.
 # The -processor option to do the processor directories instead
 #
@@ -338,4 +361,5 @@ restore0Dir()
     fi
 }
 
+
 #------------------------------------------------------------------------------
diff --git a/src/mesh/Allwmake b/src/mesh/Allwmake
index 9aa9ba5bfc..52ef361a9f 100755
--- a/src/mesh/Allwmake
+++ b/src/mesh/Allwmake
@@ -8,4 +8,4 @@ wmake $targetType snappyHexMesh
 wmake $targetType blockMesh
 wmake $targetType extrudeModel
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/DNS/dnsFoam/boxTurb16/Allclean b/tutorials/DNS/dnsFoam/boxTurb16/Allclean
index d3bb353195..63c2af729c 100755
--- a/tutorials/DNS/dnsFoam/boxTurb16/Allclean
+++ b/tutorials/DNS/dnsFoam/boxTurb16/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -f 0/enstrophy
diff --git a/tutorials/DNS/dnsFoam/boxTurb16/Allrun b/tutorials/DNS/dnsFoam/boxTurb16/Allrun
index 125c236a6c..73fb0ad1aa 100755
--- a/tutorials/DNS/dnsFoam/boxTurb16/Allrun
+++ b/tutorials/DNS/dnsFoam/boxTurb16/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication boxTurb
diff --git a/tutorials/IO/fileHandler/Allclean b/tutorials/IO/fileHandler/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/IO/fileHandler/Allclean
+++ b/tutorials/IO/fileHandler/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/IO/fileHandler/Allrun b/tutorials/IO/fileHandler/Allrun
index d70139ef72..1f90a49f6b 100755
--- a/tutorials/IO/fileHandler/Allrun
+++ b/tutorials/IO/fileHandler/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/IO/fileHandler/Alltest b/tutorials/IO/fileHandler/Alltest
index 98f9166d69..d5416642d4 100755
--- a/tutorials/IO/fileHandler/Alltest
+++ b/tutorials/IO/fileHandler/Alltest
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Reset the controlDict
 if [ -f system/controlDict.orig ]
diff --git a/tutorials/basic/laplacianFoam/flange/Allclean b/tutorials/basic/laplacianFoam/flange/Allclean
index dc38fab61f..1c56b00e18 100755
--- a/tutorials/basic/laplacianFoam/flange/Allclean
+++ b/tutorials/basic/laplacianFoam/flange/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -rf Fieldview > /dev/null 2>&1
diff --git a/tutorials/basic/laplacianFoam/flange/Allrun b/tutorials/basic/laplacianFoam/flange/Allrun
index 59e996ba18..53a0f0634a 100755
--- a/tutorials/basic/laplacianFoam/flange/Allrun
+++ b/tutorials/basic/laplacianFoam/flange/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runAnsysToFoam()
 {
diff --git a/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allclean b/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allclean
index bd7671dd1e..fad073e143 100755
--- a/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allclean
+++ b/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allclean
@@ -1,11 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
+
+cleanCase0
 
-cleanCase
 rm -f constant/polyMesh/boundary
 rm -f constant/polyMesh/zoneID
 
-rm -rf 0
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allrun b/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allrun
index 07dafa9e95..395446555e 100755
--- a/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allrun
+++ b/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allrun.pre b/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allrun.pre
index 16135b7062..baa7887883 100755
--- a/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allrun.pre
+++ b/tutorials/basic/overLaplacianDyMFoam/heatTransfer/Allrun.pre
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/basic/potentialFoam/cylinder/Allclean b/tutorials/basic/potentialFoam/cylinder/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/basic/potentialFoam/cylinder/Allclean
+++ b/tutorials/basic/potentialFoam/cylinder/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/cylinder/Allrun b/tutorials/basic/potentialFoam/cylinder/Allrun
index 6e5e8f42de..754c15e58c 100755
--- a/tutorials/basic/potentialFoam/cylinder/Allrun
+++ b/tutorials/basic/potentialFoam/cylinder/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 runApplication blockMesh
diff --git a/tutorials/basic/potentialFoam/pitzDaily/Allclean b/tutorials/basic/potentialFoam/pitzDaily/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/basic/potentialFoam/pitzDaily/Allclean
+++ b/tutorials/basic/potentialFoam/pitzDaily/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/pitzDaily/Allrun b/tutorials/basic/potentialFoam/pitzDaily/Allrun
index b4667497e4..6ea7923d16 100755
--- a/tutorials/basic/potentialFoam/pitzDaily/Allrun
+++ b/tutorials/basic/potentialFoam/pitzDaily/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 runApplication blockMesh
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
index 189dd60ac4..b6e861cc69 100755
--- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
+++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf VTK
 
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
index 312f7aa370..509c985052 100755
--- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
+++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 runApplication blockMesh
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allclean b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allclean
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun
index fa51ae65e3..5e6d5291c4 100755
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.mesh
 
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun.mesh b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun.mesh
index 59a8b9b93d..28b75a27c1 100755
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun.mesh
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun.mesh
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/combustion/XiFoam/RAS/Allclean b/tutorials/combustion/XiFoam/RAS/Allclean
index edc01a252b..39e9b455bf 100755
--- a/tutorials/combustion/XiFoam/RAS/Allclean
+++ b/tutorials/combustion/XiFoam/RAS/Allclean
@@ -1,19 +1,13 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 keepCases="moriyoshiHomogeneous"
 loseCases="moriyoshiHomogeneousPart2 moriyoshiHomogeneousHydrogen"
 
 for caseName in $keepCases
 do
-(
-    cd $caseName || exit
-
-    foamCleanTutorials
-)
+    ( cd $caseName && foamCleanTutorials )
 done
 
 for caseName in $loseCases
diff --git a/tutorials/combustion/XiFoam/RAS/Allrun b/tutorials/combustion/XiFoam/RAS/Allrun
index b3d0e3bf1d..213d7e0664 100755
--- a/tutorials/combustion/XiFoam/RAS/Allrun
+++ b/tutorials/combustion/XiFoam/RAS/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 setControlDict()
 {
diff --git a/tutorials/combustion/chemFoam/gri/Allclean b/tutorials/combustion/chemFoam/gri/Allclean
index 6d98f58208..9bc42acc50 100755
--- a/tutorials/combustion/chemFoam/gri/Allclean
+++ b/tutorials/combustion/chemFoam/gri/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf chemFoam.out constant/reactions constant/thermo \
    validation/OF_vs_CHEMKINII.eps validation/chemkinII
diff --git a/tutorials/combustion/chemFoam/gri/Allrun b/tutorials/combustion/chemFoam/gri/Allrun
index 9f91a1a6cc..192618695d 100755
--- a/tutorials/combustion/chemFoam/gri/Allrun
+++ b/tutorials/combustion/chemFoam/gri/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 runApplication chemkinToFoam \
diff --git a/tutorials/combustion/chemFoam/h2/Allclean b/tutorials/combustion/chemFoam/h2/Allclean
index 5d4bbd8d84..e01a93433e 100755
--- a/tutorials/combustion/chemFoam/h2/Allclean
+++ b/tutorials/combustion/chemFoam/h2/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
diff --git a/tutorials/combustion/chemFoam/h2/Allrun b/tutorials/combustion/chemFoam/h2/Allrun
index a90b3d865c..bf06d218a8 100755
--- a/tutorials/combustion/chemFoam/h2/Allrun
+++ b/tutorials/combustion/chemFoam/h2/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication $(getApplication)
 
diff --git a/tutorials/combustion/chemFoam/ic8h18/Allclean b/tutorials/combustion/chemFoam/ic8h18/Allclean
index 5d4bbd8d84..e01a93433e 100755
--- a/tutorials/combustion/chemFoam/ic8h18/Allclean
+++ b/tutorials/combustion/chemFoam/ic8h18/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
diff --git a/tutorials/combustion/chemFoam/ic8h18/Allrun b/tutorials/combustion/chemFoam/ic8h18/Allrun
index a90b3d865c..bf06d218a8 100755
--- a/tutorials/combustion/chemFoam/ic8h18/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication $(getApplication)
 
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allclean b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allclean
index 5d4bbd8d84..e01a93433e 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allclean
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
index a90b3d865c..bf06d218a8 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication $(getApplication)
 
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph b/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
index 43e3c36e10..ebb4474ddd 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
@@ -21,4 +21,4 @@ gnuplot<<EOF
         "chemkinII" with lines title "Chemkin II" lt -1
 EOF
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/nc7h16/Allclean b/tutorials/combustion/chemFoam/nc7h16/Allclean
index 5d4bbd8d84..e01a93433e 100755
--- a/tutorials/combustion/chemFoam/nc7h16/Allclean
+++ b/tutorials/combustion/chemFoam/nc7h16/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
diff --git a/tutorials/combustion/chemFoam/nc7h16/Allrun b/tutorials/combustion/chemFoam/nc7h16/Allrun
index a90b3d865c..bf06d218a8 100755
--- a/tutorials/combustion/chemFoam/nc7h16/Allrun
+++ b/tutorials/combustion/chemFoam/nc7h16/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication $(getApplication)
 
diff --git a/tutorials/combustion/engineFoam/kivaTest/Allclean b/tutorials/combustion/engineFoam/kivaTest/Allclean
index b1fa019711..71df6ecdbb 100755
--- a/tutorials/combustion/engineFoam/kivaTest/Allclean
+++ b/tutorials/combustion/engineFoam/kivaTest/Allclean
@@ -1,13 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 mv ./-180 temp180
 
-cleanCase
-rm -rf 0
+cleanCase0
 
 mv temp180 ./-180
 
diff --git a/tutorials/combustion/engineFoam/kivaTest/Allrun b/tutorials/combustion/engineFoam/kivaTest/Allrun
index d5434dff00..80677173bd 100755
--- a/tutorials/combustion/engineFoam/kivaTest/Allrun
+++ b/tutorials/combustion/engineFoam/kivaTest/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication kivaToFoam -file otape17
 runApplication $(getApplication)
diff --git a/tutorials/combustion/fireFoam/LES/compartmentFire/Allclean b/tutorials/combustion/fireFoam/LES/compartmentFire/Allclean
index 3ed713392c..9ead8681de 100755
--- a/tutorials/combustion/fireFoam/LES/compartmentFire/Allclean
+++ b/tutorials/combustion/fireFoam/LES/compartmentFire/Allclean
@@ -1,11 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -rf constant/panelRegion/polyMesh
 rm -f constant/polyMesh/boundary
 rm -f validation/*.eps
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun b/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
index 1fb613fedb..c09ed1e6e3 100755
--- a/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
+++ b/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create the blockMesh file with the parametric one
 m4 system/blockMeshDict.m4 > system/blockMeshDict
@@ -25,4 +23,4 @@ paraFoam -touch -region panelRegion
 
 (cd validation && ./createGraphs)
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/Allclean b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/Allclean
index 615ace08b7..b38edacb89 100755
--- a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/Allclean
+++ b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/Allrun b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/Allrun
index b18a484335..e99924ab9d 100755
--- a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/Allrun
+++ b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create the underlying block mesh
 runApplication blockMesh
diff --git a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allclean b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allclean
index f8c6193133..fcfdc32577 100755
--- a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allclean
+++ b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allrun b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allrun
index c46299855a..259ca145a6 100755
--- a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allrun
+++ b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allclean b/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allclean
index b333961d48..2e8de5d05f 100755
--- a/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allclean
+++ b/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allclean
@@ -1,10 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -rf constant/panelRegion/polyMesh
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allrun b/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allrun
index ba88bc10f3..dcd2bad0e5 100755
--- a/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allrun
+++ b/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
@@ -11,4 +9,4 @@ runApplication $(getApplication)
 
 paraFoam -touchAll
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allclean b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allclean
index 333e5d8d25..b75804a65b 100755
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allclean
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allrun b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allrun
index 942f56f2ec..39af3c029d 100755
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allrun
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allclean b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allclean
index 333e5d8d25..b75804a65b 100755
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allclean
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allrun b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allrun
index 8c42b7a25e..de0f52b40b 100755
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allrun
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/Allclean b/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/Allclean
index 79defe511d..c81ffab9ed 100755
--- a/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/Allclean
+++ b/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/Allrun b/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/Allrun
index a3d72f117c..1476376f44 100755
--- a/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/Allrun
+++ b/tutorials/combustion/reactingFoam/RAS/DLR_A_LTS/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Application name
 application=$(getApplication)
diff --git a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allclean b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allclean
index 9f691c9385..e2f275d9fd 100755
--- a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allclean
+++ b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allclean
@@ -1,11 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun
index 5afd8b9d74..6299aedeab 100755
--- a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun
+++ b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Application name
 application=$(getApplication)
diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
index a5e65c7d81..f2d7cca665 100755
--- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
+++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 cleanSamples
diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allrun b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allrun
index 1df0a7e341..544ba54bad 100755
--- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allrun
+++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/Allclean b/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
index b6716d88fb..69fe9734a9 100755
--- a/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
+++ b/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
+cleanCase0
 cleanSamples
-rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/Allrun b/tutorials/compressible/rhoCentralFoam/shockTube/Allrun
index 4e1c0a9fbc..055484463a 100755
--- a/tutorials/compressible/rhoCentralFoam/shockTube/Allrun
+++ b/tutorials/compressible/rhoCentralFoam/shockTube/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 runApplication blockMesh
diff --git a/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allclean b/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allclean
index f60abaf9c5..e2f275d9fd 100755
--- a/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allclean
+++ b/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allclean
@@ -1,9 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-\rm -rf 0
+cleanCase0
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun b/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun
index 9961aeb245..528f1a0404 100755
--- a/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun
+++ b/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/Allrun
@@ -1,11 +1,11 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 runApplication blockMesh
 runApplication -s preProcess $(getApplication) -postProcess -dict system/preProcess
 runApplication decomposePar
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
index 14de6e8862..794ee1b81e 100755
--- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
+++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
index e7b28d6aa5..2b52d36edd 100755
--- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
+++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication surfaceFeatureExtract
 
diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/angledDuct/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/angledDuct/Allrun
index ccdfefe5c1..54368cee89 100755
--- a/tutorials/compressible/rhoPimpleFoam/RAS/angledDuct/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/RAS/angledDuct/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 
diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/angledDuctLTS/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/angledDuctLTS/Allrun
index ccdfefe5c1..54368cee89 100755
--- a/tutorials/compressible/rhoPimpleFoam/RAS/angledDuctLTS/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/RAS/angledDuctLTS/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 
diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/Allrun
index 52b2a4941d..5db0a1c8e5 100755
--- a/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/makeMesh b/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/makeMesh
index aad5edd02d..6f4a3fffe3 100755
--- a/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/makeMesh
+++ b/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/makeMesh
@@ -1,8 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 < system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allclean b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allclean
index 92ec2e3cea..2b124ecf38 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allclean
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
index 0e68045130..8143eddba2 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 # Run function links the appropriate mesh files and clones the case
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allclean b/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allclean
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allrun
index 8a77ff8076..e0f9af4df8 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean
index 7b7e1442f8..0686c27498 100755
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean
@@ -1,12 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
+cleanCase0
 
 # Remove copies of common files
-\rm -rf 0 constant
+\rm -rf constant
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allrun b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allrun
index f7891cd4f8..1331199845 100755
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allrun
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 echo "Use common files for 0/, constant/ and blockMeshDict"
 \rm -rf 0 constant
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean
index 7b7e1442f8..0686c27498 100755
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean
@@ -1,12 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
+cleanCase0
 
 # Remove copies of common files
-\rm -rf 0 constant
+\rm -rf constant
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun
index f7891cd4f8..1331199845 100755
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 echo "Use common files for 0/, constant/ and blockMeshDict"
 \rm -rf 0 constant
diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
index ccdfefe5c1..54368cee89 100755
--- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
+++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 
diff --git a/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allclean b/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allclean
index deba0577f4..6eb1457dbc 100755
--- a/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allclean
+++ b/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -f  constant/triSurface/*.eMesh*     > /dev/null 2>&1
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
diff --git a/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allrun b/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allrun
index a8d8e758dd..ea3d94ccae 100755
--- a/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allrun
+++ b/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.mesh
 
diff --git a/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allrun.mesh b/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allrun.mesh
index 4a2c4342d1..4c4121816c 100755
--- a/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allrun.mesh
+++ b/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allrun.mesh
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication surfaceFeatureExtract
diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean
index 1deb209133..e681fce19f 100755
--- a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean
+++ b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun
index 4b94147c58..8bd01b9e40 100755
--- a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun
+++ b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Convert mesh from resources directory
 runApplication star4ToFoam -scale 1 \
diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean b/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
index b6716d88fb..69fe9734a9 100755
--- a/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
+++ b/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
+cleanCase0
 cleanSamples
-rm -rf 0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun b/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
index 4a38818ccc..5ef8615ad9 100755
--- a/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
+++ b/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 runApplication blockMesh
diff --git a/tutorials/compressible/sonicLiquidFoam/Allclean b/tutorials/compressible/sonicLiquidFoam/Allclean
index aa8cb7bc24..cbd249f6ef 100755
--- a/tutorials/compressible/sonicLiquidFoam/Allclean
+++ b/tutorials/compressible/sonicLiquidFoam/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 removeCase decompressionTankFine
 foamCleanTutorials cases
diff --git a/tutorials/compressible/sonicLiquidFoam/Allrun b/tutorials/compressible/sonicLiquidFoam/Allrun
index deb3e8f4c6..f7f2c64c04 100755
--- a/tutorials/compressible/sonicLiquidFoam/Allrun
+++ b/tutorials/compressible/sonicLiquidFoam/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 setDecompressionTankFine()
 {
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean
index 36f3cdc151..40d55b2780 100755
--- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean
@@ -1,10 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
+
 rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun
index d56e57bf75..ffa109248b 100755
--- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication dsmcInitialise
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean
index 36f3cdc151..40d55b2780 100755
--- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean
@@ -1,10 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
+
 rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun
index d56e57bf75..ffa109248b 100755
--- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication dsmcInitialise
diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean
index 36f3cdc151..40d55b2780 100755
--- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean
+++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean
@@ -1,10 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
+
 rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun
index d433a8c026..0c110250f6 100755
--- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication decomposePar
diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean
index 36f3cdc151..40d55b2780 100755
--- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean
+++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean
@@ -1,10 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
+
 rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
index d433a8c026..0c110250f6 100755
--- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication decomposePar
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean
index 194c42b8c6..2b07ff650e 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allrun b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allrun
index 31e783b003..2ec6f7b077 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allrun
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication mdInitialise
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean
index d52fe88c71..ca2f48ed94 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allrun b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allrun
index 31e783b003..2ec6f7b077 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allrun
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication mdInitialise
diff --git a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
index 7fa5428f73..bc26045cbd 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
+++ b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -rf processor[0-9]
diff --git a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
index 66482be7d4..cd4b14a1f9 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
+++ b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication decomposePar
diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/Allclean b/tutorials/electromagnetics/mhdFoam/hartmann/Allclean
index a5e65c7d81..f2d7cca665 100755
--- a/tutorials/electromagnetics/mhdFoam/hartmann/Allclean
+++ b/tutorials/electromagnetics/mhdFoam/hartmann/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 cleanSamples
diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/Allrun b/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
index 8bf5318684..23a6711db4 100755
--- a/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
+++ b/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean
index be62031288..01dae1a898 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean
+++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -f 0/T
diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
index ac13b06427..f8719a73da 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 \cp 0/T.orig 0/T
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean
index be62031288..01dae1a898 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -f 0/T
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
index ac13b06427..f8719a73da 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 \cp 0/T.orig 0/T
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun
index afe3cd23cf..d0102481da 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean
+++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun
index c61e8a418c..1e6177fd59 100755
--- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allclean b/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allclean
+++ b/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allrun b/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allrun
index 8a77ff8076..e0f9af4df8 100755
--- a/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allrun
+++ b/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
index f02ac1a6eb..8ad093a08c 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -f validation/*.eps
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
index 33dbc86270..4abae23d19 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
index eb1e8dba18..0e33c8258d 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/baffle3DRegion
 
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun
index 1927ad7c82..357dac9b56 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
index 8a77ff8076..e0f9af4df8 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
index 8a77ff8076..e0f9af4df8 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean
index 757a0f3d6c..3f7a0cb7a6 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
@@ -23,4 +21,4 @@ rm -rf constant/heater/polyMesh
 rm -rf constant/leftSolid/polyMesh
 rm -rf constant/rightSolid/polyMesh
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
index 6191f4b7b1..25b14f2bb7 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
@@ -32,4 +30,4 @@ runApplication ./externalSolver
 # Reconstruct
 runApplication reconstructPar -allRegions
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre
index 481deedc7b..aebfbaa5ae 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
@@ -29,4 +27,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll 2>/dev/null
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
index bd637e1bf9..fecea96c55 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf VTK
 rm -rf constant/cellToRegion
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
index f59f69f8c1..b1618a8119 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Setup case
 ./Allrun.pre
@@ -30,4 +28,4 @@ echo "Creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun-parallel
index 7f0488b40f..4fd07828f9 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun-parallel
@@ -37,4 +37,4 @@ echo "Creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
index 5094b7903f..35a20b5e48 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
@@ -24,4 +24,4 @@ do
         -region $i -subDict dictionaryReplacement
 done
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
index 8b0c932d51..fad685f8ab 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
index 619f8c0af0..5cf86d4458 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
index 230730502d..0ad9dc9eb8 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
index e46f721088..b3614e7307 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 rm -rf constant/polyMesh/sets
 
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allclean
index c34834dedb..d28baddd33 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/windshield/polyMesh
 rm -rf constant/cabin/polyMesh
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun
index 7704bd9ea5..51e2df24b4 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create the underlying block mesh
 runApplication blockMesh
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun-parallel
index 18fefcf28c..bdd571ebfc 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create the underlying block mesh
 runApplication blockMesh
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allclean
index 92a631d049..9ce122ce3d 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/exterior/polyMesh
 rm -rf constant/ice/polyMesh
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun
index f4d82024cd..4a206678cd 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun
@@ -1,11 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
 runApplication $(getApplication)
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
index 4ec7e69c22..53e574a9d5 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
@@ -19,4 +17,4 @@ runApplication -s ice reconstructPar -region ice
 runApplication -s exterior reconstructPar -region exterior
 
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun.pre
index 44fa75f381..69ef3caa41 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create the underlying block mesh
 runApplication blockMesh
@@ -19,4 +17,4 @@ runApplication splitMeshRegions -cellZones -overwrite
 # set the initial fields
 restore0Dir
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allclean b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allclean
index 5a54eef9a0..2d12f3a3ee 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 foamCleanPolyMesh -region air
 foamCleanPolyMesh -region porous
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun
index f4d82024cd..4a206678cd 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun
@@ -1,11 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
 runApplication $(getApplication)
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
index 2be2e1edda..2527a2edf5 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
@@ -14,4 +12,4 @@ runParallel $(getApplication)
 runApplication -s air    reconstructPar -latestTime -region air
 runApplication -s porous reconstructPar -latestTime -region porous
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
index 6d3c8f3544..b3f7c19f36 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 #create meshes
 runApplication -s air    blockMesh -region air
@@ -26,4 +24,4 @@ paraFoam -touch -region air
 
 restore0Dir
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allclean b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allclean
index 31c0b764b5..6d4b7f5c83 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 foamCleanPolyMesh -region solid
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun
index 98857416a9..b7d6fe2a4d 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
@@ -10,4 +8,4 @@ runApplication $(getApplication)
 
 ./createGraphs
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun-parallel
index b48e4c119d..26499f2115 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
@@ -14,4 +12,4 @@ runApplication -s solid reconstructPar -latestTime -region solid
 
 ./createGraphs
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun.pre
index c8198f9848..4197c7f941 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Create meshe
 runApplication -s solid blockMesh -region solid
@@ -12,4 +10,4 @@ paraFoam -touch -region solid
 
 restore0Dir
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
index 0df7ec6207..8232cefee7 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
@@ -1,10 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
+
 rm -rf VTK
 rm -rf constant/cellToRegion
 rm -rf 0/bottomAir
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
index 50db130fe2..e726d6fcab 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 # Setup case
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
index ddcb5a103f..42b3aad022 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Setup case
 ./Allrun.pre
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
index 091548c051..b28d6eee4f 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun b/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
index 52b2a4941d..5db0a1c8e5 100755
--- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
+++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allclean b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allclean
index 9890874433..53c93d35b8 100755
--- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allclean
+++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
index 7f68f70913..0a453a0279 100755
--- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
+++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/incompressible/icoFoam/cavity/Allclean b/tutorials/incompressible/icoFoam/cavity/Allclean
index 842bb7ced7..4431913e3b 100755
--- a/tutorials/incompressible/icoFoam/cavity/Allclean
+++ b/tutorials/incompressible/icoFoam/cavity/Allclean
@@ -1,18 +1,13 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 keepCases="cavity cavityGrade cavityClipped"
 loseCases="cavityFine cavityHighRe"
 
 for caseName in $keepCases
 do
-(
-    cd $caseName || exit
-    foamCleanTutorials
-)
+    ( cd $caseName && foamCleanTutorials )
 done
 
 for caseName in $loseCases
diff --git a/tutorials/incompressible/icoFoam/cavity/Allrun b/tutorials/incompressible/icoFoam/cavity/Allrun
index fdeea0d08d..c1454a2861 100755
--- a/tutorials/incompressible/icoFoam/cavity/Allrun
+++ b/tutorials/incompressible/icoFoam/cavity/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped"
 
@@ -55,20 +53,21 @@ setCavityHighRe()
 }
 
 
+unset previousCase
 for caseName in $cavityCases
 do
-    if [ "$caseName" = cavityFine ]
-    then
+    case "$caseName" in
+    cavityFine)
         cloneCase cavity $caseName
         setCavityFine
-    fi
+        ;;
 
-    if [ "$caseName" = cavityHighRe ]
-    then
+    cavityHighRe)
         cloneCase cavity $caseName
         setCavityHighRe
         copySolutionDirs $caseName cavity
-    fi
+        ;;
+    esac
 
     ( cd $caseName && runApplication blockMesh )
 
diff --git a/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean b/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
index 3512fe5e6e..63145a3803 100755
--- a/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
+++ b/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -rf constant/coarseMesh
diff --git a/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun b/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun
index 767ff8591f..7d2e323843 100755
--- a/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun
+++ b/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication -s coarseMesh blockMesh -dict system/blockMeshDict.coarse
 
@@ -13,4 +11,4 @@ runApplication -s fine blockMesh -dict system/blockMeshDict.fine
 
 runApplication $(getApplication)
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun-parallel b/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun-parallel
index 2577f9c866..524002c6ec 100755
--- a/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun-parallel
+++ b/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication -s coarseMesh blockMesh -dict system/blockMeshDict.coarse
 
@@ -21,4 +19,4 @@ runParallel $(getApplication)
 #
 #runApplication -s coarseMesh reconstructPar -region coarseMesh
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/elbow/Allclean b/tutorials/incompressible/icoFoam/elbow/Allclean
index 400ad85687..7238840f83 100755
--- a/tutorials/incompressible/icoFoam/elbow/Allclean
+++ b/tutorials/incompressible/icoFoam/elbow/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -rf fluentInterface
diff --git a/tutorials/incompressible/icoFoam/elbow/Allrun b/tutorials/incompressible/icoFoam/elbow/Allrun
index d477487196..a42f83926b 100755
--- a/tutorials/incompressible/icoFoam/elbow/Allrun
+++ b/tutorials/incompressible/icoFoam/elbow/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 runApplication fluentMeshToFoam elbow.msh
diff --git a/tutorials/incompressible/lumpedPointMotion/building/Allrun b/tutorials/incompressible/lumpedPointMotion/building/Allrun
index 8aad569cae..b922844f84 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/Allrun
+++ b/tutorials/incompressible/lumpedPointMotion/building/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 # 1) First run steady-state to establish a good initial field.
diff --git a/tutorials/incompressible/lumpedPointMotion/building/Allrun.move b/tutorials/incompressible/lumpedPointMotion/building/Allrun.move
index 33b1a80e7b..bed249580f 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/Allrun.move
+++ b/tutorials/incompressible/lumpedPointMotion/building/Allrun.move
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # 1) Run meshing
 # 2) Reconstruct
diff --git a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.movement b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.movement
index bf69827a2c..82baeb53be 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.movement
+++ b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.movement
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # The 0/ field only
 # runApplication reconstructPar -withZero -time 0
diff --git a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient
index 5004717368..951dd76adb 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient
+++ b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Cleanup old junk that may prevent things from starting
 \rm -f comms/OpenFOAM.lock
diff --git a/tutorials/incompressible/lumpedPointMotion/building/steady/Allclean b/tutorials/incompressible/lumpedPointMotion/building/steady/Allclean
index 3b8b23422e..e2f275d9fd 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/steady/Allclean
+++ b/tutorials/incompressible/lumpedPointMotion/building/steady/Allclean
@@ -1,8 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-cleanCase
-\rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun b/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun
index 57456db2fd..fd9ff050c4 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun
+++ b/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre b/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre
index de42e2de8c..fb357cee78 100755
--- a/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre
+++ b/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Copy building from resources directory
 mkdir -p constant/triSurface/
diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allclean b/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allclean
index 862ed262d8..a916d07554 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allclean
+++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # run from this directory
 # Add background mesh
 (cd cylinderMesh && foamCleanTutorials)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allrun b/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allrun
index 7604f9ad35..5758f00725 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allrun
+++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allrun
@@ -1,8 +1,11 @@
 #!/bin/sh
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Extrude mesh around cylinder
 (cd cylinderMesh && ./Allrun.pre)
 
 # Add background mesh
 (cd cylinderAndBackground && ./Allrun)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allrun.pre b/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allrun.pre
index 788e947486..d87c892a62 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allrun.pre
+++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/Allrun.pre
@@ -1,8 +1,11 @@
 #!/bin/sh
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Extrude mesh around cylinder
 (cd cylinderMesh && ./Allrun.pre)
 
 # Add background mesh
 (cd cylinderAndBackground && ./Allrun.pre)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allclean b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allclean
index 6be736ea3c..aab71fa2ca 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allclean
+++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allclean
@@ -1,12 +1,11 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
+
+cleanCase0
 
-cleanCase
 rm -f constant/polyMesh/boundary
 rm -f constant/polyMesh/zoneID
 rm -f constant/cellInterpolationWeight
 
-rm -rf 0
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allrun b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allrun
index 50626eed68..6751923556 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allrun
+++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allrun.pre b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allrun.pre
index f4910d875d..fb7e1120bd 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allrun.pre
+++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderAndBackground/Allrun.pre
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Create background mesh
 runApplication blockMesh
diff --git a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/Allrun.pre b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/Allrun.pre
index ad0801bbb9..a86d958660 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/Allrun.pre
+++ b/tutorials/incompressible/overPimpleDyMFoam/cylinder/cylinderMesh/Allrun.pre
@@ -1,8 +1,11 @@
 #!/bin/sh
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Generate mesh from surface (in constant/triSurface)
 runApplication extrudeMesh
 
 # Make front and back type empty
 runApplication createPatch -overwrite
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allclean b/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allclean
index 6be736ea3c..aab71fa2ca 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allclean
+++ b/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allclean
@@ -1,12 +1,11 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
+
+cleanCase0
 
-cleanCase
 rm -f constant/polyMesh/boundary
 rm -f constant/polyMesh/zoneID
 rm -f constant/cellInterpolationWeight
 
-rm -rf 0
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allrun b/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allrun
index d8593e5287..2ac685b863 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allrun
+++ b/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allrun.pre b/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allrun.pre
index 4eafbde233..217161cb95 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allrun.pre
+++ b/tutorials/incompressible/overPimpleDyMFoam/simpleRotor/Allrun.pre
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allclean b/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allclean
index 6be736ea3c..aab71fa2ca 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allclean
+++ b/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allclean
@@ -1,12 +1,11 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
+
+cleanCase0
 
-cleanCase
 rm -f constant/polyMesh/boundary
 rm -f constant/polyMesh/zoneID
 rm -f constant/cellInterpolationWeight
 
-rm -rf 0
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allrun b/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allrun
index e4b389b8c5..10707b2f2c 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allrun
+++ b/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allrun.pre b/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allrun.pre
index 44fee43b00..abccd3163c 100755
--- a/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allrun.pre
+++ b/tutorials/incompressible/overPimpleDyMFoam/twoSimpleRotors/Allrun.pre
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/Allclean b/tutorials/incompressible/overSimpleFoam/aeroFoil/Allclean
index 10394c3ebe..b7522e086b 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/Allclean
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/Allclean
@@ -1,20 +1,15 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+for caseName in aeroFoil_snappyHexMesh background_snappyHexMesh
+do
+    ( cd $caseName && cleanCase )
+done
 
-cd aeroFoil_snappyHexMesh
-cleanCase
+for caseName in aeroFoil_overset background_overset
+do
+    ( cd $caseName && cleanCase0 )
+done
 
-cd ../aeroFoil_overset
-cleanCase
-rm -rf 0
-
-cd ../background_snappyHexMesh
-cleanCase
-
-
-cd ../background_overset
-cleanCase
-./Allclean
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/Allrun b/tutorials/incompressible/overSimpleFoam/aeroFoil/Allrun
index 728e17019d..96bbd15dee 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/Allrun
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/Allrun
@@ -1,10 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
-cd background_overset
-./Allrun
+( cd background_overset && ./Allrun )
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/Allrun.pre b/tutorials/incompressible/overSimpleFoam/aeroFoil/Allrun.pre
index 6b300fc25a..e3784e5ab6 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/Allrun.pre
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/Allrun.pre
@@ -1,12 +1,15 @@
 #!/bin/sh
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
-# create aeroFoil mesh using snappyHexMesh
-(cd aeroFoil_snappyHexMesh && ./Allrun.pre)
+# Create aeroFoil mesh using snappyHexMesh
+( cd aeroFoil_snappyHexMesh && ./Allrun.pre )
 
 # Extrude mesh
-(cd aeroFoil_overset && ./Allrun.pre)
+( cd aeroFoil_overset && ./Allrun.pre )
 
-(cd background_snappyHexMesh && ./Allrun.pre)
+( cd background_snappyHexMesh && ./Allrun.pre )
 
-(cd background_overset &&  ./Allrun.pre)
+( cd background_overset && ./Allrun.pre )
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/aeroFoil_overset/Allrun.pre b/tutorials/incompressible/overSimpleFoam/aeroFoil/aeroFoil_overset/Allrun.pre
index 98a5ce71db..66379c68c1 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/aeroFoil_overset/Allrun.pre
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/aeroFoil_overset/Allrun.pre
@@ -1,10 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Make a 2D mesh by extruding a patch and solve to steady state.
 runApplication extrudeMesh
 runApplication createPatch -overwrite
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/aeroFoil_snappyHexMesh/Allrun.pre b/tutorials/incompressible/overSimpleFoam/aeroFoil/aeroFoil_snappyHexMesh/Allrun.pre
index fdfb7e78d1..7525ed4239 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/aeroFoil_snappyHexMesh/Allrun.pre
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/aeroFoil_snappyHexMesh/Allrun.pre
@@ -1,9 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Make 3D mesh in slab of cells.
 runApplication blockMesh
 runApplication snappyHexMesh -overwrite
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allclean b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allclean
index 6be736ea3c..aab71fa2ca 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allclean
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allclean
@@ -1,12 +1,11 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
+
+cleanCase0
 
-cleanCase
 rm -f constant/polyMesh/boundary
 rm -f constant/polyMesh/zoneID
 rm -f constant/cellInterpolationWeight
 
-rm -rf 0
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allrun b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allrun
index 488b782585..c290d0dd5e 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allrun
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Serial
 #runApplication $(getApplication)
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allrun.pre b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allrun.pre
index 858bba21fe..4ce424d93f 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allrun.pre
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_overset/Allrun.pre
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication extrudeMesh
 runApplication createPatch -overwrite
diff --git a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_snappyHexMesh/Allrun.pre b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_snappyHexMesh/Allrun.pre
index 7561204647..c221f0abd3 100755
--- a/tutorials/incompressible/overSimpleFoam/aeroFoil/background_snappyHexMesh/Allrun.pre
+++ b/tutorials/incompressible/overSimpleFoam/aeroFoil/background_snappyHexMesh/Allrun.pre
@@ -1,10 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
-# Make 3D mesh in slab of cells.
 # Make 3D mesh in slab of cells.
 runApplication blockMesh
 runApplication snappyHexMesh -overwrite
+
+#-------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
index 162255286a..9450e8b3f6 100755
--- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./makeMesh
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh
index bcb12c0e9a..fc56e7be3c 100755
--- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh
+++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 < system/blockMeshDict.m4 > system/blockMeshDict
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun
index f4d82024cd..4a206678cd 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun
@@ -1,11 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
 runApplication $(getApplication)
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
index 51af1fb48a..c9e323cdb7 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
@@ -10,4 +8,4 @@ runApplication decomposePar
 runParallel $(getApplication)
 runApplication reconstructPar
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre
index c484c19d15..3d4d5ecf6f 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
@@ -13,4 +11,4 @@ runApplication createBaffles -overwrite
 
 restore0Dir
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allclean b/tutorials/incompressible/pimpleDyMFoam/propeller/Allclean
index 2334d531d3..88ad2ecc84 100755
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allclean
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 # Remove surfaces and features
 rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
index 51af1fb48a..c9e323cdb7 100755
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
@@ -10,4 +8,4 @@ runApplication decomposePar
 runParallel $(getApplication)
 runApplication reconstructPar
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre
index fd9adacb88..78478afc1e 100755
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre
@@ -1,13 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy propeller surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
 
-
 # - meshing
 
 runApplication blockMesh
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allclean b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allclean
index ae51d1251b..a743892030 100755
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allclean
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allclean
@@ -1,24 +1,11 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+( cd wingMotion_snappyHexMesh && cleanCase )
 
-(
-    cd wingMotion_snappyHexMesh || exit 1
-    cleanCase
-)
+( cd wingMotion2D_simpleFoam && cleanCase0 )
 
-(
-    cd wingMotion2D_simpleFoam || exit 1
-    cleanCase
-    rm -rf 0
-)
-
-(
-    cd wingMotion2D_pimpleDyMFoam || exit 1
-    cleanCase
-    rm -rf 0
-)
+( cd wingMotion2D_pimpleDyMFoam && cleanCase0 )
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
index 0b5930fddc..f173a5d46f 100755
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Make 3D mesh in slab of cells.
 (
diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395/Allrun b/tutorials/incompressible/pimpleFoam/LES/channel395/Allrun
index 8d10da5a1f..08e91994a5 100755
--- a/tutorials/incompressible/pimpleFoam/LES/channel395/Allrun
+++ b/tutorials/incompressible/pimpleFoam/LES/channel395/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 runApplication blockMesh
diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/Allrun b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/Allrun
index 5d8a22acc0..d6690e27ed 100755
--- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/Allrun
+++ b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
@@ -14,4 +12,4 @@ runApplication decomposePar -cellDist
 runParallel $(getApplication)
 #runApplication reconstructPar -latestTime
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allclean b/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allclean
index 97f2707db8..e2f275d9fd 100755
--- a/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allclean
+++ b/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allclean
@@ -1,9 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-cleanCase
-
-\rm -rf 0
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun b/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun
index 8551f1c715..df2af13380 100755
--- a/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun
+++ b/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 rm -f system/blockMeshDict
 m4 system/blockMeshDict.m4 > system/blockMeshDict
@@ -14,3 +12,5 @@ restore0Dir
 runApplication decomposePar
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allclean b/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allclean
+++ b/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun b/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun
index 1492c40ae0..7a41c21568 100755
--- a/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun
+++ b/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 runApplication blockMesh
@@ -17,4 +15,4 @@ runApplication createBaffles -overwrite
 
 runApplication $(getApplication)
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allclean b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allclean
+++ b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun
index a1f6b6bbb6..097989bcc7 100755
--- a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun
+++ b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 runApplication blockMesh
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allclean b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allclean
index 7873948407..bb826d2457 100755
--- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allclean
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -rf *.dat validation/*.eps
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun
index 1737ee272a..784b7fab75 100755
--- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph
index d6402c1b4d..b44450a783 100755
--- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph
@@ -24,4 +24,4 @@ gnuplot<<EOF
         "../WatersKing.dat" with lines t "Analytical" lt -1
 EOF
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/Allclean b/tutorials/incompressible/pisoFoam/LES/motorBike/Allclean
index 5521d49681..507327c90a 100755
--- a/tutorials/incompressible/pisoFoam/LES/motorBike/Allclean
+++ b/tutorials/incompressible/pisoFoam/LES/motorBike/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 (cd motorBike && ./Allclean)
 
diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun b/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun
index 65eb7ef78f..9f48464dc2 100755
--- a/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun
+++ b/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Do the Spalart-Allmaras steady-state case
 (cd motorBike && foamRunTutorials)
diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/Allrun b/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/Allrun
index e18982c7e6..5bd3017bd2 100755
--- a/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/Allrun
+++ b/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Set-up the LES case
 \cp ../lesFiles/fvS* ../lesFiles/controlDict system/
diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allclean b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allclean
index da3e926333..d4886e9227 100755
--- a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allclean
+++ b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 # Remove surface
 rm -f constant/triSurface/motorBike.obj.gz
diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun
index b3fbef3291..ede3cb25c2 100755
--- a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun
+++ b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy motorbike surface from resources directory
 \cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun
index db65453658..f88fe7fd92 100755
--- a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean
index 7b7e1442f8..0686c27498 100755
--- a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean
@@ -1,12 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
+cleanCase0
 
 # Remove copies of common files
-\rm -rf 0 constant
+\rm -rf constant
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allrun b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allrun
index f7891cd4f8..1331199845 100755
--- a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allrun
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 echo "Use common files for 0/, constant/ and blockMeshDict"
 \rm -rf 0 constant
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean
index 7b7e1442f8..0686c27498 100755
--- a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean
@@ -1,12 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
+cleanCase0
 
 # Remove copies of common files
-\rm -rf 0 constant
+\rm -rf constant
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allrun b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allrun
index f7891cd4f8..1331199845 100755
--- a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allrun
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 echo "Use common files for 0/, constant/ and blockMeshDict"
 \rm -rf 0 constant
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
index 4ebf8a1a7f..d6454c597f 100755
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun
index dbc0b12711..4a206678cd 100755
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
index 33bf5258ce..d8dd070214 100755
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication surfaceFeatureExtract
 
diff --git a/tutorials/incompressible/simpleFoam/T3A/Allclean b/tutorials/incompressible/simpleFoam/T3A/Allclean
index f02ac1a6eb..8ad093a08c 100755
--- a/tutorials/incompressible/simpleFoam/T3A/Allclean
+++ b/tutorials/incompressible/simpleFoam/T3A/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -f validation/*.eps
diff --git a/tutorials/incompressible/simpleFoam/T3A/Allrun b/tutorials/incompressible/simpleFoam/T3A/Allrun
index 666bf88e7e..c43f998573 100755
--- a/tutorials/incompressible/simpleFoam/T3A/Allrun
+++ b/tutorials/incompressible/simpleFoam/T3A/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/Allrun b/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
index c96f61d7ef..16a6a8651d 100755
--- a/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
+++ b/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication $(getApplication)
 
diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun b/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
index 52b2a4941d..5db0a1c8e5 100755
--- a/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
+++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/makeMesh b/tutorials/incompressible/simpleFoam/mixerVessel2D/makeMesh
index 5cd24a5528..0caafbabf9 100755
--- a/tutorials/incompressible/simpleFoam/mixerVessel2D/makeMesh
+++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/makeMesh
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 < system/blockMeshDict.m4 > system/blockMeshDict
 
diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allclean b/tutorials/incompressible/simpleFoam/motorBike/Allclean
index 1dca1e0677..a0bb1b4d39 100755
--- a/tutorials/incompressible/simpleFoam/motorBike/Allclean
+++ b/tutorials/incompressible/simpleFoam/motorBike/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 # Remove surface and features
 rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allrun b/tutorials/incompressible/simpleFoam/motorBike/Allrun
index c110f083ec..268780fb13 100755
--- a/tutorials/incompressible/simpleFoam/motorBike/Allrun
+++ b/tutorials/incompressible/simpleFoam/motorBike/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Alternative decomposeParDict name:
 decompDict="-decomposeParDict system/decomposeParDict.6"
@@ -15,7 +13,7 @@ runApplication surfaceFeatureExtract
 
 runApplication blockMesh
 
-runApplication decomposePar $decompDict
+runApplication $decompDict decomposePar
 
 # Using distributedTriSurfaceMesh?
 if foamDictionary -entry geometry -value system/snappyHexMeshDict | \
diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean b/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
+++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
index 0cade47aa8..9b8ed30d97 100755
--- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
+++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
index 47d0a0c0c1..09925d447d 100755
--- a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
+++ b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/Allrun b/tutorials/incompressible/simpleFoam/rotorDisk/Allrun
index f6f1258231..12d9aa38bf 100755
--- a/tutorials/incompressible/simpleFoam/rotorDisk/Allrun
+++ b/tutorials/incompressible/simpleFoam/rotorDisk/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Meshing
 runApplication blockMesh
diff --git a/tutorials/incompressible/simpleFoam/simpleCar/Allrun b/tutorials/incompressible/simpleFoam/simpleCar/Allrun
index db65453658..f88fe7fd92 100755
--- a/tutorials/incompressible/simpleFoam/simpleCar/Allrun
+++ b/tutorials/incompressible/simpleFoam/simpleCar/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/Allclean b/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
index abf6e2e700..c357ba7bfe 100755
--- a/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 # Remove decomposeParDict
 rm -f system/decomposeParDict
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/Allrun b/tutorials/incompressible/simpleFoam/turbineSiting/Allrun
index fd62abc0fa..ef45fe0dd5 100755
--- a/tutorials/incompressible/simpleFoam/turbineSiting/Allrun
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Make dummy 0 directory
 mkdir 0
diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
index 8039a75264..53afd7eaea 100755
--- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
+++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
index 06dc7a18c5..cc32f55043 100755
--- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
+++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication surfaceFeatureExtract
 
diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/Allclean b/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
index e274cef962..d4f2a95a0e 100755
--- a/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
+++ b/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/Allrun b/tutorials/lagrangian/MPPICFoam/cyclone/Allrun
index 8af86abdc3..680e22fbc3 100755
--- a/tutorials/lagrangian/MPPICFoam/cyclone/Allrun
+++ b/tutorials/lagrangian/MPPICFoam/cyclone/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 cp $FOAM_TUTORIALS/resources/geometry/cyclone.stl.gz constant/triSurface
diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
index 158fb0bf52..1c2a7447eb 100755
--- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
+++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create mesh
 runApplication blockMesh
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/Allrun b/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/Allrun
index ac4e385790..413155fdb0 100755
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/Allrun
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/Allrun
@@ -1,11 +1,11 @@
 #!/bin/sh
-
-cd ${0%/*} || exit 1 # Run from this directory
-
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 < system/blockMeshDict.m4 > system/blockMeshDict
 
 runApplication blockMesh
 
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
index 47cedce61e..d837e1f760 100755
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
@@ -1,20 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+( cd hopperInitialState && cleanCase )
 
-(
-    cd hopperInitialState || exit 1
-
-    cleanCase
-)
-
-(
-    cd hopperEmptying || exit 1
-
-    cleanCase
-    rm -rf 0
-)
+( cd hopperEmptying && cleanCase0 )
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun
index 2beb0f0355..c8e15ac944 100755
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 (
     cd hopperInitialState || exit 1
diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allclean b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allclean
index 4d36bb740b..51e9ee16ca 100755
--- a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/wallFilmRegion
 rm -f *.obj
diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun
index dbc0b12711..4a206678cd 100755
--- a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun.pre b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun.pre
index 1ad7fbb61c..1f5781ea73 100755
--- a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 runApplication blockMesh
diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/Allclean b/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/Allrun b/tutorials/lagrangian/reactingParcelFoam/filter/Allrun
index 183ac7a864..683c4a31e0 100755
--- a/tutorials/lagrangian/reactingParcelFoam/filter/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/filter/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allclean b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allclean
index 6ed9b627a7..9b60dae89e 100755
--- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf system/wallFilmRegion
 rm -rf constant/wallFilmRegion
diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun
index dbc0b12711..4a206678cd 100755
--- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel
index a061f0da4c..77822ffda3 100755
--- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel
+++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun.pre b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun.pre
index a9f16e526a..4a6913188f 100755
--- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allclean b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allclean
index 4d36bb740b..51e9ee16ca 100755
--- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/wallFilmRegion
 rm -f *.obj
diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun
index dbc0b12711..4a206678cd 100755
--- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun.pre
index 4ff21dad8e..4002157fcf 100755
--- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allclean b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allclean
index 4d36bb740b..51e9ee16ca 100755
--- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/wallFilmRegion
 rm -f *.obj
diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun
index dbc0b12711..4a206678cd 100755
--- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun.pre
index 00eed56aae..1722219969 100755
--- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun
index 58c87fca19..9edda44dd8 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create mesh
 runApplication blockMesh
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allrun b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allrun
index 58c87fca19..9edda44dd8 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create mesh
 runApplication blockMesh
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
index 6be8a20516..c2c258a824 100755
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/mesh/blockMesh/pipe/Allrun b/tutorials/mesh/blockMesh/pipe/Allrun
index 3c4ef3e7ff..a33126fcfd 100755
--- a/tutorials/mesh/blockMesh/pipe/Allrun
+++ b/tutorials/mesh/blockMesh/pipe/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/mesh/blockMesh/sphere/Allrun b/tutorials/mesh/blockMesh/sphere/Allrun
index 3c4ef3e7ff..a33126fcfd 100755
--- a/tutorials/mesh/blockMesh/sphere/Allrun
+++ b/tutorials/mesh/blockMesh/sphere/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/mesh/blockMesh/sphere7/Allrun b/tutorials/mesh/blockMesh/sphere7/Allrun
index 3c4ef3e7ff..a33126fcfd 100755
--- a/tutorials/mesh/blockMesh/sphere7/Allrun
+++ b/tutorials/mesh/blockMesh/sphere7/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/mesh/blockMesh/sphere7ProjectedEdges/Allrun b/tutorials/mesh/blockMesh/sphere7ProjectedEdges/Allrun
index 3c4ef3e7ff..a33126fcfd 100755
--- a/tutorials/mesh/blockMesh/sphere7ProjectedEdges/Allrun
+++ b/tutorials/mesh/blockMesh/sphere7ProjectedEdges/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/mesh/foamyHexMesh/Allrun b/tutorials/mesh/foamyHexMesh/Allrun
index 93da24214e..d8d59bb661 100755
--- a/tutorials/mesh/foamyHexMesh/Allrun
+++ b/tutorials/mesh/foamyHexMesh/Allrun
@@ -1,32 +1,18 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Any cases that are links to solver test cases and are run when the Allrun
 # scripts of those solvers are run.  This script avoids meshing these cases
 # twice.
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
-(
-    cd blob || exit
-    ./Allrun $*
-)
-(
-    cd simpleShapes || exit
-    ./Allrun $*
-)
+( cd blob && ./Allrun $* )
+( cd simpleShapes && ./Allrun $* )
 
 if ! isTest $@
 then
-    (
-        cd flange || exit
-        ./Allrun $*
-    )
-    (
-        cd mixerVessel || exit
-        ./Allrun $*
-    )
+    ( cd flange && ./Allrun $* )
+    ( cd mixerVessel && ./Allrun $* )
 fi
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/blob/Allclean b/tutorials/mesh/foamyHexMesh/blob/Allclean
index f4dcb53f51..1b3fad50fc 100755
--- a/tutorials/mesh/foamyHexMesh/blob/Allclean
+++ b/tutorials/mesh/foamyHexMesh/blob/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/triSurface/blob.stl.gz > /dev/null 2>&1
 
diff --git a/tutorials/mesh/foamyHexMesh/blob/Allrun b/tutorials/mesh/foamyHexMesh/blob/Allrun
index a4d7bd61d5..b4c8454ee3 100755
--- a/tutorials/mesh/foamyHexMesh/blob/Allrun
+++ b/tutorials/mesh/foamyHexMesh/blob/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy flange surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/
diff --git a/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel b/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel
index 7947ab35f2..32429bd239 100755
--- a/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel
+++ b/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy flange surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/
diff --git a/tutorials/mesh/foamyHexMesh/flange/Allclean b/tutorials/mesh/foamyHexMesh/flange/Allclean
index 75abafd12b..c4e27e7164 100755
--- a/tutorials/mesh/foamyHexMesh/flange/Allclean
+++ b/tutorials/mesh/foamyHexMesh/flange/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -r constant/triSurface/flange.stl.gz > /dev/null 2>&1
 
diff --git a/tutorials/mesh/foamyHexMesh/flange/Allrun b/tutorials/mesh/foamyHexMesh/flange/Allrun
index 414ca8f4a3..5487824ca4 100755
--- a/tutorials/mesh/foamyHexMesh/flange/Allrun
+++ b/tutorials/mesh/foamyHexMesh/flange/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy flange surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
diff --git a/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel b/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel
index fb57faff8e..c9e154a60c 100755
--- a/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel
+++ b/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy flange surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean b/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
index afee03547e..7a64d7a6b5 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/extendedFeatureEdgeMesh/
 rm -f constant/triSurface/*.eMesh*
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun
index b66c25a9a4..5aabd4c3ee 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Generate mesh
 ./Allrun-pre
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
index 21c5d3f199..fa89b7f6c3 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 intersectSurfaces()
 {
@@ -38,7 +36,7 @@ intersectSurfaces stirrer_baffles.stl stirrer.stl -surf1Baffle -perturb
 intersectSurfaces rotating.stl shaft.stl -surf1Baffle -perturb
 
 # Intersect blades with the plate
-for bladeI in $(seq 1 6);
+for bladeI in $(seq 1 6)
 do
     intersectSurfaces \
         stirrer_baffles_$bladeI.obj \
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
index 392878e5d3..a7922952e6 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 cp system/controlDict.flow system/controlDict
 
diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
index 5ef122ebb3..42523e30e7 100755
--- a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
+++ b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices > /dev/null 2>&1
 rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun b/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun
index 1535c7a3a8..482564c8b5 100755
--- a/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun
+++ b/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication -s cone \
     surfaceOrient constant/triSurface/cone.stl \
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
index 894a75c4e0..26eaea4667 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -rf constant/triSurface/*.eMesh > /dev/null 2>&1
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
index cdd750415c..f22a5824bb 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 # Make sure surface is oriented properly. Since the letters
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
index 56aef09d09..c4060eedef 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 \cp system/controlDict.rhoCentralFoam system/controlDict
 restore0Dir
diff --git a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
index 1048413963..429017895d 100755
--- a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
index 5434248652..f559f8204e 100755
--- a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication surfaceFeatureExtract
 runApplication foamyQuadMesh -overwrite
diff --git a/tutorials/mesh/foamyQuadMesh/square/Allclean b/tutorials/mesh/foamyQuadMesh/square/Allclean
index 8da713f31d..dc764a614a 100755
--- a/tutorials/mesh/foamyQuadMesh/square/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/square/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/mesh/foamyQuadMesh/square/Allrun b/tutorials/mesh/foamyQuadMesh/square/Allrun
index 87a113fc12..f72c275f01 100755
--- a/tutorials/mesh/foamyQuadMesh/square/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/square/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication surfaceFeatureExtract
 runApplication foamyQuadMesh -overwrite
diff --git a/tutorials/mesh/moveDynamicMesh/relativeMotion/Allclean b/tutorials/mesh/moveDynamicMesh/relativeMotion/Allclean
index a94a6172db..57317ddb1f 100755
--- a/tutorials/mesh/moveDynamicMesh/relativeMotion/Allclean
+++ b/tutorials/mesh/moveDynamicMesh/relativeMotion/Allclean
@@ -1,19 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-(
-    cd box_snappyHexMesh || exit 1
-    cleanCase
-)
-
-(
-    cd box2D_moveDynamicMesh || exit 1
-    cleanCase
-    rm -rf 0
-)
+( cd box_snappyHexMesh && cleanCase )
 
+( cd box2D_moveDynamicMesh && cleanCase0 )
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/moveDynamicMesh/relativeMotion/Allrun b/tutorials/mesh/moveDynamicMesh/relativeMotion/Allrun
index 456beeaab5..785ab59cd0 100755
--- a/tutorials/mesh/moveDynamicMesh/relativeMotion/Allrun
+++ b/tutorials/mesh/moveDynamicMesh/relativeMotion/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Make 3D mesh in slab of cells.
 (
diff --git a/tutorials/mesh/parallel/cavity/Allclean b/tutorials/mesh/parallel/cavity/Allclean
index ee9845194c..3bd36a4b03 100755
--- a/tutorials/mesh/parallel/cavity/Allclean
+++ b/tutorials/mesh/parallel/cavity/Allclean
@@ -7,4 +7,4 @@ cleanCase
 # Restore default dictionaries
 cp system/controlDict-startTime system/controlDict
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/parallel/cavity/Allrun b/tutorials/mesh/parallel/cavity/Allrun
index 6c7668f4fa..fdb4a734ca 100755
--- a/tutorials/mesh/parallel/cavity/Allrun
+++ b/tutorials/mesh/parallel/cavity/Allrun
@@ -30,4 +30,4 @@ runParallel -s 5 $decompDict5 icoFoam
 # Reconstruct mesh and results
 runParallel -s reconstruct -np 5 redistributePar -reconstruct
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/parallel/filter/Allclean b/tutorials/mesh/parallel/filter/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/mesh/parallel/filter/Allclean
+++ b/tutorials/mesh/parallel/filter/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/parallel/filter/Allrun b/tutorials/mesh/parallel/filter/Allrun
index 598afe74a5..5ac013e09f 100755
--- a/tutorials/mesh/parallel/filter/Allrun
+++ b/tutorials/mesh/parallel/filter/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 application=$(getApplication)
 
@@ -29,4 +27,4 @@ runParallel -s parallel $application
 #- Reconstruct all times
 runParallel -s 1 redistributePar -reconstruct
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/Allclean b/tutorials/mesh/refineMesh/refineFieldDirs/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/mesh/refineMesh/refineFieldDirs/Allclean
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/Allrun b/tutorials/mesh/refineMesh/refineFieldDirs/Allrun
index c3bdd39961..26cdf66ba1 100755
--- a/tutorials/mesh/refineMesh/refineFieldDirs/Allrun
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 wmake calcRadiusField
 wclean calcRadiusField
diff --git a/tutorials/mesh/snappyHexMesh/Allrun b/tutorials/mesh/snappyHexMesh/Allrun
index f81482f874..976f75d38c 100755
--- a/tutorials/mesh/snappyHexMesh/Allrun
+++ b/tutorials/mesh/snappyHexMesh/Allrun
@@ -1,21 +1,9 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
-(
-    cd flange || exit
-    ./Allrun $*
-)
-
-(
-    cd addLayersToFaceZone || exit
-    ./Allrun
-)
-
-(
-    cd gap_detection || exit
-    ./Allrun
-)
+( cd flange && ./Allrun $* )
+( cd addLayersToFaceZone && ./Allrun )
+( cd gap_detection && ./Allrun )
 
 exit 0
 
diff --git a/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allclean b/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allclean
+++ b/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun b/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun
index 7a0dffe68c..0ee02ee226 100755
--- a/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun
+++ b/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 
 runApplication blockMesh
diff --git a/tutorials/mesh/snappyHexMesh/flange/Allclean b/tutorials/mesh/snappyHexMesh/flange/Allclean
index e46b494f7b..69d183efe5 100755
--- a/tutorials/mesh/snappyHexMesh/flange/Allclean
+++ b/tutorials/mesh/snappyHexMesh/flange/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -f ./flange ./*.obj > /dev/null 2>&1
 
diff --git a/tutorials/mesh/snappyHexMesh/flange/Allrun b/tutorials/mesh/snappyHexMesh/flange/Allrun
index cae2427078..8e2c10e1ed 100755
--- a/tutorials/mesh/snappyHexMesh/flange/Allrun
+++ b/tutorials/mesh/snappyHexMesh/flange/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy flange surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
diff --git a/tutorials/mesh/snappyHexMesh/gap_detection/Allclean b/tutorials/mesh/snappyHexMesh/gap_detection/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/mesh/snappyHexMesh/gap_detection/Allclean
+++ b/tutorials/mesh/snappyHexMesh/gap_detection/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/mesh/snappyHexMesh/gap_detection/Allrun b/tutorials/mesh/snappyHexMesh/gap_detection/Allrun
index fb62f26883..afb0ddb734 100755
--- a/tutorials/mesh/snappyHexMesh/gap_detection/Allrun
+++ b/tutorials/mesh/snappyHexMesh/gap_detection/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allclean b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allclean
index eb6c79aa66..8b16e2858e 100755
--- a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allclean
+++ b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allclean
@@ -1,12 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
 rm -f system/blockMeshDict
 rm -f 0/alpha.water
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
index 73737743f2..b2023e2d8f 100755
--- a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
+++ b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # create the underlying block mesh
 m4 system/pachuka.m4 > system/blockMeshDict
@@ -29,4 +27,4 @@ runParallel $(getApplication)
 # Reconstruct case
 runApplication reconstructPar
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/LES/Allrun b/tutorials/multiphase/cavitatingFoam/LES/Allrun
index e0ffdffe18..153b2506fc 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/LES/Allrun
@@ -1,14 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-(
-    cd throttle || exit
-    ./Allrun $*
-)
-
-(
-    cd throttle3D || exit
-    ./Allrun $*
-)
+( cd throttle && ./Allrun $* )
+( cd throttle3D && ./Allrun $* )
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean
index 6bb45f9da9..7e94847a48 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allrun
index d399430e22..1b1d5e80a0 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 refineMeshByCellSet()
 {
diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean
index 8b8b96fa04..d695acbf07 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm system/topoSetDict > /dev/null 2>&1
 rm -rf processor[0-9] > /dev/null 2>&1
diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allrun b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allrun
index 39816254dd..15a39575b7 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 refineMeshByCellSet()
 {
diff --git a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean
index 6bb45f9da9..7e94847a48 100755
--- a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allrun
index d399430e22..1b1d5e80a0 100755
--- a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 refineMeshByCellSet()
 {
diff --git a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sloshingTank2D/Allrun b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sloshingTank2D/Allrun
index 31527e6ec2..c63280a960 100755
--- a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sloshingTank2D/Allrun
+++ b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sloshingTank2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
diff --git a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allclean b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allclean
index e49ac35744..e2f275d9fd 100755
--- a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allclean
+++ b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allclean
@@ -1,9 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-cleanCase
-
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun
index 7c3704c168..55bb318bf3 100755
--- a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun
+++ b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun.parallel b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun.parallel
index bdf2b279c7..e66ceb6b8f 100755
--- a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun.parallel
+++ b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun.parallel
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun
index fd07af1d46..423e9ec833 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 restore0Dir
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
index 86d9367383..3b8c6e8e2f 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 rm -rf processor*
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun
index 6c6dafdea4..bdb96428fa 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 restore0Dir
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
index 6cfec647c7..efced0038e 100755
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun b/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun
index f1273de8e4..6aeae15553 100755
--- a/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/makeMesh b/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/makeMesh
index 4d667956a0..4065edb322 100755
--- a/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/makeMesh
+++ b/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/makeMesh
@@ -4,3 +4,5 @@ m4 < system/blockMeshDict.m4 > system/blockMeshDict
 blockMesh
 topoSet
 setsToZones -noFlipMap
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun
index c96f61d7ef..16a6a8651d 100755
--- a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun
+++ b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication $(getApplication)
 
diff --git a/tutorials/multiphase/interCondensatingEvaporatingFoam/condensatingVessel/Allclean b/tutorials/multiphase/interCondensatingEvaporatingFoam/condensatingVessel/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/multiphase/interCondensatingEvaporatingFoam/condensatingVessel/Allclean
+++ b/tutorials/multiphase/interCondensatingEvaporatingFoam/condensatingVessel/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/multiphase/interCondensatingEvaporatingFoam/condensatingVessel/Allrun b/tutorials/multiphase/interCondensatingEvaporatingFoam/condensatingVessel/Allrun
index ebc19b3d2a..5aace967ac 100755
--- a/tutorials/multiphase/interCondensatingEvaporatingFoam/condensatingVessel/Allrun
+++ b/tutorials/multiphase/interCondensatingEvaporatingFoam/condensatingVessel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 application=$(getApplication)
 
diff --git a/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allclean b/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allclean
index a0aed574d0..6149df2bfa 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allclean
@@ -1,11 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-cleanCase
-rm -rf 0
 rm system/topoSetDict > /dev/null 2>&1
 
 # Remove surface and features
diff --git a/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allrun b/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allrun
index 99249befa7..975e30d65e 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allrun
+++ b/tutorials/multiphase/interDyMFoam/RAS/DTCHull/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy DTC hull surface from resources folder
 cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
diff --git a/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allclean b/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allrun b/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allrun
index 6a9d0d0229..7aede960f7 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allrun
+++ b/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allclean b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allclean
index d3b4c4257f..9f8dfd7808 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0 > /dev/null 2>&1
+cleanCase0
 
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
diff --git a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun
index 83e66bcf9c..62fbd9b214 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun
+++ b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun.pre b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun.pre
index 0d993b2ee7..684bc56996 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun.pre
+++ b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 \rm -rf 0
 
diff --git a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
index 5442dc1333..a8a5c30fc0 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 # Remove surface and features
 \rm -f  constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
@@ -14,4 +11,4 @@ rm -rf 0
 
 \cp system/controlDict_run system/controlDict
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
index af3c3b444d..e2641b8934 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
+++ b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
@@ -16,4 +14,4 @@ FOAM_SIGFPE=false runParallel -s reconstruct redistributePar -reconstruct
 runParallel -s decompose redistributePar -decompose -latestTime
 runParallel -s restart $(getApplication)
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun.pre b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun.pre
index d4a3ff9639..030f1f8113 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun.pre
+++ b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun.pre
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy motorbike surface from resources directory
 \cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
diff --git a/tutorials/multiphase/interDyMFoam/laminar/damBreakWithObstacle/Allclean b/tutorials/multiphase/interDyMFoam/laminar/damBreakWithObstacle/Allclean
index c9e8210d77..dced1dda72 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/damBreakWithObstacle/Allclean
+++ b/tutorials/multiphase/interDyMFoam/laminar/damBreakWithObstacle/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm system/cellSetDict > /dev/null 2>&1
 
diff --git a/tutorials/multiphase/interDyMFoam/laminar/damBreakWithObstacle/Allrun b/tutorials/multiphase/interDyMFoam/laminar/damBreakWithObstacle/Allrun
index 755d7612a4..4c6e367d38 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/damBreakWithObstacle/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/damBreakWithObstacle/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 runApplication blockMesh
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingCylinder/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingCylinder/Allrun
index 355fea57a8..9fa872e193 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingCylinder/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingCylinder/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication snappyHexMesh -overwrite
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D/Allrun
index e827b4c66a..ae24f74396 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D3DoF/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D3DoF/Allrun
index e827b4c66a..ae24f74396 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D3DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D3DoF/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D/Allrun
index e827b4c66a..ae24f74396 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D3DoF/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D3DoF/Allrun
index 823b296e60..faada17ac6 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D3DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D3DoF/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D6DoF/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D6DoF/Allrun
index 31527e6ec2..c63280a960 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D6DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D6DoF/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
diff --git a/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allclean b/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allclean
index 8c9c9abaac..e068de2b13 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allclean
+++ b/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm -rf 0/alpha.water
diff --git a/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allrun b/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allrun
index 0af06e79fb..a96f714b60 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 cp 0/alpha.water.orig 0/alpha.water
diff --git a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean
index 473383859a..20ea2353bb 100755
--- a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean
+++ b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm system/topoSetDict > /dev/null 2>&1
diff --git a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun
index f110e3491b..dc59cb1831 100755
--- a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun
+++ b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean b/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean
index 0086cd47cb..9c855955a4 100755
--- a/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm system/topoSetDict > /dev/null 2>&1
 
diff --git a/tutorials/multiphase/interFoam/RAS/DTCHull/Allrun b/tutorials/multiphase/interFoam/RAS/DTCHull/Allrun
index 3eddb17d71..2bd2c19a2f 100755
--- a/tutorials/multiphase/interFoam/RAS/DTCHull/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/DTCHull/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy DTC hull surface from resources folder
 \cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
diff --git a/tutorials/multiphase/interFoam/RAS/angledDuct/Allrun b/tutorials/multiphase/interFoam/RAS/angledDuct/Allrun
index ccdfefe5c1..54368cee89 100755
--- a/tutorials/multiphase/interFoam/RAS/angledDuct/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/angledDuct/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 
diff --git a/tutorials/multiphase/interFoam/RAS/damBreak/Allclean b/tutorials/multiphase/interFoam/RAS/damBreak/Allclean
index efbd66e1c2..050c71bde5 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreak/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/damBreak/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 keepCases="damBreak"
 loseCases="damBreakFine"
diff --git a/tutorials/multiphase/interFoam/RAS/damBreak/Allrun b/tutorials/multiphase/interFoam/RAS/damBreak/Allrun
index 928fc5036d..5588e4ecd0 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/damBreak/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 setDamBreakFine ()
 {
diff --git a/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allclean b/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allclean
index 652e15f721..f578727b2f 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 \cp 0/alpha.water.orig 0/alpha.water
diff --git a/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allrun b/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allrun
index ed61ac5435..5bd0f99f30 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication setFields
diff --git a/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allclean b/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allclean
index 652e15f721..f578727b2f 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 \cp 0/alpha.water.orig 0/alpha.water
diff --git a/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allrun b/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allrun
index 4c6866acbc..7d16543244 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication setFields
diff --git a/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean b/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean
index e67e3024e8..b5e3d9ce88 100755
--- a/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh b/tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh
index 92d09ceaef..d0b3f75378 100755
--- a/tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh
+++ b/tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/multiphase/interFoam/RAS/waterChannel/Allrun b/tutorials/multiphase/interFoam/RAS/waterChannel/Allrun
index 5a86d49dcb..072b6d2b19 100755
--- a/tutorials/multiphase/interFoam/RAS/waterChannel/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/waterChannel/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allmesh
 
diff --git a/tutorials/multiphase/interFoam/RAS/weirOverflow/Allclean b/tutorials/multiphase/interFoam/RAS/weirOverflow/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/RAS/weirOverflow/Allclean
+++ b/tutorials/multiphase/interFoam/RAS/weirOverflow/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun b/tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun
index e0a3d74125..c710725926 100755
--- a/tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun b/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
index b52e0c12fd..42050e1779 100755
--- a/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 \cp 0/alpha.water.orig 0/alpha.water
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/Allclean b/tutorials/multiphase/interFoam/laminar/damBreak/Allclean
index efbd66e1c2..050c71bde5 100755
--- a/tutorials/multiphase/interFoam/laminar/damBreak/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 keepCases="damBreak"
 loseCases="damBreakFine"
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/Allrun b/tutorials/multiphase/interFoam/laminar/damBreak/Allrun
index 928fc5036d..5588e4ecd0 100755
--- a/tutorials/multiphase/interFoam/laminar/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 setDamBreakFine ()
 {
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean
index 652e15f721..f578727b2f 100755
--- a/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 \cp 0/alpha.water.orig 0/alpha.water
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun
index ed61ac5435..5bd0f99f30 100755
--- a/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication setFields
diff --git a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
index d347ad0a84..3aa1e7a9dd 100755
--- a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication ./makeMesh
 \cp 0/alpha.water.orig 0/alpha.water
diff --git a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/makeMesh b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/makeMesh
index 4d667956a0..4065edb322 100755
--- a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/makeMesh
+++ b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/makeMesh
@@ -4,3 +4,5 @@ m4 < system/blockMeshDict.m4 > system/blockMeshDict
 blockMesh
 topoSet
 setsToZones -noFlipMap
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun
index da1575a1aa..a9796a5b0f 100755
--- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun
@@ -1,9 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 (cd eulerianInjection && ./Allrun)
 (cd lagrangianParticleInjection && ./Allrun)
 (cd lagrangianDistributionInjection && ./Allrun)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allclean b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allclean
index 8976b1e90b..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-\rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allrun
index 8c13891df5..bf653b6483 100755
--- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication  -s createBlockage topoSet -dict system/topoSetDict.createBlockage
diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allclean b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allclean
index c07f861837..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allclean
@@ -1,8 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-\rm -rf 0
-cleanCase
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allrun
index 8c4e782f63..3dd409fe04 100755
--- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianDistributionInjection/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 eulerianCase=../eulerianInjection
 
@@ -53,3 +51,5 @@ runApplication decomposePar
 runParallel $(getApplication)
 
 runApplication reconstructPar
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allclean b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allclean
index c07f861837..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allclean
@@ -1,8 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-\rm -rf 0
-cleanCase
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allrun
index 8c4e782f63..3dd409fe04 100755
--- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/lagrangianParticleInjection/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 eulerianCase=../eulerianInjection
 
@@ -53,3 +51,5 @@ runApplication decomposePar
 runParallel $(getApplication)
 
 runApplication reconstructPar
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleCnoidal/Allclean b/tutorials/multiphase/interFoam/laminar/waveExampleCnoidal/Allclean
index 705f91474c..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleCnoidal/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleCnoidal/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-rm -rf 0
-
-cleanCase
+cleanCase0
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleCnoidal/Allrun b/tutorials/multiphase/interFoam/laminar/waveExampleCnoidal/Allrun
index 9f0c668029..28bf991e62 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleCnoidal/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleCnoidal/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -13,3 +11,5 @@ runApplication decomposePar
 runParallel setFields
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleSolitary/Allclean b/tutorials/multiphase/interFoam/laminar/waveExampleSolitary/Allclean
index 705f91474c..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleSolitary/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleSolitary/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-rm -rf 0
-
-cleanCase
+cleanCase0
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleSolitary/Allrun b/tutorials/multiphase/interFoam/laminar/waveExampleSolitary/Allrun
index 9f0c668029..28bf991e62 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleSolitary/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleSolitary/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -13,3 +11,5 @@ runApplication decomposePar
 runParallel setFields
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryGrimshaw/Allclean b/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryGrimshaw/Allclean
index 705f91474c..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryGrimshaw/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryGrimshaw/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-rm -rf 0
-
-cleanCase
+cleanCase0
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryGrimshaw/Allrun b/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryGrimshaw/Allrun
index 9f0c668029..28bf991e62 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryGrimshaw/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryGrimshaw/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -13,3 +11,5 @@ runApplication decomposePar
 runParallel setFields
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryMcCowan/Allclean b/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryMcCowan/Allclean
index 705f91474c..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryMcCowan/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryMcCowan/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-rm -rf 0
-
-cleanCase
+cleanCase0
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryMcCowan/Allrun b/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryMcCowan/Allrun
index 9f0c668029..28bf991e62 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryMcCowan/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleSolitaryMcCowan/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -13,3 +11,5 @@ runApplication decomposePar
 runParallel setFields
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleStokesI/Allclean b/tutorials/multiphase/interFoam/laminar/waveExampleStokesI/Allclean
index 705f91474c..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleStokesI/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleStokesI/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-rm -rf 0
-
-cleanCase
+cleanCase0
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleStokesI/Allrun b/tutorials/multiphase/interFoam/laminar/waveExampleStokesI/Allrun
index 9f0c668029..28bf991e62 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleStokesI/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleStokesI/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -13,3 +11,5 @@ runApplication decomposePar
 runParallel setFields
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleStokesII/Allclean b/tutorials/multiphase/interFoam/laminar/waveExampleStokesII/Allclean
index 705f91474c..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleStokesII/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleStokesII/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-rm -rf 0
-
-cleanCase
+cleanCase0
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleStokesII/Allrun b/tutorials/multiphase/interFoam/laminar/waveExampleStokesII/Allrun
index 9f0c668029..28bf991e62 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleStokesII/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleStokesII/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -13,3 +11,5 @@ runApplication decomposePar
 runParallel setFields
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/Allclean b/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/Allclean
index 705f91474c..e2f275d9fd 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-rm -rf 0
-
-cleanCase
+cleanCase0
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/Allrun b/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/Allrun
index 9f0c668029..28bf991e62 100755
--- a/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/waveExampleStokesV/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -13,3 +11,5 @@ runApplication decomposePar
 runParallel setFields
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/damBreak/Allclean b/tutorials/multiphase/interIsoFoam/damBreak/Allclean
index 513c366d4e..40363dccf7 100755
--- a/tutorials/multiphase/interIsoFoam/damBreak/Allclean
+++ b/tutorials/multiphase/interIsoFoam/damBreak/Allclean
@@ -1,9 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
+\rm -rf isoFaces
 
-cleanCase
-
-\rm -rf 0 isoFaces
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/damBreak/Allrun b/tutorials/multiphase/interIsoFoam/damBreak/Allrun
index 73a4aa44fc..afce703847 100755
--- a/tutorials/multiphase/interIsoFoam/damBreak/Allrun
+++ b/tutorials/multiphase/interIsoFoam/damBreak/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -10,3 +8,5 @@ runApplication blockMesh
 runApplication setFields
 
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/damBreak/Allrun-parallel b/tutorials/multiphase/interIsoFoam/damBreak/Allrun-parallel
index 729fedf62c..2a2861b730 100755
--- a/tutorials/multiphase/interIsoFoam/damBreak/Allrun-parallel
+++ b/tutorials/multiphase/interIsoFoam/damBreak/Allrun-parallel
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -11,3 +9,5 @@ runApplication decomposePar
 runParallel setFields
 
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/discInConstantFlow/Allclean b/tutorials/multiphase/interIsoFoam/discInConstantFlow/Allclean
index 78449efd83..e2f275d9fd 100755
--- a/tutorials/multiphase/interIsoFoam/discInConstantFlow/Allclean
+++ b/tutorials/multiphase/interIsoFoam/discInConstantFlow/Allclean
@@ -1,8 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-cleanCase
-\rm -rf 0
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/discInConstantFlow/Allrun b/tutorials/multiphase/interIsoFoam/discInConstantFlow/Allrun
index 47d57eb4f7..4abdc78d00 100755
--- a/tutorials/multiphase/interIsoFoam/discInConstantFlow/Allrun
+++ b/tutorials/multiphase/interIsoFoam/discInConstantFlow/Allrun
@@ -1,7 +1,6 @@
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+#!/bin/sh
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -9,3 +8,5 @@ runApplication blockMesh
 runApplication setAlphaField
 
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/discInReversedVortexFlow/Allclean b/tutorials/multiphase/interIsoFoam/discInReversedVortexFlow/Allclean
index c11c218347..e2f275d9fd 100755
--- a/tutorials/multiphase/interIsoFoam/discInReversedVortexFlow/Allclean
+++ b/tutorials/multiphase/interIsoFoam/discInReversedVortexFlow/Allclean
@@ -1,7 +1,7 @@
-#!/bin/bash
+#!/bin/sh
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-cleanCase
-\rm -rf 0
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/discInReversedVortexFlow/Allrun b/tutorials/multiphase/interIsoFoam/discInReversedVortexFlow/Allrun
index 474424491f..7e395e7832 100755
--- a/tutorials/multiphase/interIsoFoam/discInReversedVortexFlow/Allrun
+++ b/tutorials/multiphase/interIsoFoam/discInReversedVortexFlow/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -15,3 +13,5 @@ runApplication -s 2 refineMesh -overwrite
 runApplication setAlphaField
 
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/notchedDiscInSolidBodyRotation/Allclean b/tutorials/multiphase/interIsoFoam/notchedDiscInSolidBodyRotation/Allclean
index 97f2707db8..e2f275d9fd 100755
--- a/tutorials/multiphase/interIsoFoam/notchedDiscInSolidBodyRotation/Allclean
+++ b/tutorials/multiphase/interIsoFoam/notchedDiscInSolidBodyRotation/Allclean
@@ -1,9 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-cleanCase
-
-\rm -rf 0
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/notchedDiscInSolidBodyRotation/Allrun b/tutorials/multiphase/interIsoFoam/notchedDiscInSolidBodyRotation/Allrun
index 317234a300..a919ed91c4 100755
--- a/tutorials/multiphase/interIsoFoam/notchedDiscInSolidBodyRotation/Allrun
+++ b/tutorials/multiphase/interIsoFoam/notchedDiscInSolidBodyRotation/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 application=$(getApplication)
 
@@ -17,3 +15,5 @@ runApplication setAlphaField
 runApplication setFields
 
 runApplication ${application}
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/sphereInReversedVortexFlow/Allclean b/tutorials/multiphase/interIsoFoam/sphereInReversedVortexFlow/Allclean
index c11c218347..e2f275d9fd 100755
--- a/tutorials/multiphase/interIsoFoam/sphereInReversedVortexFlow/Allclean
+++ b/tutorials/multiphase/interIsoFoam/sphereInReversedVortexFlow/Allclean
@@ -1,7 +1,7 @@
-#!/bin/bash
+#!/bin/sh
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-cleanCase
-\rm -rf 0
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/sphereInReversedVortexFlow/Allrun b/tutorials/multiphase/interIsoFoam/sphereInReversedVortexFlow/Allrun
index f21f9b5925..1767cd6b1b 100755
--- a/tutorials/multiphase/interIsoFoam/sphereInReversedVortexFlow/Allrun
+++ b/tutorials/multiphase/interIsoFoam/sphereInReversedVortexFlow/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -11,3 +9,5 @@ runApplication blockMesh
 runApplication setAlphaField
 runApplication decomposePar
 runParallel $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/standingWave/Allclean b/tutorials/multiphase/interIsoFoam/standingWave/Allclean
index 9738fda663..e2f275d9fd 100755
--- a/tutorials/multiphase/interIsoFoam/standingWave/Allclean
+++ b/tutorials/multiphase/interIsoFoam/standingWave/Allclean
@@ -1,9 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-cleanCase
-
-\rm -rf 0
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interIsoFoam/standingWave/Allrun b/tutorials/multiphase/interIsoFoam/standingWave/Allrun
index 3f7a4cb538..d00d2326e7 100755
--- a/tutorials/multiphase/interIsoFoam/standingWave/Allrun
+++ b/tutorials/multiphase/interIsoFoam/standingWave/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
@@ -15,3 +13,5 @@ runApplication -s 2 refineMesh -dict system/refineMeshDict2 -overwrite
 runApplication setAlphaField
 
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun
index b20c96d45a..48c2856ca1 100755
--- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun
+++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 cp 0/alpha.air.orig 0/alpha.air
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean
index af5bf72167..d31f20c24d 100755
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0 > /dev/null 2>&1
+cleanCase0
 
 # Remove surface
 rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
index 59aa02e753..b44aaf01a3 100755
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
index b9980dd726..b39d40fad9 100755
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
@@ -1,13 +1,10 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy propeller surface from resources directory
 \cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
 
-
 # - meshing
 
 runApplication blockMesh
@@ -18,7 +15,6 @@ runApplication renumberMesh -overwrite
 # force removal of fields generated by snappy
 rm -rf 0
 
-
 # - generate face/cell sets and zones
 
 #runApplication setSet -batch createInletOutletSets.setSet
@@ -28,11 +24,9 @@ runApplication topoSet -dict system/createInletOutletSets.topoSetDict
 
 runApplication createPatch -overwrite
 
-
 # - test by running moveDynamicMesh
 #runApplication moveDynamicMesh -checkAMI
 
-
 # - apply the initial fields
 
 restore0Dir
diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
index 05fe1e79a3..24df93fd3d 100755
--- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
+++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 # Remove surface
 rm -f constant/triSurface/bullet.stl.gz
diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun
index 4f35a71a26..dd1ff0aa95 100755
--- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun
+++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Copy bullet surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/bullet.stl.gz constant/triSurface/
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
index 6cfec647c7..efced0038e 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
index fb2c7cf7a7..125f3e96ba 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
index f1273de8e4..6aeae15553 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/makeMesh b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/makeMesh
index 4d667956a0..4065edb322 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/makeMesh
+++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/makeMesh
@@ -4,3 +4,5 @@ m4 < system/blockMeshDict.m4 > system/blockMeshDict
 blockMesh
 topoSet
 setsToZones -noFlipMap
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
index cf76c5c4a6..3d69efdb3a 100755
--- a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
+++ b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./makeMesh
 
diff --git a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/makeMesh b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/makeMesh
index bcb12c0e9a..fc56e7be3c 100755
--- a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/makeMesh
+++ b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/makeMesh
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 m4 < system/blockMeshDict.m4 > system/blockMeshDict
 
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
index 6cfec647c7..efced0038e 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
index fb2c7cf7a7..125f3e96ba 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allclean b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allclean
index e62451c67f..feb117fb22 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allclean
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 rm 0/alphas > /dev/null 2>&1
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
index f1273de8e4..6aeae15553 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/makeMesh b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/makeMesh
index 4d667956a0..4065edb322 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/makeMesh
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/makeMesh
@@ -4,3 +4,5 @@ m4 < system/blockMeshDict.m4 > system/blockMeshDict
 blockMesh
 topoSet
 setsToZones -noFlipMap
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBody/Allclean b/tutorials/multiphase/overInterDyMFoam/floatingBody/Allclean
index e3c5c15e9c..27381f42e7 100755
--- a/tutorials/multiphase/overInterDyMFoam/floatingBody/Allclean
+++ b/tutorials/multiphase/overInterDyMFoam/floatingBody/Allclean
@@ -1,10 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 (cd background && ./Allclean)
 (cd floatingBody && ./Allclean)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBody/Allrun b/tutorials/multiphase/overInterDyMFoam/floatingBody/Allrun
index 95ffcc4bf4..6699724457 100755
--- a/tutorials/multiphase/overInterDyMFoam/floatingBody/Allrun
+++ b/tutorials/multiphase/overInterDyMFoam/floatingBody/Allrun
@@ -1,10 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 ./Allrun.pre
 (cd background && runApplication $(getApplication))
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBody/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/floatingBody/Allrun.pre
index a69774179d..ef286ecbfa 100755
--- a/tutorials/multiphase/overInterDyMFoam/floatingBody/Allrun.pre
+++ b/tutorials/multiphase/overInterDyMFoam/floatingBody/Allrun.pre
@@ -1,8 +1,11 @@
 #!/bin/sh
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # mesh floating body
 (cd floatingBody && ./Allrun.pre)
 
 # Add background mesh
 (cd background  && ./Allrun.pre)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allclean b/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allclean
index e49ac35744..e2f275d9fd 100755
--- a/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allclean
+++ b/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allclean
@@ -1,9 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-cleanCase
-
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allrun.pre
index 31eb9edf99..9a44881018 100755
--- a/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allrun.pre
+++ b/tutorials/multiphase/overInterDyMFoam/floatingBody/background/Allrun.pre
@@ -1,6 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # Create background mesh
 runApplication blockMesh
diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBody/floatingBody/Allclean b/tutorials/multiphase/overInterDyMFoam/floatingBody/floatingBody/Allclean
index d16400a94f..e2f275d9fd 100755
--- a/tutorials/multiphase/overInterDyMFoam/floatingBody/floatingBody/Allclean
+++ b/tutorials/multiphase/overInterDyMFoam/floatingBody/floatingBody/Allclean
@@ -1,11 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cleanCase0
 
-rm -rf 0 > /dev/null 2>&1
-
-cleanCase
-
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/overInterDyMFoam/floatingBody/floatingBody/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/floatingBody/floatingBody/Allrun.pre
index 0a33b80dda..8142d7c389 100755
--- a/tutorials/multiphase/overInterDyMFoam/floatingBody/floatingBody/Allrun.pre
+++ b/tutorials/multiphase/overInterDyMFoam/floatingBody/floatingBody/Allrun.pre
@@ -1,11 +1,9 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
 runApplication subsetMesh -overwrite c0 -patch floatingObject
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean
index 5b17237826..496dfec3c1 100755
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 rm -rf poolHeight poolHeight_vs_time
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
index 7cdbc56f45..40555d56e1 100755
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/extractHeightData b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/extractHeightData
index b653b581b7..4f6979a83f 100755
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/extractHeightData
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/extractHeightData
@@ -1,2 +1,5 @@
 #!/bin/sh
+
 awk '{print $1 " " $3}' postProcessing/poolHeight/0/surfaceFieldValue.dat > poolHeight_vs_time
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean
index 5b17237826..496dfec3c1 100755
--- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean
+++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 rm -rf poolHeight poolHeight_vs_time
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
index 03b5ca3948..897dccd0bb 100755
--- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
+++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication topoSet
diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData
index b653b581b7..4f6979a83f 100755
--- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData
+++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData
@@ -1,2 +1,5 @@
 #!/bin/sh
+
 awk '{print $1 " " $3}' postProcessing/poolHeight/0/surfaceFieldValue.dat > poolHeight_vs_time
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
index f1273de8e4..6aeae15553 100755
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/makeMesh b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/makeMesh
index 4d667956a0..4065edb322 100755
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/makeMesh
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/makeMesh
@@ -4,3 +4,5 @@ m4 < system/blockMeshDict.m4 > system/blockMeshDict
 blockMesh
 topoSet
 setsToZones -noFlipMap
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allclean b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allclean
index 4d3ae417ce..ba5873a4ae 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allclean
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 cp ./system/controlDict.org ./system/controlDict
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
index 59d62c7881..001a60c8fd 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allclean b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allclean
index 4d3ae417ce..ba5873a4ae 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allclean
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 cp ./system/controlDict.org ./system/controlDict
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
index 59d62c7881..001a60c8fd 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
index f1273de8e4..6aeae15553 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/makeMesh b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/makeMesh
index 4d667956a0..4065edb322 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/makeMesh
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/makeMesh
@@ -4,3 +4,5 @@ m4 < system/blockMeshDict.m4 > system/blockMeshDict
 blockMesh
 topoSet
 setsToZones -noFlipMap
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
+++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
index 6cfec647c7..efced0038e 100755
--- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
+++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 restore0Dir
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
index f1273de8e4..6aeae15553 100755
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication ./makeMesh
 runApplication $(getApplication)
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/makeMesh b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/makeMesh
index 4d667956a0..4065edb322 100755
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/makeMesh
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/makeMesh
@@ -4,3 +4,5 @@ m4 < system/blockMeshDict.m4 > system/blockMeshDict
 blockMesh
 topoSet
 setsToZones -noFlipMap
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/Allclean b/tutorials/preProcessing/createZeroDirectory/cavity/Allclean
index 61edfb3032..e2f275d9fd 100755
--- a/tutorials/preProcessing/createZeroDirectory/cavity/Allclean
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/Allclean
@@ -1,10 +1,7 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/Allrun b/tutorials/preProcessing/createZeroDirectory/cavity/Allrun
index 909a10a372..51286c4dbd 100755
--- a/tutorials/preProcessing/createZeroDirectory/cavity/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication createZeroDirectory
diff --git a/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean b/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean
index 7ba7ddabb3..b52876b699 100755
--- a/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean
+++ b/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 # Remove surface and features
 \rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
diff --git a/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun b/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
index bec223b5de..9dce39c173 100755
--- a/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 # copy motorbike surface from resources folder
 cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
@@ -22,4 +20,4 @@ runParallel $(getApplication)
 runApplication reconstructParMesh -constant
 runApplication reconstructPar -latestTime
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
index c0d30ba4bf..b8032f8f34 100755
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
@@ -1,11 +1,8 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-cleanCase
-rm -rf 0
+cleanCase0
 
 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
@@ -17,4 +14,4 @@ rm -rf constant/heater/polyMesh
 rm -rf constant/leftSolid/polyMesh
 rm -rf constant/rightSolid/polyMesh
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
index 6b946fe298..15fab73b65 100755
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 rm -rf constant/polyMesh/sets
 
@@ -34,4 +32,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allclean b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allclean
index 6b45f82a41..be7ddb0688 100755
--- a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allclean
+++ b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allclean
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions  # Tutorial clean functions
 
 cleanCase
 
diff --git a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allrun b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allrun
index 9c5c0bb36e..e59dad068e 100755
--- a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allrun
+++ b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allrun
@@ -1,8 +1,6 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1                        # Run from this directory
+. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
 
 runApplication blockMesh
 runApplication $(getApplication)
-- 
GitLab