diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
index d9a4a4e7df1b705adc5ee70e9010ebd903346b4e..0590e8d09801cefdd24746db7bb24b3fc447110d 100644
--- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
+++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
@@ -209,16 +209,14 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
 
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-    writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
-    writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
+    os.writeEntryIfDifferent<word>("mu", "thermo:mu", muName_);
 
-    os.writeKeyword("accommodationCoeff")
-        << accommodationCoeff_ << token::END_STATEMENT << nl;
+    os.writeEntry("accommodationCoeff", accommodationCoeff_);
     Twall_.writeEntry("Twall", os);
-    os.writeKeyword("gamma")
-        << gamma_ << token::END_STATEMENT << nl;
+    os.writeEntry("gamma", gamma_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
index 7f19817660b49d8f1c1b4bf68e7f82a12419ef28..c79f8d5062d39b495c0f7a3213df7a772e03d40d 100644
--- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
+++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
@@ -200,18 +200,16 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
 void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "T", "T", TName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-    writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
-    writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
-    writeEntryIfDifferent<word>(os, "tauMC", "tauMC", tauMCName_);
-
-    os.writeKeyword("accommodationCoeff")
-        << accommodationCoeff_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("T", "T", TName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
+    os.writeEntryIfDifferent<word>("mu", "thermo:mu", muName_);
+    os.writeEntryIfDifferent<word>("tauMC", "tauMC", tauMCName_);
+
+    os.writeEntry("accommodationCoeff", accommodationCoeff_);
     Uwall_.writeEntry("Uwall", os);
-    os.writeKeyword("thermalCreep")
-        << thermalCreep_ << token::END_STATEMENT << nl;
-    os.writeKeyword("curvature") << curvature_ << token::END_STATEMENT << nl;
+    os.writeEntry("thermalCreep", thermalCreep_);
+    os.writeEntry("curvature", curvature_);
 
     refValue().writeEntry("refValue", os);
     valueFraction().writeEntry("valueFraction", os);
diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C
index 5eefe82ff5dedae1001c4f026b208a56e0b0293a..d71824052f514a7bdacb57af1ef5333f583f8b4b 100644
--- a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C
+++ b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C
@@ -117,8 +117,8 @@ void Foam::fixedRhoFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
 
-    writeEntryIfDifferent<word>(os, "p", "p", this->pName_);
-    writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
+    os.writeEntryIfDifferent<word>("p", "p", pName_);
+    os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
index 6872ae0321e74659359ee24d45561f5f01e04fca..9baa712b95831c26a8ad77b05619354cab69bac9 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
@@ -125,8 +125,7 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
 void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("thetaProperties")
-        << thetaProps_ << token::END_STATEMENT << nl;
+    os.writeEntry("thetaProperties", thetaProps_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
index a0d433f4e8b12a7bdbac428741e93de45973b4f4..d9c325a3ba3c124fa89d3fe0a298eb08de6e8468 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
@@ -125,8 +125,7 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
 void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("thetaProperties")
-        << thetaProps_ << token::END_STATEMENT << nl;
+    os.writeEntry("thetaProperties", thetaProps_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
index a0d433f4e8b12a7bdbac428741e93de45973b4f4..d9c325a3ba3c124fa89d3fe0a298eb08de6e8468 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
@@ -125,8 +125,7 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
 void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("thetaProperties")
-        << thetaProps_ << token::END_STATEMENT << nl;
+    os.writeEntry("thetaProperties", thetaProps_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
index b26ec2faa0829dbd7bca3f811d4572b489e6cee9..284992c64c9f0b0776efdac15b898f4bb2e1a5b2 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
@@ -125,8 +125,7 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
 void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("thetaProperties")
-        << thetaProps_ << token::END_STATEMENT << nl;
+    os.writeEntry("thetaProperties", thetaProps_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
index 2a4732fd97161a870d22226538f295232326a93a..464bbd01e4201e3519ed159398f3f24424012367 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
@@ -138,9 +138,9 @@ void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::write
 ) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl;
-    os.writeKeyword("fixedDmdt") << fixedDmdt_ << token::END_STATEMENT << nl;
-    os.writeKeyword("L") << L_ << token::END_STATEMENT << nl;
+    os.writeEntry("relax", relax_);
+    os.writeEntry("fixedDmdt", fixedDmdt_);
+    os.writeEntry("L", L_);
     dmdt_.writeEntry("dmdt", os);
     writeEntry("value", os);
 }
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
index 7b854df507f1549609a186eabb4369f8e43949d4..f6c4ca196e7a2cd981d41c1a16fb16836b522802 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
@@ -334,10 +334,10 @@ void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write
 ) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    os.writeEntry("Prt", Prt_);
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
     dmdt_.writeEntry("dmdt", os);
     writeEntry("value", os);
 }
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
index a1ac6c46f6590e1b5fd456272aad268b13a6b793..e10422c800f5618a73118578813ea19b115068fc 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
@@ -596,42 +596,36 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
 
-    os.writeKeyword("phaseType") << phaseTypeNames_[phaseType_]
-        << token::END_STATEMENT << nl;
+    os.writeEntry("phaseType", phaseTypeNames_[phaseType_]);
 
-    os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl;
+    os.writeEntry("relax", relax_);
 
     switch (phaseType_)
     {
         case vaporPhase:
         {
-            os.writeKeyword("partitioningModel") << nl;
-            os  << indent << token::BEGIN_BLOCK << incrIndent << nl;
+            os.beginBlock("partitioningModel");
             partitioningModel_->write(os);
-            os << decrIndent << indent << token::END_BLOCK << nl;
+            os.endBlock();
             break;
         }
         case liquidPhase:
         {
-            os.writeKeyword("partitioningModel") << nl;
-            os << indent << token::BEGIN_BLOCK << incrIndent << nl;
+            os.beginBlock("partitioningModel");
             partitioningModel_->write(os);
-            os << decrIndent << indent << token::END_BLOCK << nl;
+            os.endBlock();
 
-            os.writeKeyword("nucleationSiteModel") << nl;
-            os << indent << token::BEGIN_BLOCK << incrIndent << nl;
+            os.beginBlock("nucleationSiteModel");
             nucleationSiteModel_->write(os);
-            os << decrIndent << indent << token::END_BLOCK << nl;
+            os.endBlock();
 
-            os.writeKeyword("departureDiamModel") << nl;
-            os << indent << token::BEGIN_BLOCK << incrIndent << nl;
+            os.beginBlock("departureDiamModel");
             departureDiamModel_->write(os);
-            os << decrIndent << indent << token::END_BLOCK << nl;
+            os.endBlock();
 
-            os.writeKeyword("departureFreqModel") << nl;
-            os << indent << token::BEGIN_BLOCK << incrIndent << nl;
+            os.beginBlock("departureFreqModel");
             departureFreqModel_->write(os);
-            os << decrIndent << indent << token::END_BLOCK << nl;
+            os.endBlock();
 
             break;
         }
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C
index 63c85938cfdd90dafbc7e0eb13c01229d9e6542f..f9142de5cf0d2eae64a9dcee8179197ce3d59940 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C
@@ -109,8 +109,7 @@ void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs()
 void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("sourceField")
-        << sourceFieldName_ << token::END_STATEMENT << nl;
+    os.writeEntry("sourceField", sourceFieldName_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C
index c991a1a3336f7f2b030ef0150c3fa759c374a1a2..c84f323e741bb52745524efc5a907882977c9a09 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C
@@ -183,7 +183,7 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs()
 void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("relax") << relax_ << token::END_STATEMENT << nl;
+    os.writeEntry("relax", relax_);
     q_.writeEntry("q", os);
     writeEntry("value", os);
 }
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C
index 53fe0e2f15bfd5295b91ef4260d28c78fee2e9e7..c18a01cf0b038f31a35282f33c8d3929f6dab6cd 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C
@@ -114,7 +114,7 @@ void Foam::wallBoilingModels::departureDiameterModels::
 KocamustafaogullariIshii::write(Ostream& os) const
 {
     departureDiameterModel::write(os);
-    os.writeKeyword("phi") << phi_ << token::END_STATEMENT << nl;
+    os.writeEntry("phi", phi_);
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C
index 71ef4f03c735815d34c261da4e2af756eea66c8a..e2ec8ef829e418c3d013c38b463faeacdb290328 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C
@@ -90,9 +90,9 @@ void Foam::wallBoilingModels::departureDiameterModels::
 TolubinskiKostanchuk::write(Ostream& os) const
 {
     departureDiameterModel::write(os);
-    os.writeKeyword("dRef") << dRef_ << token::END_STATEMENT << nl;
-    os.writeKeyword("dMax") << dMax_ << token::END_STATEMENT << nl;
-    os.writeKeyword("dMin") << dMin_ << token::END_STATEMENT << nl;
+    os.writeEntry("dRef", dRef_);
+    os.writeEntry("dMax", dMax_);
+    os.writeEntry("dMin", dMin_);
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C
index 4c3564a006b85061cdc452b21879268cc3ce6faa..1c8c3dba40711a74811e21af15b252dcab077b60 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/departureDiameterModel.C
@@ -53,7 +53,7 @@ Foam::wallBoilingModels::departureDiameterModel::~departureDiameterModel()
 
 void Foam::wallBoilingModels::departureDiameterModel::write(Ostream& os) const
 {
-    os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", this->type());
 }
 
 // ************************************************************************* //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C
index e87e520096b49ac3cc18a225e266cb8a258f543b..e76f789cc60502d09c9a69be8dc6a1033840b3d5 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/departureFrequencyModel.C
@@ -53,7 +53,7 @@ Foam::wallBoilingModels::departureFrequencyModel::~departureFrequencyModel()
 
 void Foam::wallBoilingModels::departureFrequencyModel::write(Ostream& os) const
 {
-    os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", this->type());
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C
index fbf495a5e2f08020abbf32feefad6299737297ec..16c2112664c1cd151e9dd91c38d796f7271d19a1 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/nucleationSiteModel.C
@@ -53,7 +53,7 @@ Foam::wallBoilingModels::nucleationSiteModel::~nucleationSiteModel()
 
 void Foam::wallBoilingModels::nucleationSiteModel::write(Ostream& os) const
 {
-    os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", this->type());
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C
index 04b8c2917e2a050a9547afeedc6a8ef83627e99b..581a83a6d1b0dbcd9ea3054602c4e3deff2900e0 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C
@@ -88,7 +88,7 @@ void Foam::wallBoilingModels::partitioningModels::
 Lavieville::write(Ostream& os) const
 {
     partitioningModel::write(os);
-    os.writeKeyword("alphaCrit") << alphaCrit_ << token::END_STATEMENT << nl;
+    os.writeEntry("alphaCrit", alphaCrit_);
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C
index 1d157b67ab13eaba8b495ef04944d3887f264556..f9528677d4f41ec886e0ce6f88b596dc55195e84 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C
@@ -97,10 +97,8 @@ void Foam::wallBoilingModels::partitioningModels::
 cosine::write(Ostream& os) const
 {
     partitioningModel::write(os);
-    os.writeKeyword("alphaLiquid1") << alphaLiquid1_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("alphaLiquid0") << alphaLiquid0_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("alphaLiquid1", alphaLiquid1_);
+    os.writeEntry("alphaLiquid0", alphaLiquid0_);
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C
index dd1142b1372458d6ad934078bc752a71f7bf1d39..cc6d648f8492f4702421aa006ee634172d9a2240 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C
@@ -90,10 +90,8 @@ void Foam::wallBoilingModels::partitioningModels::
 linear::write(Ostream& os) const
 {
     partitioningModel::write(os);
-    os.writeKeyword("alphaLiquid1") << alphaLiquid1_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("alphaLiquid0") << alphaLiquid0_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("alphaLiquid1", alphaLiquid1_);
+    os.writeEntry("alphaLiquid0", alphaLiquid0_);
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C
index 7b68289d948b5f1221cf1b68e8f6bfcc6a3557af..cb12aca19087f130c3a6d99de5d509d152a970b3 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/partitioningModel.C
@@ -53,7 +53,7 @@ Foam::wallBoilingModels::partitioningModel::~partitioningModel()
 
 void Foam::wallBoilingModels::partitioningModel::write(Ostream& os) const
 {
-    os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", this->type());
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
index 651de2ea03fea1b267335c0b389aa548a4e61c3a..a64155e4a0c512e131de1f031da364a25f2d31c4 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
@@ -245,8 +245,7 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("specularityCoefficient")
-        << specularityCoefficient_ << token::END_STATEMENT << nl;
+    os.writeEntry("specularityCoefficient", specularityCoefficient_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
index 0fa9d5faf628a5fcdf9eefc3e2a98fa8248a3709..53431117d5584da10a78fca929c044d726a6bd60 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
@@ -289,10 +289,8 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("restitutionCoefficient")
-        << restitutionCoefficient_ << token::END_STATEMENT << nl;
-    os.writeKeyword("specularityCoefficient")
-        << specularityCoefficient_ << token::END_STATEMENT << nl;
+    os.writeEntry("restitutionCoefficient", restitutionCoefficient_);
+    os.writeEntry("specularityCoefficient", specularityCoefficient_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
index 651de2ea03fea1b267335c0b389aa548a4e61c3a..a64155e4a0c512e131de1f031da364a25f2d31c4 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
@@ -245,8 +245,7 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("specularityCoefficient")
-        << specularityCoefficient_ << token::END_STATEMENT << nl;
+    os.writeEntry("specularityCoefficient", specularityCoefficient_);
     writeEntry("value", os);
 }
 
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
index 0fa9d5faf628a5fcdf9eefc3e2a98fa8248a3709..53431117d5584da10a78fca929c044d726a6bd60 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
@@ -289,10 +289,8 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("restitutionCoefficient")
-        << restitutionCoefficient_ << token::END_STATEMENT << nl;
-    os.writeKeyword("specularityCoefficient")
-        << specularityCoefficient_ << token::END_STATEMENT << nl;
+    os.writeEntry("restitutionCoefficient", restitutionCoefficient_);
+    os.writeEntry("specularityCoefficient", specularityCoefficient_);
     writeEntry("value", os);
 }
 
diff --git a/etc/codeTemplates/BC/BC.C b/etc/codeTemplates/BC/BC.C
index 5e32969aa4c951fcdc23d99766c7ce3bbd0ac844..b0091f6900e4ea2ba2c2a36770d834a7729f56a9 100644
--- a/etc/codeTemplates/BC/BC.C
+++ b/etc/codeTemplates/BC/BC.C
@@ -220,11 +220,11 @@ void Foam::CLASS::write
 ) const
 {
     FVPATCHF::write(os);
-    os.writeKeyword("scalarData") << scalarData_ << token::END_STATEMENT << nl;
-    os.writeKeyword("data") << data_ << token::END_STATEMENT << nl;
+    os.writeEntry("scalarData", scalarData_);
+    os.writeEntry("data", data_);
     fieldData_.writeEntry("fieldData", os);
     timeVsData_->writeData(os);
-    os.writeKeyword("wordData") << wordData_ << token::END_STATEMENT << nl;
+    os.writeEntry("wordData", wordData_);
     this->writeEntry("value", os);
 }
 
diff --git a/src/OSspecific/POSIX/cpuInfo/cpuInfo.C b/src/OSspecific/POSIX/cpuInfo/cpuInfo.C
index 6dbd6abf4b26869af931987db27be86f23d1abac..e394ec7b22231f1158faaa9bcd4c1e3e4d3920a9 100644
--- a/src/OSspecific/POSIX/cpuInfo/cpuInfo.C
+++ b/src/OSspecific/POSIX/cpuInfo/cpuInfo.C
@@ -174,26 +174,12 @@ void Foam::cpuInfo::write(Ostream& os) const
     {
         os.writeEntry("model_name", model_name);
     }
-    if (cpu_family != -1)
-    {
-        os.writeEntry("cpu_family", cpu_family);
-    }
-    if (model != -1)
-    {
-        os.writeEntry("model", model);
-    }
-    if (cpu_MHz > 0)
-    {
-        os.writeEntry("cpu_MHz", cpu_MHz);
-    }
-    if (cpu_cores > 0)
-    {
-        os.writeEntry("cpu_cores", cpu_cores);
-    }
-    if (siblings > 0)
-    {
-        os.writeEntry("siblings", siblings);
-    }
+
+    os.writeEntryIfDifferent<int>("cpu_family", -1, cpu_family);
+    os.writeEntryIfDifferent<int>("model", -1, model);
+    os.writeEntryIfDifferent<float>("cpu_MHz", 0, cpu_MHz);
+    os.writeEntryIfDifferent<int>("cpu_cores", 0, cpu_cores);
+    os.writeEntryIfDifferent<int>("siblings", 0, siblings);
 }
 
 
diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
index bf0150cb244426f8863276f2ca6aa57c805b3b20..1c6d2131bc96b8ad95aac1bf1a643ae6a1284b6a 100644
--- a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
+++ b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
@@ -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) 2016 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2016-2017 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -211,6 +211,26 @@ public:
                 return endEntry();
             }
 
+            //- Write a keyword/value entry only when the two values differ.
+            //  \param key the name of the entry
+            //  \param value1 the reference value
+            //  \param value2 the value to write if it differs from value1
+            template<class T>
+            Ostream& writeEntryIfDifferent
+            (
+                const word& key,
+                const T& value1,
+                const T& value2
+            )
+            {
+                if (value1 != value2)
+                {
+                    writeEntry(key, value2);
+                }
+
+                return *this;
+            }
+
 
         // Stream state functions
 
diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C
index f6ca2a766c6e02a958545682b2fa1bccd38e7b6f..eaaf483064419e29eadf165f9032af90f44d9274 100644
--- a/src/OpenFOAM/fields/Fields/Field/Field.C
+++ b/src/OpenFOAM/fields/Fields/Field/Field.C
@@ -744,16 +744,15 @@ void Foam::Field<Type>::writeEntry(const word& keyword, Ostream& os) const
 
     if (uniform)
     {
-        os << "uniform " << this->operator[](0) << token::END_STATEMENT;
+        os << "uniform " << this->operator[](0);
     }
     else
     {
         os << "nonuniform ";
         List<Type>::writeEntry(os);
-        os << token::END_STATEMENT;
     }
 
-    os << endl;
+    os << token::END_STATEMENT << nl;
 }
 
 
diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C
index 94bf0ca6c887dcf1c7b95a2106576bde262e6368..9e722c6569a7806114fe3e9d11a15cf38c5e635b 100644
--- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C
+++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C
@@ -97,10 +97,8 @@ bool Foam::UniformDimensionedField<Type>::writeData(Ostream& os) const
 {
     scalar multiplier;
     os.writeKeyword("dimensions");
-    this->dimensions().write(os, multiplier) << token::END_STATEMENT
-        << nl;
-    os.writeKeyword("value") << this->value()/multiplier << token::END_STATEMENT
-        << nl << nl;
+    this->dimensions().write(os, multiplier) << token::END_STATEMENT << nl;
+    os.writeEntry("value", this->value()/multiplier) << nl;
 
     return os.good();
 }
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C
index 6f32877f6262703ab529ca3830571e2be7a4ef91..16969e8dc9b5a3579f1ef7809b96807ae1e08dc3 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C
@@ -270,8 +270,7 @@ Foam::codedFixedValuePointPatchField<Type>::redirectPatchField() const
         // Make sure to construct the patchfield with up-to-date value
 
         OStringStream os;
-        os.writeKeyword("type") << name_ << token::END_STATEMENT
-            << nl;
+        os.writeEntry("type", name_);
         static_cast<const Field<Type>&>(*this).writeEntry("value", os);
         IStringStream is(os.str());
         dictionary dict(is);
@@ -333,8 +332,7 @@ template<class Type>
 void Foam::codedFixedValuePointPatchField<Type>::write(Ostream& os) const
 {
     fixedValuePointPatchField<Type>::write(os);
-    os.writeKeyword("name") << name_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("name", name_);
 
     codedBase::writeCodeDict(os, dict_);
 }
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C
index cd99728ca504c604ed3e8f34293362c4429c8b4d..c5941fade46ec4693e6fed7156ba55526f5c8092 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C
@@ -100,8 +100,7 @@ template<class Type>
 void Foam::fixedNormalSlipPointPatchField<Type>::write(Ostream& os) const
 {
     slipPointPatchField<Type>::write(os);
-    os.writeKeyword("n")
-        << n_ << token::END_STATEMENT << nl;
+    os.writeEntry("n", n_);
 }
 
 
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C
index 2c98caa0e5cc105e311e4099b8a81eabc27ed4a2..b2016d79a3a7a8916a4ecce4926b634ca47ece8f 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C
@@ -113,29 +113,11 @@ const Foam::objectRegistry& Foam::pointPatchField<Type>::db() const
 template<class Type>
 void Foam::pointPatchField<Type>::write(Ostream& os) const
 {
-    os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
 
     if (patchType_.size())
     {
-        os.writeKeyword("patchType") << patchType_
-            << token::END_STATEMENT << nl;
-    }
-}
-
-
-template<class Type>
-template<class EntryType>
-void Foam::pointPatchField<Type>::writeEntryIfDifferent
-(
-    Ostream& os,
-    const word& entryName,
-    const EntryType& value1,
-    const EntryType& value2
-) const
-{
-    if (value1 != value2)
-    {
-        os.writeKeyword(entryName) << value2 << token::END_STATEMENT << nl;
+        os.writeEntry("patchType", patchType_);
     }
 }
 
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
index b4ac7f2dc8d425778cbbcfa24875c3dd82d98f7a..40129b82ec793accd28d993f28ba57b9de52bf5d 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
@@ -436,17 +436,6 @@ public:
             //- Write
             virtual void write(Ostream&) const;
 
-            //- Helper function to write the keyword and entry only if the
-            //  values are not equal. The value is then output as value2
-            template<class EntryType>
-            void writeEntryIfDifferent
-            (
-                Ostream& os,
-                const word& entryName,
-                const EntryType& value1,
-                const EntryType& value2
-            ) const;
-
 
     // Member operators
 
diff --git a/src/OpenFOAM/global/profiling/profilingInformation.C b/src/OpenFOAM/global/profiling/profilingInformation.C
index bc73478e51886b7bac062825933808c17e27753b..24957284e1d6a98de0f96b2ec0a00e18460abb44 100644
--- a/src/OpenFOAM/global/profiling/profilingInformation.C
+++ b/src/OpenFOAM/global/profiling/profilingInformation.C
@@ -128,18 +128,12 @@ Foam::Ostream& Foam::profilingInformation::write
     os.beginBlock(word("trigger" + Foam::name(id_)));
 
     os.writeEntry("id",             id_);
-    if (id_ != parent().id())
-    {
-        os.writeEntry("parentId",   parent().id());
-    }
+    os.writeEntryIfDifferent("parentId", id_, parent().id());
     os.writeEntry("description",    description());
     os.writeEntry("calls",          calls()     + (offset ? 1 : 0));
     os.writeEntry("totalTime",      totalTime() + elapsedTime);
     os.writeEntry("childTime",      childTime() + childTimes);
-    if (maxMem_)
-    {
-        os.writeEntry("maxMem",     maxMem_);
-    }
+    os.writeEntryIfDifferent<int>("maxMem", 0, maxMem_);
     os.writeEntry("onStack",        Switch(onStack()));
 
     os.endBlock();
diff --git a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C
index 32e76884b6180eb70ff11ab52afe8bc20805c84f..f317ae5f708c980ffa6cfa7d81cc98c6f9f8315d 100644
--- a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C
+++ b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C
@@ -354,19 +354,15 @@ void Foam::interpolationLookUpTable<Type>::write
 
     control.writeHeader(os);
 
-    os.writeKeyword("fields")
-        << entries_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("output")
-        << output_ << token::END_STATEMENT << nl;
+    os.writeEntry("fields", entries_);
+    os.writeEntry("output", output_);
 
     if (this->size() == 0)
     {
         FatalErrorInFunction
             << "table is empty" << nl << exit(FatalError);
     }
-    os.writeKeyword("values")
-        << *this << token::END_STATEMENT << nl;
+    os.writeEntry("values", *this);
 }
 
 
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
index 51adcb3381cab245be0b65761ed35bff86b6de65..bf972fda0a194104560d4263a19671480c76ead8 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
@@ -173,10 +173,8 @@ void Foam::csvTableReader<Type>::write(Ostream& os) const
 {
     tableReader<Type>::write(os);
 
-    os.writeKeyword("hasHeaderLine")
-        << headerLine_ << token::END_STATEMENT << nl;
-    os.writeKeyword("timeColumn")
-        << timeColumn_ << token::END_STATEMENT << nl;
+    os.writeEntry("hasHeaderLine", headerLine_);
+    os.writeEntry("timeColumn", timeColumn_);
 
     // Force writing labelList in ascii
     os.writeKeyword("valueColumns");
@@ -186,10 +184,13 @@ void Foam::csvTableReader<Type>::write(Ostream& os) const
         os  << componentColumns_;
         os.format(IOstream::BINARY);
     }
+    else
+    {
+        os << componentColumns_;
+    }
     os  << token::END_STATEMENT << nl;
 
-    os.writeKeyword("separator")
-        << string(separator_) << token::END_STATEMENT << nl;
+    os.writeEntry("separator", string(separator_));
 }
 
 
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
index b3d96d50b0b7864dd4ce2b10b30356b4dfbb1a00..b32b3bfdc1605838625d1b776ae823c8225beede 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
@@ -74,10 +74,7 @@ Foam::tableReader<Type>::~tableReader()
 template<class Type>
 void Foam::tableReader<Type>::write(Ostream& os) const
 {
-    if (this->type() != "openFoam")
-    {
-        os.writeEntry("readerType", this->type());
-    }
+    os.writeEntryIfDifferent<word>("readerType", "openFoam", this->type());
 }
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C
index 22a1e1b0f78eac1631b19d8594f39c8f513635cf..6421a4ee53eef0e3874deb510fe156ce62fd74e1 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C
@@ -126,10 +126,10 @@ const Foam::word& Foam::genericPolyPatch::actualType() const
 
 void Foam::genericPolyPatch::write(Ostream& os) const
 {
-    os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;
+    os.writeEntry("type", actualTypeName_);
     patchIdentifier::write(os);
-    os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl;
-    os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl;
+    os.writeEntry("nFaces", size());
+    os.writeEntry("startFace", start());
 
     forAllConstIter(dictionary, dict_, iter)
     {
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
index d83efd4fed7df88b83a4e5e363630a505745e1b7..6544881f4a2f01e49a581af998b70f93bae0a1ab 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
@@ -1447,24 +1447,20 @@ void Foam::cyclicPolyPatch::write(Ostream& os) const
     coupledPolyPatch::write(os);
     if (!neighbPatchName_.empty())
     {
-        os.writeKeyword("neighbourPatch") << neighbPatchName_
-            << token::END_STATEMENT << nl;
+        os.writeEntry("neighbourPatch", neighbPatchName_);
     }
     coupleGroup_.write(os);
     switch (transform())
     {
         case ROTATIONAL:
         {
-            os.writeKeyword("rotationAxis") << rotationAxis_
-                << token::END_STATEMENT << nl;
-            os.writeKeyword("rotationCentre") << rotationCentre_
-                << token::END_STATEMENT << nl;
+            os.writeEntry("rotationAxis", rotationAxis_);
+            os.writeEntry("rotationCentre", rotationCentre_);
             break;
         }
         case TRANSLATIONAL:
         {
-            os.writeKeyword("separationVector") << separationVector_
-                << token::END_STATEMENT << nl;
+            os.writeEntry("separationVector", separationVector_);
             break;
         }
         case NOORDERING:
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
index 7fdf0634754ceb3c1556e2f82ccad5217e122a32..5001f6e238febd9068df60cc54fe7398769eaf8c 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
@@ -1221,28 +1221,24 @@ bool Foam::oldCyclicPolyPatch::order
 void Foam::oldCyclicPolyPatch::write(Ostream& os) const
 {
     // Replacement of polyPatch::write to write 'cyclic' instead of type():
-    os.writeKeyword("type") << cyclicPolyPatch::typeName
-        << token::END_STATEMENT << nl;
+    os.writeEntry("type", cyclicPolyPatch::typeName);
     patchIdentifier::write(os);
-    os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl;
-    os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl;
+    os.writeEntry("nFaces", size());
+    os.writeEntry("startFace", start());
 
 
-    os.writeKeyword("featureCos") << featureCos_ << token::END_STATEMENT << nl;
+    os.writeEntry("featureCos", featureCos_);
     switch (transform())
     {
         case ROTATIONAL:
         {
-            os.writeKeyword("rotationAxis") << rotationAxis_
-                << token::END_STATEMENT << nl;
-            os.writeKeyword("rotationCentre") << rotationCentre_
-                << token::END_STATEMENT << nl;
+            os.writeEntry("rotationAxis", rotationAxis_);
+            os.writeEntry("rotationCentre", rotationCentre_);
             break;
         }
         case TRANSLATIONAL:
         {
-            os.writeKeyword("separationVector") << separationVector_
-                << token::END_STATEMENT << nl;
+            os.writeEntry("separationVector", separationVector_);
             break;
         }
         default:
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
index 0ad36956cbd49cf63816ed056a80264c27789372..9c27fada85100eb122c5e1955f55ce165dffab91 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
@@ -1112,10 +1112,8 @@ bool Foam::processorPolyPatch::order
 void Foam::processorPolyPatch::write(Ostream& os) const
 {
     coupledPolyPatch::write(os);
-    os.writeKeyword("myProcNo") << myProcNo_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("neighbProcNo") << neighbProcNo_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("myProcNo", myProcNo_);
+    os.writeEntry("neighbProcNo", neighbProcNo_);
 }
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C
index 02dcc6294add023ea3715877236fab29a8fb7527..9163b5c19c353d736f6864b170ce2051e363087c 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C
@@ -337,13 +337,8 @@ bool Foam::processorCyclicPolyPatch::order
 void Foam::processorCyclicPolyPatch::write(Ostream& os) const
 {
     processorPolyPatch::write(os);
-    os.writeKeyword("referPatch") << referPatchName_
-        << token::END_STATEMENT << nl;
-    if (tag_ != -1)
-    {
-        os.writeKeyword("tag") << tag_
-            << token::END_STATEMENT << nl;
-    }
+    os.writeEntry("referPatch", referPatchName_);
+    os.writeEntryIfDifferent<label>("tag", -1, tag_);
 }
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
index 1494fb273d5fe716d75d3fbb8da0c84dc78a0b33..d48d7e30caa155e175ce6991c8fac798e2cb2a23 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
@@ -374,10 +374,10 @@ void Foam::polyPatch::clearAddressing()
 
 void Foam::polyPatch::write(Ostream& os) const
 {
-    os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
     patchIdentifier::write(os);
-    os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl;
-    os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl;
+    os.writeEntry("nFaces", size());
+    os.writeEntry("startFace", start());
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C b/src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C
index db5779edda3a237f4971385e70fb3b6da068cc33..c952a6f6c84f46d2af4ed074439cb4b8ee066d20 100644
--- a/src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C
@@ -71,11 +71,13 @@ void Foam::Function1Types::Scale<Type>::writeData(Ostream& os) const
 {
     Function1<Type>::writeData(os);
     os  << token::END_STATEMENT << nl;
-    os  << indent << word(this->name() + "Coeffs") << nl;
-    os  << indent << token::BEGIN_BLOCK << incrIndent << nl;
+
+    os.beginBlock(word(this->name() + "Coeffs"));
+
     scale_->writeData(os);
     value_->writeData(os);
-    os  << decrIndent << indent << token::END_BLOCK << endl;
+
+    os.endBlock();
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C
index 0efcbcf146328978284a7c6d0fb466b8a40debe5..5a6e5104114f3b7fd61eca3672d2ab9f170172cc 100644
--- a/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C
@@ -345,18 +345,19 @@ Foam::tmp<Foam::Field<Type>> Foam::Function1Types::TableBase<Type>::y() const
 template<class Type>
 void Foam::Function1Types::TableBase<Type>::writeEntries(Ostream& os) const
 {
-    if (bounding_ != bounds::repeatableBounding::CLAMP)
-    {
-        os.writeEntry
-        (
-            "outOfBounds",
-            bounds::repeatableBoundingNames[bounding_]
-        );
-    }
-    if (interpolationScheme_ != "linear")
-    {
-        os.writeEntry("interpolationScheme", interpolationScheme_);
-    }
+    os.writeEntryIfDifferent<word>
+    (
+        "outOfBounds",
+        bounds::repeatableBoundingNames[bounds::repeatableBounding::CLAMP],
+        bounds::repeatableBoundingNames[bounding_]
+    );
+
+    os.writeEntryIfDifferent<word>
+    (
+        "interpolationScheme",
+        "linear",
+        interpolationScheme_
+    );
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C b/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C
index 40645aa1910708f1fdc6e363d793b5f631ae22ee..773a072f2ef794b5a6889a3fb6dd6f6ab3f660ea 100644
--- a/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C
+++ b/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C
@@ -58,11 +58,13 @@ void Foam::Function1Types::ramp::writeData(Ostream& os) const
 {
     Function1<scalar>::writeData(os);
     os  << token::END_STATEMENT << nl;
-    os  << indent << word(this->name() + "Coeffs") << nl;
-    os  << indent << token::BEGIN_BLOCK << incrIndent << nl;
-    os.writeKeyword("start") << start_ << token::END_STATEMENT << nl;
-    os.writeKeyword("duration") << duration_ << token::END_STATEMENT << nl;
-    os  << decrIndent << indent << token::END_BLOCK << endl;
+
+    os.beginBlock(word(this->name() + "Coeffs"));
+
+    os.writeEntry("start", start_);
+    os.writeEntry("duration", duration_);
+
+    os.endBlock();
 }
 
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
index 3819066c887c9af6469ab59c297f1f81e35c985f..6ba0630240d52dfb34c65dd7c57b1921b7468e25 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
@@ -161,7 +161,7 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
 void convectiveHeatTransferFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("L") << L_ << token::END_STATEMENT << nl;
+    os.writeEntry("L", L_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C
index 52de5b816bb2cb3258c9f67745f149714459033e..fefc7a9409c70b6a3be7239fd24e9b35075a9fab 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C
@@ -190,9 +190,8 @@ void Foam::lumpedMassWallTemperatureFvPatchScalarField::write
     mixedFvPatchScalarField::write(os);
     temperatureCoupledBase::write(os);
 
-    os.writeKeyword("Cp")<< Cp_ << token::END_STATEMENT << nl;
-    os.writeKeyword("mass")<< mass_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("Cp", Cp_);
+    os.writeEntry("mass", mass_);
 }
 
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C
index d495bdbb8cff642095ef58361e527c3124613439..3cf2ce56d610b7d1e03064af60440b52fe621275 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C
@@ -189,12 +189,11 @@ void Foam::outletMappedUniformInletHeatAdditionFvPatchField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("outletPatch")
-        << outletPatchName_ << token::END_STATEMENT << nl;
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    os.writeKeyword("Q") << Q_ << token::END_STATEMENT << nl;
-    os.writeKeyword("TMin") << TMin_ << token::END_STATEMENT << nl;
-    os.writeKeyword("TMax") << TMax_ << token::END_STATEMENT << nl;
+    os.writeEntry("outletPatch", outletPatchName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntry("Q", Q_);
+    os.writeEntry("TMin", TMin_);
+    os.writeEntry("TMax", TMax_);
 
     this->writeEntry("value", os);
 }
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
index 4221ad93de1d4b126d77672c84ba5fc0439b860f..00883665e82ff2c972af04498e7c2b5720562570 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
@@ -436,9 +436,8 @@ void thermalBaffle1DFvPatchScalarField<solidType>::write(Ostream& os) const
     }
 
     qrPrevious_.writeEntry("qrPrevious", os);
-    os.writeKeyword("qr")<< qrName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("relaxation")<< qrRelaxation_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("qr", qrName_);
+    os.writeEntry("relaxation", qrRelaxation_);
 }
 
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
index f870ed2abaffbee67bc0c42b19c6f0030dc9d228..eba0fea41f7c009885881996cdb11e42a901c72c 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
@@ -202,10 +202,9 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::
 write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("massFluxFraction") << massFluxFraction_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("phi", phiName_);
+    os.writeEntry("rho", rhoName_);
+    os.writeEntry("massFluxFraction", massFluxFraction_);
     this->writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
index 1548c37e626662a52942b1a24721e71ca63e4015..ff02c97357b3e0455dfdf58b319828d2232fc5d3 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
@@ -260,8 +260,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
 ) const
 {
     mixedFvPatchScalarField::write(os);
-    os.writeKeyword("Tnbr")<< TnbrName_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("Tnbr", TnbrName_);
     thicknessLayers_.writeEntry("thicknessLayers", os);
     kappaLayers_.writeEntry("kappaLayers", os);
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
index e232b8198f4f90a9969a5c983f0364e0b5151770..edcdabfa3b0e7f49f093e748399a9662afa9235b 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
@@ -343,12 +343,11 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::write
 ) const
 {
     mixedFvPatchScalarField::write(os);
-    os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
+    os.writeEntry("Tnbr", TnbrName_);
 
-    os.writeKeyword("qrNbr")<< qrNbrName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("qr")<< qrName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("thermalInertia")<< thermalInertia_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("qrNbr", qrNbrName_);
+    os.writeEntry("qr", qrName_);
+    os.writeEntry("thermalInertia", thermalInertia_);
 
     thicknessLayers_.writeEntry("thicknessLayers", os);
     kappaLayers_.writeEntry("kappaLayers", os);
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
index 3840262bd216952b22114930c419d1e271ba3a0e..4aee2a4da74125b558737215cb8ef39e867f958a 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
@@ -300,10 +300,10 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
 void alphatJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    os.writeEntry("Prt", Prt_);
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
index 127f58e9fa4a815f4a4e88bdf657d97ae364d02d..e8c910680d7a5f737b040875afd223a5875255d3 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
@@ -129,7 +129,7 @@ void alphatWallFunctionFvPatchScalarField::updateCoeffs()
 void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
+    os.writeEntry("Prt", Prt_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
index 8677d5f864272d6661a274f138894e73c1979652..c1cb91df3fede0bcc50dd46b7ab97decfe76c1f7 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
@@ -268,10 +268,10 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
 void alphatJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    os.writeEntry("Prt", Prt_);
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
index 1f95e729cd8c4cc721051e86adea38bfb975a14a..aabf2bab690b74bb3bc361e4813e4786ae960c85 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
@@ -154,18 +154,12 @@ tmp<scalarField> atmBoundaryLayer::epsilon(const vectorField& p) const
 void atmBoundaryLayer::write(Ostream& os) const
 {
     z0_.writeEntry("z0", os) ;
-    os.writeKeyword("flowDir")
-        << flowDir_ << token::END_STATEMENT << nl;
-    os.writeKeyword("zDir")
-        << zDir_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa")
-        << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Cmu")
-        << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Uref")
-        << Uref_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Zref")
-        << Zref_ << token::END_STATEMENT << nl;
+    os.writeEntry("flowDir", flowDir_);
+    os.writeEntry("zDir", zDir_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("Uref", Uref_);
+    os.writeEntry("Zref", Zref_);
     zGround_.writeEntry("zGround", os) ;
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
index cd362bfd3b5b7a4b5771a1698b96a52979168221..5da68948f99cacfbb6fc34adc991051006492f70 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
@@ -159,10 +159,9 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("mixingLength")
-        << mixingLength_ << token::END_STATEMENT << nl;
-    os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
+    os.writeEntry("mixingLength", mixingLength_);
+    os.writeEntry("phi", this->phiName_);
+    os.writeEntry("k", kName_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
index 548c7db73882fa1271fa86936a221746f33bb18c..7107217c85856155994b9062273bab62a8741b1f 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
@@ -155,10 +155,9 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("mixingLength")
-        << mixingLength_ << token::END_STATEMENT << nl;
-    os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
+    os.writeEntry("mixingLength", mixingLength_);
+    os.writeEntry("phi", this->phiName_);
+    os.writeEntry("k", kName_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
index 0a4ae1c7fee9900c0b3eb398909f84ed7cae5243..1f2caddd510bd6133aea23aa1417af4a43d03b7c 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
@@ -126,7 +126,7 @@ void Foam::fixedShearStressFvPatchVectorField::updateCoeffs()
 void Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("tau") << tau0_ << token::END_STATEMENT << nl;
+    os.writeEntry("tau", tau0_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C
index df4557580f5df950f250a55b2731d4e72c48050b..486581871a9de273f3f67b89897d4a648cf26e50 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C
@@ -190,13 +190,12 @@ void Foam::porousBafflePressureFvPatchField::updateCoeffs()
 void Foam::porousBafflePressureFvPatchField::write(Ostream& os) const
 {
     fixedJumpFvPatchField<scalar>::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     D_->writeData(os);
     I_->writeData(os);
-    os.writeKeyword("length") << length_ << token::END_STATEMENT << nl;
-    os.writeKeyword("uniformJump") << uniformJump_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("length", length_);
+    os.writeEntry("uniformJump", uniformJump_);
 }
 
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
index 1d8e807045cbf5f1851612a91b2a81458e6761fb..c3cf3c22a998f9f666288db450798d2517f720e5 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
@@ -57,9 +57,9 @@ void Foam::epsilonWallFunctionFvPatchScalarField::writeLocalEntries
     Ostream& os
 ) const
 {
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
 }
 
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C
index 862f7e647b64e0fbf3badf4b835dbeb655b3e4a3..967b4f4ef947158e5358681a110cc2a0f54a5c90 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C
@@ -55,9 +55,9 @@ void fWallFunctionFvPatchScalarField::checkType()
 
 void fWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
 {
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
 }
 
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C
index 11873820e05d08bd3e884fec76cfc4ac5710c2d8..36d171f861928ddcef6f7c773ac8e6419c3f4ce0 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C
@@ -233,10 +233,10 @@ void kLowReWallFunctionFvPatchScalarField::evaluate
 
 void kLowReWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Ceps2") << Ceps2_ << token::END_STATEMENT << nl;
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
+    os.writeEntry("Ceps2", Ceps2_);
     fixedValueFvPatchField<scalar>::write(os);
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
index 02844be1a8113a20dac6eea6d5a323eef83cd9a4..cef7574691dc16adb30954e6e86569336970649b 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
@@ -294,12 +294,9 @@ void nutURoughWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
     writeLocalEntries(os);
-    os.writeKeyword("roughnessHeight")
-        << roughnessHeight_ << token::END_STATEMENT << nl;
-    os.writeKeyword("roughnessConstant")
-        << roughnessConstant_ << token::END_STATEMENT << nl;
-    os.writeKeyword("roughnessFactor")
-        << roughnessFactor_ << token::END_STATEMENT << nl;
+    os.writeEntry("roughnessHeight", roughnessHeight_);
+    os.writeEntry("roughnessConstant", roughnessConstant_);
+    os.writeEntry("roughnessFactor", roughnessFactor_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
index ee322ce34bedce66055460df0e0d1696a7c04e19..b40581055c04747816fc5975b59aed65391d70a3 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
@@ -204,8 +204,7 @@ tmp<scalarField> nutUTabulatedWallFunctionFvPatchScalarField::yPlus() const
 void nutUTabulatedWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("uPlusTable") << uPlusTableName_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("uPlusTable", uPlusTableName_);
     writeEntry("value", os);
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
index 04c5d7674656750e862478114ffca6fa6f04486f..e2a8006ccf60d542ecaa5a4444fcfa643d3ccc13 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
@@ -57,9 +57,9 @@ void Foam::nutWallFunctionFvPatchScalarField::writeLocalEntries
     Ostream& os
 ) const
 {
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
 }
 
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
index 59145dc98818eea9d508b91158f59b6b1f525610..2bcc382090f3da8142350350b3787b1359e83be4 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
@@ -59,11 +59,11 @@ void omegaWallFunctionFvPatchScalarField::checkType()
 
 void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
 {
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
-    os.writeKeyword("beta1") << beta1_ << token::END_STATEMENT << nl;
-    os.writeKeyword("blended") << blended_ << token::END_STATEMENT << nl;
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
+    os.writeEntry("beta1", beta1_);
+    os.writeEntry("blended", blended_);
 }
 
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C
index e3704f287c53c66c968551eb0fae4422e2854e77..0546d6a6105ac2843109ff1af5de2aecd34ee6de 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C
@@ -55,9 +55,9 @@ void v2WallFunctionFvPatchScalarField::checkType()
 
 void v2WallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
 {
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("E", E_);
 }
 
 
diff --git a/src/dynamicMesh/attachDetach/attachDetach.C b/src/dynamicMesh/attachDetach/attachDetach.C
index 8ce76a11c35af6267c11b85249e283a0987bd53f..aa8f22f8437e3aeecef6d97ebfc209bf30b1fcbe 100644
--- a/src/dynamicMesh/attachDetach/attachDetach.C
+++ b/src/dynamicMesh/attachDetach/attachDetach.C
@@ -463,22 +463,18 @@ void Foam::attachDetach::write(Ostream& os) const
 
 void Foam::attachDetach::writeDict(Ostream& os) const
 {
-    os  << nl << name() << nl << token::BEGIN_BLOCK << nl
-        << "    type " << type()
-        << token::END_STATEMENT << nl
-        << "    faceZoneName " << faceZoneID_.name()
-        << token::END_STATEMENT << nl
-        << "    masterPatchName " << masterPatchID_.name()
-        << token::END_STATEMENT << nl
-        << "    slavePatchName " << slavePatchID_.name()
-        << token::END_STATEMENT << nl
-        << "    triggerTimes " << triggerTimes_
-        << token::END_STATEMENT << nl
-        << "    manualTrigger " << manualTrigger()
-        << token::END_STATEMENT << nl
-        << "    active " << active()
-        << token::END_STATEMENT << nl
-        << token::END_BLOCK << endl;
+    os  << nl;
+    os.beginBlock(name());
+
+    os.writeEntry("type", type());
+    os.writeEntry("faceZoneName", faceZoneID_.name());
+    os.writeEntry("masterPatchName", masterPatchID_.name());
+    os.writeEntry("slavePatchName", slavePatchID_.name());
+    os.writeEntry("triggerTimes", triggerTimes_);
+    os.writeEntry("manualTrigger", manualTrigger());
+    os.writeEntry("active", active());
+
+    os.endBlock();
 }
 
 
diff --git a/src/dynamicMesh/boundaryPatch/boundaryPatch.C b/src/dynamicMesh/boundaryPatch/boundaryPatch.C
index fe2f9796e4ce679facb71467d8e5d3d323225cd2..38c1d6b91eea399c7aa00b78d77dbc00e8f989ec 100644
--- a/src/dynamicMesh/boundaryPatch/boundaryPatch.C
+++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.C
@@ -90,8 +90,8 @@ Foam::boundaryPatch::~boundaryPatch()
 void Foam::boundaryPatch::write(Ostream& os) const
 {
     patchIdentifier::write(os);
-    os.writeKeyword("nFaces") << size_ << token::END_STATEMENT << nl;
-    os.writeKeyword("startFace") << start_ << token::END_STATEMENT << nl;
+    os.writeEntry("nFaces", size_);
+    os.writeEntry("startFace", start_);
 }
 
 
diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C
index 7f3b08d1e96314de40f7722e9296e922789e7246..86043002269e6a71521fa9f7ca7fc468a1c98073 100644
--- a/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C
+++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C
@@ -174,8 +174,8 @@ write(Ostream& os) const
     // Note: write value
     fixedValuePointPatchVectorField::write(os);
 
-    os.writeKeyword(solidBodyMotionFunction::typeName) << SBMFPtr_->type()
-        << token::END_STATEMENT << nl;
+    os.writeEntry(solidBodyMotionFunction::typeName, SBMFPtr_->type());
+
     os  << indent << word(SBMFPtr_->type() + "Coeffs");
     SBMFPtr_->writeData(os);
 }
diff --git a/src/dynamicMesh/perfectInterface/perfectInterface.C b/src/dynamicMesh/perfectInterface/perfectInterface.C
index 5aa0b5ed99313218c7d3a873ae85588d8bfa4342..1b2475dc47915f5c8e52f3ce875927c94ea5e5cb 100644
--- a/src/dynamicMesh/perfectInterface/perfectInterface.C
+++ b/src/dynamicMesh/perfectInterface/perfectInterface.C
@@ -506,34 +506,16 @@ void Foam::perfectInterface::write(Ostream& os) const
 
 void Foam::perfectInterface::writeDict(Ostream& os) const
 {
-    os  << nl << name() << nl << token::BEGIN_BLOCK << nl
-
-        << "    type " << type()
-        << token::END_STATEMENT << nl
-
-        << "    active " << active()
-        << token::END_STATEMENT << nl
-
-        << "    faceZoneName " << faceZoneID_.name()
-        << token::END_STATEMENT << nl
-
-        << "    masterPatchName " << masterPatchID_.name()
-        << token::END_STATEMENT << nl
-
-        << "    slavePatchName " << slavePatchID_.name()
-        << token::END_STATEMENT << nl
-
-        << token::END_BLOCK << endl;
+    os  << nl;
+
+    os.beginBlock(name());
+    os.writeEntry("type", type());
+    os.writeEntry("active", active());
+    os.writeEntry("faceZoneName", faceZoneID_.name());
+    os.writeEntry("masterPatchName", masterPatchID_.name());
+    os.writeEntry("slavePatchName", slavePatchID_.name());
+    os.endBlock();
 }
 
 
-// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
-
-
 // ************************************************************************* //
diff --git a/src/dynamicMesh/setUpdater/setUpdater.C b/src/dynamicMesh/setUpdater/setUpdater.C
index c121af2a8465a4fde13d68b90cdafca20651e9bc..f7c4f8edc16633880ee894e3c7315b5a7207cde0 100644
--- a/src/dynamicMesh/setUpdater/setUpdater.C
+++ b/src/dynamicMesh/setUpdater/setUpdater.C
@@ -45,14 +45,8 @@ namespace Foam
     );
 }
 
-
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
-
-
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from dictionary
 Foam::setUpdater::setUpdater
 (
     const word& name,
@@ -111,22 +105,13 @@ void Foam::setUpdater::write(Ostream& os) const
 
 void Foam::setUpdater::writeDict(Ostream& os) const
 {
-    os  << nl << name() << nl << token::BEGIN_BLOCK << nl
-        << "    type " << type()
-        << token::END_STATEMENT << nl
-        << "    active " << active()
-        << token::END_STATEMENT << nl
-        << token::END_BLOCK << endl;
-}
-
+    os  << nl;
 
-// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
+    os.beginBlock(name());
+    os.writeEntry("type", type());
+    os.writeEntry("active", active());
+    os.endBlock();
+}
 
 
 // ************************************************************************* //
diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C
index 7048a5713aba786c0e9c42fdb31664e3e02c283f..84caf4901b33b8e7d7ca45b6fdfd15d06f881863 100644
--- a/src/dynamicMesh/slidingInterface/slidingInterface.C
+++ b/src/dynamicMesh/slidingInterface/slidingInterface.C
@@ -765,30 +765,22 @@ void Foam::slidingInterface::write(Ostream& os) const
 
 void Foam::slidingInterface::writeDict(Ostream& os) const
 {
-    os  << nl << name() << nl << token::BEGIN_BLOCK << nl
-        << "    type " << type() << token::END_STATEMENT << nl
-        << "    masterFaceZoneName " << masterFaceZoneID_.name()
-        << token::END_STATEMENT << nl
-        << "    slaveFaceZoneName " << slaveFaceZoneID_.name()
-        << token::END_STATEMENT << nl
-        << "    cutPointZoneName " << cutPointZoneID_.name()
-        << token::END_STATEMENT << nl
-        << "    cutFaceZoneName " << cutFaceZoneID_.name()
-        << token::END_STATEMENT << nl
-        << "    masterPatchName " << masterPatchID_.name()
-        << token::END_STATEMENT << nl
-        << "    slavePatchName " << slavePatchID_.name()
-        << token::END_STATEMENT << nl
-        << "    typeOfMatch " << typeOfMatchNames_[matchType_]
-        << token::END_STATEMENT << nl
-        << "    coupleDecouple " << coupleDecouple_
-        << token::END_STATEMENT << nl
-        << "    projection " << intersection::algorithmNames_[projectionAlgo_]
-        << token::END_STATEMENT << nl
-        << "    attached " << attached_
-        << token::END_STATEMENT << nl
-        << "    active " << active()
-        << token::END_STATEMENT << nl;
+    os  << nl;
+
+    os.beginBlock(name());
+
+    os.writeEntry("type", type());
+    os.writeEntry("masterFaceZoneName", masterFaceZoneID_.name());
+    os.writeEntry("slaveFaceZoneName", slaveFaceZoneID_.name());
+    os.writeEntry("cutPointZoneName", cutPointZoneID_.name());
+    os.writeEntry("cutFaceZoneName", cutFaceZoneID_.name());
+    os.writeEntry("masterPatchName", masterPatchID_.name());
+    os.writeEntry("slavePatchName", slavePatchID_.name());
+    os.writeEntry("typeOfMatch", typeOfMatchNames_[matchType_]);
+    os.writeEntry("coupleDecouple", coupleDecouple_);
+    os.writeEntry("projection", intersection::algorithmNames_[projectionAlgo_]);
+    os.writeEntry("attached", attached_);
+    os.writeEntry("active", active());
 
     if (attached_)
     {
@@ -797,10 +789,8 @@ void Foam::slidingInterface::writeDict(Ostream& os) const
         masterStickOutFacesPtr_->writeEntry("masterStickOutFaces", os);
         slaveStickOutFacesPtr_->writeEntry("slaveStickOutFaces", os);
 
-         os << "    retiredPointMap " << retiredPointMap()
-            << token::END_STATEMENT << nl
-            << "    cutPointEdgePairMap " << cutPointEdgePairMap()
-            << token::END_STATEMENT << nl;
+        os.writeEntry("retiredPointMap", retiredPointMap());
+        os.writeEntry("cutPointEdgePairMap", cutPointEdgePairMap());
     }
 
     WRITE_NON_DEFAULT(pointMergeTol)
@@ -812,7 +802,7 @@ void Foam::slidingInterface::writeDict(Ostream& os) const
     WRITE_NON_DEFAULT(edgeCoPlanarTol)
     WRITE_NON_DEFAULT(edgeEndCutoffTol)
 
-    os  << token::END_BLOCK << endl;
+    os.endBlock();
 }
 
 
diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C
index b1f64847c586cf1c038cea5b1f40ff248f93e6ac..541b9b0d29c942fd9edd5efe7bb603e633c6c749 100644
--- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C
+++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C
@@ -571,21 +571,20 @@ void Foam::MRFZone::correctBoundaryVelocity(volVectorField& U) const
 void Foam::MRFZone::writeData(Ostream& os) const
 {
     os  << nl;
-    os.write(name_) << nl;
-    os  << token::BEGIN_BLOCK << incrIndent << nl;
-    os.writeKeyword("active") << active_ << token::END_STATEMENT << nl;
-    os.writeKeyword("cellZone") << cellZoneName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl;
-    os.writeKeyword("axis") << axis_ << token::END_STATEMENT << nl;
+    os.beginBlock(name_);
+
+    os.writeEntry("active", active_);
+    os.writeEntry("cellZone", cellZoneName_);
+    os.writeEntry("origin", origin_);
+    os.writeEntry("axis", axis_);
     omega_->writeData(os);
 
     if (excludedPatchNames_.size())
     {
-        os.writeKeyword("nonRotatingPatches") << excludedPatchNames_
-            << token::END_STATEMENT << nl;
+        os.writeEntry("nonRotatingPatches", excludedPatchNames_);
     }
 
-    os  << decrIndent << token::END_BLOCK << nl;
+    os.endBlock();
 }
 
 
diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C
index 6749dfb74943d093e4f5139472ad698033e2c4e5..8f33573a0ff575783210dd243bc824299f11b3ef 100644
--- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C
@@ -158,9 +158,9 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::updateCoeffs()
 void Foam::SRFFreestreamVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("relative") << relative_ << token::END_STATEMENT << nl;
-    os.writeKeyword("UInf") << UInf_ << token::END_STATEMENT << nl;
-    os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
+    os.writeEntry("relative", relative_);
+    os.writeEntry("UInf", UInf_);
+    os.writeEntry("phi", this->phiName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C
index ba3a0457269c5797892d14affd7577550d78ecf9..590c53900881f88f67452070457575cf34fc4caf 100644
--- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C
@@ -153,7 +153,7 @@ void Foam::SRFVelocityFvPatchVectorField::updateCoeffs()
 void Foam::SRFVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("relative") << relative_ << token::END_STATEMENT << nl;
+    os.writeEntry("relative", relative_);
     inletValue_.writeEntry("inletValue", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOptionIO.C b/src/finiteVolume/cfdTools/general/fvOptions/fvOptionIO.C
index 88730167b863aa358ce6d30ffa98ce916759c8e8..36a87ffec4241b788b52f7c126a5e5ac59d51771 100644
--- a/src/finiteVolume/cfdTools/general/fvOptions/fvOptionIO.C
+++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOptionIO.C
@@ -29,24 +29,23 @@ License
 
 void Foam::fv::option::writeHeader(Ostream& os) const
 {
-    os  << indent << name_ << nl
-        << indent << token::BEGIN_BLOCK << incrIndent << nl;
+    os.beginBlock(name_);
 }
 
 
 void Foam::fv::option::writeFooter(Ostream& os) const
 {
-    os  << decrIndent << indent << token::END_BLOCK << endl;
+    os.endBlock();
 }
 
 
 void Foam::fv::option::writeData(Ostream& os) const
 {
-    os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
-    os.writeKeyword("active") << active_ << token::END_STATEMENT << nl << nl;
+    os.writeEntry("type", type());
+    os.writeEntry("active", active_);
 
-    os << indent << word(type() + "Coeffs");
-    coeffs_.write(os);
+    os << nl;
+    coeffs_.writeEntry(word(type() + "Coeffs"), os);
 }
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
index 18213659c7674dc484d1e76d8b8ce46ce74b7297..4761e61da7e4cfc2fb1e07fde2a96f39661b5005 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
@@ -292,18 +292,12 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
 void Foam::activeBaffleVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "p", "p", pName_);
-    os.writeKeyword("cyclicPatch")
-        << cyclicPatchName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("orientation")
-        << orientation_ << token::END_STATEMENT << nl;
-    os.writeKeyword("openingTime")
-        << openingTime_ << token::END_STATEMENT << nl;
-    os.writeKeyword("maxOpenFractionDelta")
-        << maxOpenFractionDelta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("openFraction")
-        << openFraction_ << token::END_STATEMENT << nl;
-    writeEntryIfDifferent<word>(os, "p", "p", pName_);
+    os.writeEntryIfDifferent<word>("p", "p", pName_);
+    os.writeEntry("cyclicPatch", cyclicPatchName_);
+    os.writeEntry("orientation", orientation_);
+    os.writeEntry("openingTime", openingTime_);
+    os.writeEntry("maxOpenFractionDelta", maxOpenFractionDelta_);
+    os.writeEntry("openFraction", openFraction_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
index 438d135ff8d4b05cb0ba94934da7e35648b9e91f..a0f66f5739cc4e53c2d3b473d3b35e35a0789d30 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
@@ -377,21 +377,14 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::
 write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "p", "p", pName_);
-    os.writeKeyword("cyclicPatch")
-        << cyclicPatchName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("openingTime")
-        << openingTime_ << token::END_STATEMENT << nl;
-    os.writeKeyword("maxOpenFractionDelta")
-        << maxOpenFractionDelta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("openFraction")
-        << openFraction_ << token::END_STATEMENT << nl;
-    os.writeKeyword("minThresholdValue")
-        << minThresholdValue_ << token::END_STATEMENT << nl;
-    os.writeKeyword("forceBased")
-        << fBased_ << token::END_STATEMENT << nl;
-    os.writeKeyword("opening")
-        << opening_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("p", "p", pName_);
+    os.writeEntry("cyclicPatch", cyclicPatchName_);
+    os.writeEntry("openingTime", openingTime_);
+    os.writeEntry("maxOpenFractionDelta", maxOpenFractionDelta_);
+    os.writeEntry("openFraction", openFraction_);
+    os.writeEntry("minThresholdValue", minThresholdValue_);
+    os.writeEntry("forceBased", fBased_);
+    os.writeEntry("opening", opening_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C
index aa86f9936c0bb92797752f68210d346b13565276..fe7567c9afea1901b2dd6dbfeb02daa8893a6df3 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C
@@ -339,13 +339,13 @@ void Foam::advectiveFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
 
-    this->template writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    this->template writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
 
     if (lInf_ > 0)
     {
-        os.writeKeyword("fieldInf") << fieldInf_ << token::END_STATEMENT << nl;
-        os.writeKeyword("lInf") << lInf_ << token::END_STATEMENT << nl;
+        os.writeEntry("fieldInf", fieldInf_);
+        os.writeEntry("lInf", lInf_);
     }
 
     this->writeEntry("value", os);
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C
index 12ab03384797bdb48fb766cd0b669508674121f0..2081404eac35b45cd95332e2268ac1488e570c88 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C
@@ -268,8 +268,7 @@ Foam::codedFixedValueFvPatchField<Type>::redirectPatchField() const
         // Make sure to construct the patchfield with up-to-date value
 
         OStringStream os;
-        os.writeKeyword("type") << name_ << token::END_STATEMENT
-            << nl;
+        os.writeEntry("type", name_);
         static_cast<const Field<Type>&>(*this).writeEntry("value", os);
         IStringStream is(os.str());
         dictionary dict(is);
@@ -331,8 +330,7 @@ template<class Type>
 void Foam::codedFixedValueFvPatchField<Type>::write(Ostream& os) const
 {
     fixedValueFvPatchField<Type>::write(os);
-    os.writeKeyword("name") << name_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("name", name_);
 
     codedBase::writeCodeDict(os, dict_);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.C
index 0dd3600e585be67f93b1b8883df2381758598290..6bbdb3c5a47a696773496e056b0b77e72d351756 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.C
@@ -343,8 +343,7 @@ template<class Type>
 void Foam::codedMixedFvPatchField<Type>::write(Ostream& os) const
 {
     mixedFvPatchField<Type>::write(os);
-    os.writeKeyword("name") << name_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("name", name_);
 
     codedBase::writeCodeDict(os, dict_);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C
index d6223500e0d3d8a3d890fc7c83cf34f1f32c8dd8..31a67024a518c0203657eece4eca3ce002decea1 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C
@@ -147,8 +147,8 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::updateCoeffs()
 void Foam::cylindricalInletVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchField<vector>::write(os);
-    os.writeKeyword("centre") << centre_ << token::END_STATEMENT << nl;
-    os.writeKeyword("axis") << axis_ << token::END_STATEMENT << nl;
+    os.writeEntry("centre", centre_);
+    os.writeEntry("axis", axis_);
     axialVelocity_->writeData(os);
     radialVelocity_->writeData(os);
     rpm_->writeData(os);
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C
index e22d979213da147e8dcc874cf3ce2182d4003394..6e11699890657c5fd4b008c20758a9ff3a352cab 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C
@@ -132,12 +132,9 @@ template<class Type>
 void Foam::fanFvPatchField<Type>::write(Ostream& os) const
 {
     uniformJumpFvPatchField<Type>::write(os);
-    this->template writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    this->template writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-    this->template writeEntryIfDifferent<bool>
-    (
-        os, "uniformJump", false, uniformJump_
-    );
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<bool>("uniformJump", false, uniformJump_);
 }
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C
index 52764fc6a3d6a8fcc4abad4507bc80b3cb0754b9..726084c732a4f38670f6b320c40d1a214051b636 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C
@@ -155,8 +155,7 @@ template<class Type>
 void Foam::fixedJumpFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    os.writeKeyword("patchType") << this->interfaceFieldType()
-        << token::END_STATEMENT << nl;
+    os.writeEntry("patchType", this->interfaceFieldType());
 
     if (this->cyclicPatch().owner())
     {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C
index 2229069a14dac4f0bcc98710c8cf9e05b91f0353..d043e573c310d1064f5d47713283e456d6e4f298 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C
@@ -169,8 +169,7 @@ template<class Type>
 void Foam::fixedJumpAMIFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    os.writeKeyword("patchType") << this->interfaceFieldType()
-        << token::END_STATEMENT << nl;
+    os.writeEntry("patchType", this->interfaceFieldType());
 
     if (this->cyclicAMIPatch().owner())
     {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C
index e2c2669d2e0987d2aece1c2b67e7b5385029b776..1155c5d022f8ebb9be4be3ed8c7c04c3327f0d66 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C
@@ -181,13 +181,13 @@ void Foam::fixedNormalInletOutletVelocityFvPatchVectorField::write
 const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    os.writeKeyword("fixTangentialInflow")
-        << fixTangentialInflow_ << token::END_STATEMENT << nl;
-    os.writeKeyword("normalVelocity")
-        << nl << indent << token::BEGIN_BLOCK << nl << incrIndent;
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntry("fixTangentialInflow", fixTangentialInflow_);
+
+    os.beginBlock("normalVelocity");
     normalVelocity_->write(os);
-    os << decrIndent << indent << token::END_BLOCK << endl;
+    os.endBlock();
+
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C
index 6190926fc8c4f279eda9c839d0cbecfadbfe6a84..cc1b0f4ff93e58158e795c386419b8772d5a6b77 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C
@@ -128,7 +128,7 @@ void Foam::fixedPressureCompressibleDensityFvPatchScalarField::write
 ) const
 {
     fvPatchField<scalar>::write(os);
-    writeEntryIfDifferent<word>(os, "p", "p", pName_);
+    os.writeEntryIfDifferent<word>("p", "p", pName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C
index be52334338351d2a6153861a75064c6d6ea45d6f..1deba5890f7824ffbf344ede020aa7aa93829e1c 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C
@@ -158,8 +158,8 @@ void Foam::fixedProfileFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     profile_->writeData(os);
-    os.writeKeyword("direction") << dir_ << token::END_STATEMENT << nl;
-    os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl;
+    os.writeEntry("direction", dir_);
+    os.writeEntry("origin", origin_);
     this->writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C
index 2f14a7d2152fcb7da68947dacf37c594e8b59533..f40f399ad344ba7f9d8394a7c5ff4f418edf20bf 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C
@@ -243,11 +243,10 @@ void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const
     flowRate_->writeData(os);
     if (!volumetric_)
     {
-        writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-        writeEntryIfDifferent<scalar>(os, "rhoInlet", -VGREAT, rhoInlet_);
+        os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+        os.writeEntryIfDifferent<scalar>("rhoInlet", -VGREAT, rhoInlet_);
     }
-    os.writeKeyword("extrapolateProfile")
-        << extrapolateProfile_ << token::END_STATEMENT << nl;
+    os.writeEntry("extrapolateProfile", extrapolateProfile_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C
index cd06d7689534bbec33c908f1fbd695ad543f9b48..ed9d095a2a1353753201fcd6f14a5fc48fff57a9 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C
@@ -228,8 +228,8 @@ void Foam::flowRateOutletVelocityFvPatchVectorField::write(Ostream& os) const
     flowRate_->writeData(os);
     if (!volumetric_)
     {
-        writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-        writeEntryIfDifferent<scalar>(os, "rhoOutlet", -VGREAT, rhoOutlet_);
+        os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+        os.writeEntryIfDifferent<scalar>("rhoOutlet", -VGREAT, rhoOutlet_);
     }
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C
index 10124ec9f83717ee7fc1eb96b17ba28ffe144921..217b6734604f901d8fe6bb5bfbd51d5bf869a850 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C
@@ -138,8 +138,8 @@ void Foam::fluxCorrectedVelocityFvPatchVectorField::evaluate
 void Foam::fluxCorrectedVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C
index 49ae3f5b27a484b0fa0fa1c31c417c9eac748639..eac0fe4feb00f4c75aaa6654d522658cf5fd8ebf 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C
@@ -108,11 +108,7 @@ template<class Type>
 void Foam::freestreamFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    if (this->phiName_ != "phi")
-    {
-        os.writeKeyword("phi")
-            << this->phiName_ << token::END_STATEMENT << nl;
-    }
+    os.writeEntryIfDifferent<word>("phi", "phi", this->phiName_);
     freestreamValue().writeEntry("freestreamValue", os);
     this->writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C
index 1c8787e5e46fcdb860ecc6cbe0eedb772f65c551..1986bc40d68796e043fad7391894a2ad6b785af0 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C
@@ -156,9 +156,9 @@ void Foam::freestreamPressureFvPatchScalarField::updateCoeffs()
 void Foam::freestreamPressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C
index 49aa47efad401031a068edfee69fe4ef4cda2272..59654abb923cc240e96ba864735465459c2eb89b 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C
@@ -138,10 +138,7 @@ template<class Type>
 void Foam::inletOutletFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    if (phiName_ != "phi")
-    {
-        os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
-    }
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
     this->refValue().writeEntry("inletValue", os);
     this->writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C
index 5735ee62229af812716d1e8023c2b7ee5a7a748a..679cb1205525898ba1752a224f0419fb0b34dda1 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C
@@ -189,10 +189,10 @@ void Foam::inletOutletTotalTemperatureFvPatchScalarField::write(Ostream& os)
 const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", this->phiName_);
-    writeEntryIfDifferent<word>(os, "psi", "psi", psiName_);
-    os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", this->phiName_);
+    os.writeEntryIfDifferent<word>("psi", "psi", psiName_);
+    os.writeEntry("gamma", gamma_);
     T0_.writeEntry("T0", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C
index 00f2a8307efe7c840f6d3e24ba64f982b36cb7a3..057be9e92133489d89872115ba6796bb4acec5dc 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C
@@ -143,7 +143,7 @@ void Foam::interstitialInletVelocityFvPatchVectorField::updateCoeffs()
 void Foam::interstitialInletVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchField<vector>::write(os);
-    writeEntryIfDifferent<word>(os, "alpha", "alpha", alphaName_);
+    os.writeEntryIfDifferent<word>("alpha", "alpha", alphaName_);
     inletVelocity_.writeEntry("inletVelocity", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C
index 52072044ccfcde88cfb8a564df28fe5804a88cdc..11349a08ca668c2339a0deb0c9b09fc20763dec4 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C
@@ -314,11 +314,10 @@ tmp<Field<Type>> mappedPatchFieldBase<Type>::mappedField() const
 template<class Type>
 void mappedPatchFieldBase<Type>::write(Ostream& os) const
 {
-    os.writeKeyword("field") << fieldName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("setAverage") << setAverage_ << token::END_STATEMENT << nl;
-    os.writeKeyword("average") << average_ << token::END_STATEMENT << nl;
-    os.writeKeyword("interpolationScheme") << interpolationScheme_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("field", fieldName_);
+    os.writeEntry("setAverage", setAverage_);
+    os.writeEntry("average", average_);
+    os.writeEntry("interpolationScheme", interpolationScheme_);
 }
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.C
index 81cce9b1b52d078b1bb6ab5ca59755d1c5d106f2..27d67c67974276b165371bacb806f0882eb6fbaa 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.C
@@ -186,9 +186,9 @@ void Foam::mappedFlowRateFvPatchVectorField::write
 ) const
 {
     fvPatchField<vector>::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-    os.writeKeyword("nbrPhi") << nbrPhiName_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+    os.writeEntry("nbrPhi", nbrPhiName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C
index 89c0c11bf7c77707ee6a916ba4883882d0fe6734..e35b556c480f9a7a352409f9d8a6b714e357eb9b 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C
@@ -233,7 +233,7 @@ void Foam::mappedVelocityFluxFixedValueFvPatchField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
     this->writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C
index 4ea359ee5b2470d47534aea006a3c24b4c32d866..30987e05dbbae32a5bd1cf229809b1abd5d2f3ff 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C
@@ -244,13 +244,11 @@ void Foam::matchedFlowRateOutletVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchField<vector>::write(os);
-    os.writeKeyword("inletPatch")
-        << inletPatchName_ << token::END_STATEMENT << nl;
+    os.writeEntry("inletPatch", inletPatchName_);
     if (!volumetric_)
     {
-        os.writeKeyword("volumetric")
-            << volumetric_ << token::END_STATEMENT << nl;
-        writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+        os.writeEntry("volumetric", volumetric_);
+        os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     }
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C
index 408b40686b5f37355d89758430236140061440f0..80b94c5383927102582cf02989109e194173fd55 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C
@@ -138,10 +138,7 @@ template<class Type>
 void Foam::outletInletFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    if (phiName_ != "phi")
-    {
-        os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
-    }
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
     this->refValue().writeEntry("outletValue", os);
     this->writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C
index 6cb337ff099a438be3b8cb4dacc22cea4890dc3c..5490a8a930fd1ce54c08f5a8e966113ebaafcf28 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C
@@ -168,12 +168,8 @@ template<class Type>
 void Foam::outletMappedUniformInletFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    os.writeKeyword("outletPatch")
-        << outletPatchName_ << token::END_STATEMENT << nl;
-    if (phiName_ != "phi")
-    {
-        os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
-    }
+    os.writeEntry("outletPatch", outletPatchName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
     this->writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C
index f92a4bf136d2798445bb5c8ca86dc20c962279cf..b1fef5b04bee093d7b21d4fb165e14c07479e532 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C
@@ -167,10 +167,8 @@ void Foam::outletPhaseMeanVelocityFvPatchVectorField::write
 {
     fvPatchField<vector>::write(os);
 
-    os.writeKeyword("Umean") << Umean_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("alpha") << alphaName_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("Umean", Umean_);
+    os.writeEntry("alpha", alphaName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C
index 0dd82e8c443e61471ba4c15bb0b738a7a3f5891f..a585876bd4acaedae62d54c90f40cf5aa534d13e 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C
@@ -163,14 +163,10 @@ void Foam::phaseHydrostaticPressureFvPatchScalarField::updateCoeffs()
 void Foam::phaseHydrostaticPressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    if (phaseFraction_ != "alpha")
-    {
-        os.writeKeyword("phaseFraction")
-            << phaseFraction_ << token::END_STATEMENT << nl;
-    }
-    os.writeKeyword("rho") << rho_ << token::END_STATEMENT << nl;
-    os.writeKeyword("pRefValue") << pRefValue_ << token::END_STATEMENT << nl;
-    os.writeKeyword("pRefPoint") << pRefPoint_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("phaseFraction", "alpha", phaseFraction_);
+    os.writeEntry("rho", rho_);
+    os.writeEntry("pRefValue", pRefValue_);
+    os.writeEntry("pRefPoint", pRefPoint_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C
index f1dbf71611c96a0137b9f403206d8a40eb499947..8464d32d0d5c3aa7e5e8f6a0311922cdeafc5e7c 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C
@@ -300,32 +300,22 @@ void Foam::plenumPressureFvPatchScalarField::updateCoeffs()
 void Foam::plenumPressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("gamma") << gamma_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("R") << R_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("supplyMassFlowRate") << supplyMassFlowRate_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("supplyTotalTemperature") << supplyTotalTemperature_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("plenumVolume") << plenumVolume_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("plenumDensity") << plenumDensity_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("plenumTemperature") << plenumTemperature_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("gamma", gamma_);
+    os.writeEntry("R", R_);
+    os.writeEntry("supplyMassFlowRate", supplyMassFlowRate_);
+    os.writeEntry("supplyTotalTemperature", supplyTotalTemperature_);
+    os.writeEntry("plenumVolume", plenumVolume_);
+    os.writeEntry("plenumDensity", plenumDensity_);
+    os.writeEntry("plenumTemperature", plenumTemperature_);
     if (hasRho_)
     {
-        os.writeKeyword("rho") << rho_
-            << token::END_STATEMENT << nl;
+        os.writeEntry("rho", rho_);
     }
-    os.writeKeyword("inletAreaRatio") << inletAreaRatio_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("inletDischargeCoefficient") << inletDischargeCoefficient_
-        << token::END_STATEMENT << nl;
-    writeEntryIfDifferent<scalar>(os, "timeScale", 0.0, timeScale_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
+    os.writeEntry("inletAreaRatio", inletAreaRatio_);
+    os.writeEntry("inletDischargeCoefficient", inletDischargeCoefficient_);
+    os.writeEntryIfDifferent<scalar>("timeScale", 0.0, timeScale_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C
index c472c754eb8a7d3bb8da5c0bf8ddddf4b10e124d..d7b72b17bab0f73b6c7df482ca17688075c19ba4 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C
@@ -190,8 +190,8 @@ void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     inletDir_.writeEntry("inletDirection", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.C
index 9ab1bc87ef46b0eb0f47bef14b843be094c7dec3..2d42d60d52228bbaf04a3bc4a059001265c49fea 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.C
@@ -178,8 +178,8 @@ void Foam::pressureDirectedInletVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     inletDir_.writeEntry("inletDirection", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C
index 84abe77c3f09feaed58c2b5a2b1b7ea771b30ecb..2ddaa235cf79c849f76ec3237bfe00d609713093 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C
@@ -164,8 +164,8 @@ void Foam::pressureInletOutletParSlipVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C
index 32f8aa2cfb2b2aa47c228b2e94f561d7fbf0214e..84aab726fad829c24924362df5d0d70a99dd9489 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C
@@ -188,7 +188,7 @@ void Foam::pressureInletOutletVelocityFvPatchVectorField::write
 const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
     if (tangentialVelocity_.size())
     {
         tangentialVelocity_.writeEntry("tangentialVelocity", os);
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C
index 06e58e73bb78dbfff02aba60cb19c03aabb6eb76..e1a24d4ba0f22fd0531e22b46a8474fae3cf5a37 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C
@@ -143,8 +143,8 @@ void Foam::pressureInletVelocityFvPatchVectorField::updateCoeffs()
 void Foam::pressureInletVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C
index 84689bf1e9667f0178899c9d8352293669e180c4..08b71bf468d61c648ff6d93094da807e35444e56 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C
@@ -160,8 +160,8 @@ void Foam::pressureNormalInletOutletVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
+    os.writeEntry("phi", phiName_);
+    os.writeEntry("rho", rhoName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C
index 9b5e347fbd20ab75f8ccf01673f037b193ae8657..68c6e78cb36a5ea22b5d5dcab2acde79e0d1dccd 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C
@@ -365,20 +365,17 @@ void Foam::pressurePIDControlInletVelocityFvPatchVectorField::write
 {
     fvPatchField<vector>::write(os);
 
-    os.writeKeyword("deltaP") << deltaP_ << token::END_STATEMENT << nl;
-    os.writeKeyword("upstream") << upstreamName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("downstream")
-        << downstreamName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("shapeFactor") << shapeFactor_
-        << token::END_STATEMENT << nl;
-    writeEntryIfDifferent<word>(os, "p", "p", pName_);
-    writeEntryIfDifferent<word>(os, "rho", "none", rhoName_);
-    os.writeKeyword("P") << P_ << token::END_STATEMENT << nl;
-    os.writeKeyword("I") << I_ << token::END_STATEMENT << nl;
-    os.writeKeyword("D") << D_ << token::END_STATEMENT << nl;
-    os.writeKeyword("error") << error_ << token::END_STATEMENT << nl;
-    os.writeKeyword("errorIntegral")
-        << errorIntegral_ << token::END_STATEMENT << nl;
+    os.writeEntry("deltaP", deltaP_);
+    os.writeEntry("upstream", upstreamName_);
+    os.writeEntry("downstream", downstreamName_);
+    os.writeEntry("shapeFactor", shapeFactor_);
+    os.writeEntryIfDifferent<word>("p", "p", pName_);
+    os.writeEntryIfDifferent<word>("rho", "none", rhoName_);
+    os.writeEntry("P", P_);
+    os.writeEntry("I", I_);
+    os.writeEntry("D", D_);
+    os.writeEntry("error", error_);
+    os.writeEntry("errorIntegral", errorIntegral_);
 
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C
index c266d27f856511810bc0b20177bf43b7055622a5..e365010fa15553229372941cbf314185b7c2ceb5 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C
@@ -171,7 +171,7 @@ void Foam::prghPressureFvPatchScalarField::updateCoeffs()
 void Foam::prghPressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     p_.writeEntry("p", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C
index e1705e24bcd632d2a04dfe560f3286bb1c5937a3..9558a893ee55516d8b88e99d85412101e6771ca5 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C
@@ -146,10 +146,10 @@ void Foam::prghTotalHydrostaticPressureFvPatchScalarField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-    writeEntryIfDifferent<word>(os, "ph_rgh", "ph_rgh", ph_rghName_);
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("ph_rgh", "ph_rgh", ph_rghName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C
index 9a4f9b1572154d9fb9fa7e80ef7248934c7f3930..feeed4843338a534350fb50064d8ba1053bdd1ee 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C
@@ -191,9 +191,9 @@ void Foam::prghTotalPressureFvPatchScalarField::updateCoeffs()
 void Foam::prghTotalPressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     p0_.writeEntry("p0", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C
index 4f22a43edadc54d70adeb8a72fe52e7ced45829a..edaca467e2ee6e39d14f237185f718f3ab53de0e 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C
@@ -128,7 +128,7 @@ void Foam::rotatingPressureInletOutletVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("phi") << phiName() << token::END_STATEMENT << nl;
+    os.writeEntry("phi", phiName());
     omega_->writeData(os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.C
index ebc32b0790c26fb0e32d714dce7e41d9557a949e..d322862f4a6bb647b2fa3c01044d5be716c01a40 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.C
@@ -145,8 +145,8 @@ void Foam::rotatingWallVelocityFvPatchVectorField::updateCoeffs()
 void Foam::rotatingWallVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl;
-    os.writeKeyword("axis") << axis_ << token::END_STATEMENT << nl;
+    os.writeEntry("origin", origin_);
+    os.writeEntry("axis", axis_);
     omega_->writeData(os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C
index ddfb7c790c2b34507706267ba4f5a935d7fdbd51..39c06df42c944290f1fa16836bb6e77038ccf47e 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C
@@ -297,13 +297,13 @@ void Foam::supersonicFreestreamFvPatchVectorField::updateCoeffs()
 void Foam::supersonicFreestreamFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "T", "T", TName_);
-    writeEntryIfDifferent<word>(os, "p", "p", pName_);
-    writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
-    os.writeKeyword("UInf") << UInf_ << token::END_STATEMENT << nl;
-    os.writeKeyword("pInf") << pInf_ << token::END_STATEMENT << nl;
-    os.writeKeyword("TInf") << TInf_ << token::END_STATEMENT << nl;
-    os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("T", "T", TName_);
+    os.writeEntryIfDifferent<word>("p", "p", pName_);
+    os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
+    os.writeEntry("UInf", UInf_);
+    os.writeEntry("pInf", pInf_);
+    os.writeEntry("TInf", TInf_);
+    os.writeEntry("gamma", gamma_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C
index 861bac7f9b1eea04cfe793ab8dfc4f6536c0c5f3..44ddaa37ddb00018cc247c5b72cf465be8c80379 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C
@@ -199,10 +199,10 @@ void Foam::swirlFlowRateInletVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchField<vector>::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-    os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl;
-    os.writeKeyword("axis") << axis_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+    os.writeEntry("origin", origin_);
+    os.writeEntry("axis", axis_);
     flowRate_->writeData(os);
     rpm_->writeData(os);
     writeEntry("value", os);
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlInletVelocity/swirlInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlInletVelocity/swirlInletVelocityFvPatchVectorField.C
index 79ee1cb2c96a30aa951e8437bbed88ab4324dc54..4b76142d9f68069b6564969c4375e5e021d5d3c6 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/swirlInletVelocity/swirlInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlInletVelocity/swirlInletVelocityFvPatchVectorField.C
@@ -145,8 +145,8 @@ void Foam::swirlInletVelocityFvPatchVectorField::updateCoeffs()
 void Foam::swirlInletVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchField<vector>::write(os);
-    os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl;
-    os.writeKeyword("axis") << axis_ << token::END_STATEMENT << nl;
+    os.writeEntry("origin", origin_);
+    os.writeEntry("axis", axis_);
     axialVelocity_->writeData(os);
     radialVelocity_->writeData(os);
     tangentialVelocity_->writeData(os);
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C
index c33db45ca26ec2d5a6d958b7903f0ff46c9588f3..a086f891608c453b8daaa7bb178894219ae95a9e 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C
@@ -233,17 +233,17 @@ void Foam::syringePressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
 
-    os.writeKeyword("Ap") << Ap_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Sp") << Sp_ << token::END_STATEMENT << nl;
-    os.writeKeyword("VsI") << VsI_ << token::END_STATEMENT << nl;
-    os.writeKeyword("tas") << tas_ << token::END_STATEMENT << nl;
-    os.writeKeyword("tae") << tae_ << token::END_STATEMENT << nl;
-    os.writeKeyword("tds") << tds_ << token::END_STATEMENT << nl;
-    os.writeKeyword("tde") << tde_ << token::END_STATEMENT << nl;
-    os.writeKeyword("psI") << psI_ << token::END_STATEMENT << nl;
-    os.writeKeyword("psi") << psi_ << token::END_STATEMENT << nl;
-    os.writeKeyword("ams") << ams_ << token::END_STATEMENT << nl;
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
+    os.writeEntry("Ap", Ap_);
+    os.writeEntry("Sp", Sp_);
+    os.writeEntry("VsI", VsI_);
+    os.writeEntry("tas", tas_);
+    os.writeEntry("tae", tae_);
+    os.writeEntry("tds", tds_);
+    os.writeEntry("tde", tde_);
+    os.writeEntry("psI", psI_);
+    os.writeEntry("psi", psi_);
+    os.writeEntry("ams", ams_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
 
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C
index 5ba985a24e248f1771e28de3527077a7ed1f3b6a..af626c2c5e4642414009513abed8e5188e73ccf8 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C
@@ -568,23 +568,20 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::write
 {
     fvPatchField<Type>::write(os);
 
-    this->writeEntryIfDifferent(os, "setAverage", Switch(false), setAverage_);
+    os.writeEntryIfDifferent("setAverage", Switch(false), setAverage_);
+    os.writeEntryIfDifferent<scalar>("perturb", 1e-5, perturb_);
 
-    this->writeEntryIfDifferent(os, "perturb", scalar(1e-5), perturb_);
-
-    this->writeEntryIfDifferent
+    os.writeEntryIfDifferent
     (
-        os,
         "fieldTable",
         this->internalField().name(),
         fieldTableName_
     );
 
-    this->writeEntryIfDifferent
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "mapMethod",
-        word("planarInterpolation"),
+        "planarInterpolation",
         mapMethod_
     );
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C
index de94aeeffe3ebabd7169b03ba23f9d6c157097d6..65461cc9c49d88f450bfd3efcc65bd632a4dc6df 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C
@@ -243,11 +243,11 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs()
 void Foam::totalPressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("psi") << psiName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntry("rho", rhoName_);
+    os.writeEntry("psi", psiName_);
+    os.writeEntry("gamma", gamma_);
     p0_.writeEntry("p0", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C
index df7d20629c5293f9bc3e2d1874d2f9e53c2d5a24..771ebb53d84ae49d3ed65ccdfcad86fa77de40e0 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C
@@ -177,10 +177,10 @@ void Foam::totalTemperatureFvPatchScalarField::updateCoeffs()
 void Foam::totalTemperatureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
-    os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
+    os.writeEntry("gamma", gamma_);
     T0_.writeEntry("T0", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
index 5d1bce06740e9ce5d804114e818d346865360b75..5dda836639265c5ba1e7d734e089921cc7440495 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
@@ -1103,12 +1103,12 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchField<vector>::write(os);
     writeEntry("value", os);
-    os.writeKeyword("delta") << delta_ << token::END_STATEMENT << nl;
-    writeEntryIfDifferent<scalar>(os, "d", 1.0, d_);
-    writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
-    writeEntryIfDifferent<scalar>(os, "perturb", 1e-5, perturb_);
-    writeEntryIfDifferent<label>(os, "nCellPerEddy", 5, nCellPerEddy_);
-    writeEntryIfDifferent(os, "writeEddies", false, writeEddies_);
+    os.writeEntry("delta", delta_);
+    os.writeEntryIfDifferent<scalar>("d", 1.0, d_);
+    os.writeEntryIfDifferent<scalar>("kappa", 0.41, kappa_);
+    os.writeEntryIfDifferent<scalar>("perturb", 1e-5, perturb_);
+    os.writeEntryIfDifferent<label>("nCellPerEddy", 5, nCellPerEddy_);
+    os.writeEntryIfDifferent("writeEddies", false, writeEddies_);
 
     if (!interpolateR_)
     {
@@ -1125,14 +1125,14 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::write(Ostream& os) const
         U_.writeEntry("U", os);
     }
 
-    if
-    (
-       !mapMethod_.empty()
-     && mapMethod_ != "planarInterpolation"
-    )
+    if (!mapMethod_.empty())
     {
-        os.writeKeyword("mapMethod") << mapMethod_
-            << token::END_STATEMENT << nl;
+        os.writeEntryIfDifferent<word>
+        (
+            "mapMethod",
+            "planarInterpolation",
+            mapMethod_
+        );
     }
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
index b457ecd85a3f52700e0f9f7fc413b11e94304f83..57032e53c0ffa83f55d333615171c4a406d5cb71 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
@@ -196,10 +196,9 @@ template<class Type>
 void Foam::turbulentInletFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    os.writeKeyword("fluctuationScale")
-        << fluctuationScale_ << token::END_STATEMENT << nl;
+    os.writeEntry("fluctuationScale", fluctuationScale_);
     referenceField_.writeEntry("referenceField", os);
-    os.writeKeyword("alpha") << alpha_ << token::END_STATEMENT << nl;
+    os.writeEntry("alpha", alpha_);
     this->writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C
index 20369fe63c32bfc79dd285968dfd47e7660de338..14ec2d187ffbcafa15010df3ab0c21017d6e6d30 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C
@@ -149,9 +149,9 @@ void Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("intensity") << intensity_ << token::END_STATEMENT << nl;
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", this->phiName_);
+    os.writeEntry("intensity", intensity_);
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", this->phiName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C
index ba14325c6a35d7094923ef2a625d2dac5b90052f..fb6367a51a6271bb4f5aca3d1566dc4b9f704bdd 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C
@@ -144,9 +144,9 @@ void Foam::uniformDensityHydrostaticPressureFvPatchScalarField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    os.writeKeyword("rho") << rho_ << token::END_STATEMENT << nl;
-    os.writeKeyword("pRefValue") << pRefValue_ << token::END_STATEMENT << nl;
-    os.writeKeyword("pRefPoint") << pRefPoint_ << token::END_STATEMENT << nl;
+    os.writeEntry("rho", rho_);
+    os.writeEntry("pRefValue", pRefValue_);
+    os.writeEntry("pRefPoint", pRefPoint_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C
index 011b8552fd4af420da97a6d802a825014885fbc0..647398f4b054836e001c3e5b0158807e3739aa02 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C
@@ -160,10 +160,7 @@ template<class Type>
 void Foam::uniformInletOutletFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    if (phiName_ != "phi")
-    {
-        os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
-    }
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
     this->uniformInletValue_->writeData(os);
     this->writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C
index 152a74937c78f0be4dfc07867433614cdf281f7c..ea3c1705c6cf6e668d4494d3d857af0b21028f48 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C
@@ -227,11 +227,11 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs()
 void Foam::uniformTotalPressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("psi") << psiName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntry("rho", rhoName_);
+    os.writeEntry("psi", psiName_);
+    os.writeEntry("gamma", gamma_);
     p0_->writeData(os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C
index 341d6134325855d7cc9fbadbcd9fa55e716f9e14..9f9f89865ace32006432c115171e0f25bc63c875 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C
@@ -173,12 +173,9 @@ void Foam::variableHeightFlowRateFvPatchScalarField::updateCoeffs()
 void Foam::variableHeightFlowRateFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    if (phiName_ != "phi")
-    {
-        os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
-    }
-    os.writeKeyword("lowerBound") << lowerBound_ << token::END_STATEMENT << nl;
-    os.writeKeyword("upperBound") << upperBound_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntry("lowerBound", lowerBound_);
+    os.writeEntry("upperBound", upperBound_);
     this->writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C
index f0f3802339ca9f9ac960cf8f5efc2a7fc8349ceb..40a7ce65d96c5284a1bef6cdc92ba6697d148c23 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C
@@ -133,7 +133,7 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::write
 {
     fvPatchField<vector>::write(os);
     flowRate_->writeData(os);
-    os.writeKeyword("alpha") << alphaName_ << token::END_STATEMENT << nl;
+    os.writeEntry("alpha", alphaName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C
index 4d986bd2914c237eade76b3b03bb05ced71e82b6..440c1e285955b9dad2f7bb24c74888ef8311feb5 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C
@@ -229,9 +229,9 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs()
 void Foam::waveSurfacePressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "zeta", "zeta", zetaName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("zeta", "zeta", zetaName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C
index eb80ace5c9cff330bc758cbe18a1bdb622c3b725..863ede5a13577fdd58617c12d52faa7ae6b71c97 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C
@@ -139,21 +139,16 @@ void Foam::waveTransmissiveFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
 
-    this->template
-        writeEntryIfDifferent<word>(os, "phi", "phi", this->phiName_);
-    this->template
-        writeEntryIfDifferent<word>(os, "rho", "rho", this->rhoName_);
-    this->template
-        writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", this->phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", this->rhoName_);
+    os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
 
-    os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
+    os.writeEntry("gamma", gamma_);
 
     if (this->lInf_ > SMALL)
     {
-        os.writeKeyword("fieldInf") << this->fieldInf_
-            << token::END_STATEMENT << nl;
-        os.writeKeyword("lInf") << this->lInf_
-            << token::END_STATEMENT << nl;
+        os.writeEntry("fieldInf", this->fieldInf_);
+        os.writeEntry("lInf", this->lInf_);
     }
 
     this->writeEntry("value", os);
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
index 52bd26e80950583cc398602c9ef9a797ac66df56..764a266517e963d1e5d34ae7cf4b82a6097ea361 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
@@ -362,29 +362,11 @@ void Foam::fvPatchField<Type>::manipulateMatrix
 template<class Type>
 void Foam::fvPatchField<Type>::write(Ostream& os) const
 {
-    os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
 
     if (patchType_.size())
     {
-        os.writeKeyword("patchType") << patchType_
-            << token::END_STATEMENT << nl;
-    }
-}
-
-
-template<class Type>
-template<class EntryType>
-void Foam::fvPatchField<Type>::writeEntryIfDifferent
-(
-    Ostream& os,
-    const word& entryName,
-    const EntryType& value1,
-    const EntryType& value2
-) const
-{
-    if (value1 != value2)
-    {
-        os.writeKeyword(entryName) << value2 << token::END_STATEMENT << nl;
+        os.writeEntry("patchType", patchType_);
     }
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
index da0953aeba9b018dbc643c7d59a1d0860725fc03..71d4a8ffd6fb915e0d0950dce3e719c5ddba8cf2 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
@@ -530,17 +530,6 @@ public:
             //- Write
             virtual void write(Ostream&) const;
 
-            //- Helper function to write the keyword and entry only if the
-            //  values are not equal. The value is then output as value2
-            template<class EntryType>
-            void writeEntryIfDifferent
-            (
-                Ostream& os,
-                const word& entryName,
-                const EntryType& value1,
-                const EntryType& value2
-            ) const;
-
 
         // Check
 
diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C
index 8a8c96244c34cd17bd23011729a7a3153eb74d63..61db751a5493bdee64a9dadcffa7ac728ac46795 100644
--- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C
@@ -166,7 +166,7 @@ void Foam::fvsPatchField<Type>::rmap
 template<class Type>
 void Foam::fvsPatchField<Type>::write(Ostream& os) const
 {
-    os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
     this->writeEntry("value", os);
 }
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
index e19f500b16c479721bf85503c83d2c658073939a..843b115d07e749cef26b6394c4c7800b83ec950e 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
@@ -179,16 +179,11 @@ void angularOscillatingDisplacementPointPatchVectorField::write
 ) const
 {
     pointPatchField<vector>::write(os);
-    os.writeKeyword("axis")
-        << axis_ << token::END_STATEMENT << nl;
-    os.writeKeyword("origin")
-        << origin_ << token::END_STATEMENT << nl;
-    os.writeKeyword("angle0")
-        << angle0_ << token::END_STATEMENT << nl;
-    os.writeKeyword("amplitude")
-        << amplitude_ << token::END_STATEMENT << nl;
-    os.writeKeyword("omega")
-        << omega_ << token::END_STATEMENT << nl;
+    os.writeEntry("axis", axis_);
+    os.writeEntry("origin", origin_);
+    os.writeEntry("angle0", angle0_);
+    os.writeEntry("amplitude", amplitude_);
+    os.writeEntry("omega", omega_);
     p0_.writeEntry("p0", os);
     writeEntry("value", os);
 }
diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C
index 5932d8402c370859d25b7082df07a6d9450d57b8..3f64821dd71b9311b08696d0898a78f6e035dfed 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C
@@ -184,16 +184,11 @@ void angularOscillatingVelocityPointPatchVectorField::write
 ) const
 {
     pointPatchField<vector>::write(os);
-    os.writeKeyword("axis")
-        << axis_ << token::END_STATEMENT << nl;
-    os.writeKeyword("origin")
-        << origin_ << token::END_STATEMENT << nl;
-    os.writeKeyword("angle0")
-        << angle0_ << token::END_STATEMENT << nl;
-    os.writeKeyword("amplitude")
-        << amplitude_ << token::END_STATEMENT << nl;
-    os.writeKeyword("omega")
-        << omega_ << token::END_STATEMENT << nl;
+    os.writeEntry("axis", axis_);
+    os.writeEntry("origin", origin_);
+    os.writeEntry("angle0", angle0_);
+    os.writeEntry("amplitude", amplitude_);
+    os.writeEntry("omega", omega_);
     p0_.writeEntry("p0", os);
     writeEntry("value", os);
 }
diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C
index 9e36b8cefbe71521f0ba67a1ce9a75c68f490cc8..98e83d7b88b04f2c38bbd822e89f98972f00225d 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C
@@ -117,10 +117,8 @@ void oscillatingDisplacementPointPatchVectorField::updateCoeffs()
 void oscillatingDisplacementPointPatchVectorField::write(Ostream& os) const
 {
     pointPatchField<vector>::write(os);
-    os.writeKeyword("amplitude")
-        << amplitude_ << token::END_STATEMENT << nl;
-    os.writeKeyword("omega")
-        << omega_ << token::END_STATEMENT << nl;
+    os.writeEntry("amplitude", amplitude_);
+    os.writeEntry("omega", omega_);
     writeEntry("value", os);
 }
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C
index f75b568ecafed07ada806af13968d68aef483966..f99d53852846e240401b20414fcba24edd99e554 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C
@@ -160,10 +160,8 @@ void oscillatingVelocityPointPatchVectorField::updateCoeffs()
 void oscillatingVelocityPointPatchVectorField::write(Ostream& os) const
 {
     pointPatchField<vector>::write(os);
-    os.writeKeyword("amplitude")
-        << amplitude_ << token::END_STATEMENT << nl;
-    os.writeKeyword("omega")
-        << omega_ << token::END_STATEMENT << nl;
+    os.writeEntry("amplitude", amplitude_);
+    os.writeEntry("omega", omega_);
     p0_.writeEntry("p0", os);
     writeEntry("value", os);
 }
diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
index 85d3cd19fd82f6f5f85058dbaee1f39394a9f1cc..5e2053ef99081e9d34c078a67be271039b84154f 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
@@ -470,10 +470,12 @@ void Foam::surfaceDisplacementPointPatchVectorField::write(Ostream& os) const
     os.writeEntry("projectDirection", projectDir_);
     os.writeEntry("wedgePlane", wedgePlane_);
 
-    if (frozenPointsZone_ != word::null)
-    {
-        os.writeEntry("frozenPointsZone", frozenPointsZone_);
-    }
+    os.writeEntryIfDifferent<word>
+    (
+        "frozenPointsZone",
+        word::null,
+        frozenPointsZone_
+    );
 }
 
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
index a85df2a86373406e533eda6df1e4ec4ba3e46a64..469cebfb79b848160b298624d9cb40477d4347fc 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
@@ -431,10 +431,13 @@ void Foam::surfaceSlipDisplacementPointPatchVectorField::write
     os.writeEntry("projectMode", projectModeNames_[projectMode_]);
     os.writeEntry("projectDirection", projectDir_);
     os.writeEntry("wedgePlane", wedgePlane_);
-    if (frozenPointsZone_ != word::null)
-    {
-        os.writeEntry("frozenPointsZone", frozenPointsZone_);
-    }
+
+    os.writeEntryIfDifferent<word>
+    (
+        "frozenPointsZone",
+        word::null,
+        frozenPointsZone_
+    );
 }
 
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C
index 886f9440e98b6d0a109d37e5828dd42ac8321f9b..1fbcb49f96bdd8ec7d14f2152bb2ced6cbe09c62 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C
@@ -596,23 +596,20 @@ void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::write
 {
     fixedValuePointPatchField<Type>::write(os);
 
-    this->writeEntryIfDifferent(os, "setAverage", Switch(false), setAverage_);
+    os.writeEntryIfDifferent("setAverage", Switch(false), setAverage_);
+    os.writeEntryIfDifferent<scalar>("perturb", 1e-5, perturb_);
 
-    this->writeEntryIfDifferent(os, "perturb", scalar(1e-5), perturb_);
-
-    this->writeEntryIfDifferent
+    os.writeEntryIfDifferent
     (
-        os,
         "fieldTable",
         this->internalField().name(),
         fieldTableName_
     );
 
-    this->writeEntryIfDifferent
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "mapMethod",
-        word("planarInterpolation"),
+        "planarInterpolation",
         mapMethod_
     );
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C
index ca1193bb432efdd3728bac6769c296b9e0029f72..82eee2cddcaec83ff0013edd2b7032ea5406917f 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C
@@ -260,10 +260,8 @@ void uniformInterpolatedDisplacementPointPatchVectorField::write(Ostream& os)
 const
 {
     pointPatchField<vector>::write(os);
-    os.writeKeyword("field")
-        << fieldName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("interpolationScheme")
-        << interpolationScheme_ << token::END_STATEMENT << nl;
+    os.writeEntry("field", fieldName_);
+    os.writeEntry("interpolationScheme", interpolationScheme_);
     writeEntry("value", os);
 }
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C
index 34976e9827e293cf771f92c8b7d13d51af1308ac..e5196ceab990694056568416926ea82195199f3c 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C
@@ -121,12 +121,9 @@ void Foam::waveDisplacementPointPatchVectorField::updateCoeffs()
 void Foam::waveDisplacementPointPatchVectorField::write(Ostream& os) const
 {
     pointPatchField<vector>::write(os);
-    os.writeKeyword("amplitude")
-        << amplitude_ << token::END_STATEMENT << nl;
-    os.writeKeyword("omega")
-        << omega_ << token::END_STATEMENT << nl;
-    os.writeKeyword("waveNumber")
-        << waveNumber_ << token::END_STATEMENT << nl;
+    os.writeEntry("amplitude", amplitude_);
+    os.writeEntry("omega", omega_);
+    os.writeEntry("waveNumber", waveNumber_);
     writeEntry("value", os);
 }
 
diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C
index 24ccdccae6abe8259fae6d74827f543138bb8d5c..d0a7f439d2025b3805c0d6b655fb2e3ced9c10f7 100644
--- a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C
+++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C
@@ -774,7 +774,7 @@ const Foam::word& Foam::genericFvPatchField<Type>::actualType() const
 template<class Type>
 void Foam::genericFvPatchField<Type>::write(Ostream& os) const
 {
-    os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;
+    os.writeEntry("type", actualTypeName_);
 
     forAllConstIter(dictionary, dict_, iter)
     {
diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C
index 815d7af99b06945e51ac2ee08f25ed67df5acac9..52744cdf3cd4a8b1d7f4449322b0d41baafc6b14 100644
--- a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C
+++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C
@@ -567,7 +567,7 @@ const Foam::word& Foam::genericPointPatchField<Type>::actualType() const
 template<class Type>
 void Foam::genericPointPatchField<Type>::write(Ostream& os) const
 {
-    os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;
+    os.writeEntry("type", actualTypeName_);
 
     forAllConstIter(dictionary, dict_, iter)
     {
diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C
index e981fc903b9ad38a5f8697f6122928de60b4c5f5..00ccbe77390059ce872cd4b68945cefafd357db6 100644
--- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C
+++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C
@@ -43,9 +43,9 @@ Foam::phaseProperties::phaseProperties(Istream& is)
     phase_ = phaseTypeNames[phaseInfo.keyword()];
     stateLabel_ = phaseToStateLabel(phase_);
 
-    if (phaseInfo.size() > 0)
+    const label nComponents = phaseInfo.size();
+    if (nComponents)
     {
-        label nComponents = phaseInfo.size();
         names_.setSize(nComponents, "unknownSpecie");
         Y_.setSize(nComponents, 0.0);
         carrierIds_.setSize(nComponents, -1);
@@ -74,10 +74,9 @@ Foam::Istream& Foam::operator>>(Istream& is, phaseProperties& pp)
     pp.phase_ = pp.phaseTypeNames[phaseInfo.keyword()];
     pp.stateLabel_ = pp.phaseToStateLabel(pp.phase_);
 
-    if (phaseInfo.size() > 0)
+    const label nComponents = phaseInfo.size();
+    if (nComponents)
     {
-        label nComponents = phaseInfo.size();
-
         pp.names_.setSize(nComponents, "unknownSpecie");
         pp.Y_.setSize(nComponents, 0.0);
         pp.carrierIds_.setSize(nComponents, -1);
@@ -101,16 +100,14 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const phaseProperties& pp)
 {
     os.check(FUNCTION_NAME);
 
-    os  << pp.phaseTypeNames[pp.phase_] << nl << token::BEGIN_BLOCK << nl
-        << incrIndent;
+    os.beginBlock(pp.phaseTypeNames[pp.phase_]);
 
     forAll(pp.names_, cmptI)
     {
-        os.writeKeyword(pp.names_[cmptI]) << pp.Y_[cmptI]
-            << token::END_STATEMENT << nl;
+        os.writeEntry(pp.names_[cmptI], pp.Y_[cmptI]);
     }
 
-    os  << decrIndent << token::END_BLOCK << nl;
+    os.endBlock();
 
     os.check(FUNCTION_NAME);
     return os;
diff --git a/src/lagrangian/intermediate/submodels/CloudSubModelBase.C b/src/lagrangian/intermediate/submodels/CloudSubModelBase.C
index 39bcb8da2f2b59db61f09af6b2e42f5ef5f06ad8..807fd4e6cece93433676528a2d02aa92a2e6be89 100644
--- a/src/lagrangian/intermediate/submodels/CloudSubModelBase.C
+++ b/src/lagrangian/intermediate/submodels/CloudSubModelBase.C
@@ -126,8 +126,7 @@ bool Foam::CloudSubModelBase<CloudType>::writeTime() const
 template<class CloudType>
 void Foam::CloudSubModelBase<CloudType>::write(Ostream& os) const
 {
-    os.writeKeyword("owner") << owner_.name() << token::END_STATEMENT
-        << nl;
+    os.writeEntry("owner", owner_.name());
 
     subModelBase::write(os);
 }
diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C
index 1ed664749896ef3ec42c46703cbeb8f0c74f12fc..87bf0d84acb6b5293b4863c848bf61cb6a834ad8 100644
--- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C
+++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C
@@ -184,9 +184,8 @@ void Foam::DispersionRASModel<CloudType>::write(Ostream& os) const
 {
     DispersionModel<CloudType>::write(os);
 
-    os.writeKeyword("ownK") << ownK_ << token::END_STATEMENT << endl;
-    os.writeKeyword("ownEpsilon") << ownEpsilon_ << token::END_STATEMENT
-        << endl;
+    os.writeEntry("ownK", ownK_);
+    os.writeEntry("ownEpsilon", ownEpsilon_);
 }
 
 
diff --git a/src/lumpedPointMotion/lumpedPointState.C b/src/lumpedPointMotion/lumpedPointState.C
index 0ef9f5a48fd9b16eb62f56dc81c3650806dc56e8..e15e3371c1c91218be8f284f780152221d6d20dd 100644
--- a/src/lumpedPointMotion/lumpedPointState.C
+++ b/src/lumpedPointMotion/lumpedPointState.C
@@ -254,7 +254,7 @@ void Foam::lumpedPointState::writeDict(Ostream& os) const
     os.writeEntry("angles", angles_);
     if (degrees_)
     {
-        os.writeKeyword("degrees") << "true;" << nl;
+        os.writeEntry("degrees", word("true"));
     }
 }
 
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C
index d801ec591ebea1e90440240efbcaf0b60d30f4bd..4fbd6e39c9441dd84306cf3f2974bb75d34887eb 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C
@@ -592,8 +592,7 @@ void Foam::cyclicACMIPolyPatch::write(Ostream& os) const
 {
     cyclicAMIPolyPatch::write(os);
 
-    os.writeKeyword("nonOverlapPatch") << nonOverlapPatchName_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("nonOverlapPatch", nonOverlapPatchName_);
 }
 
 
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
index 74015e3ece131becd743119842c206a20cb54d61..12f9546fcab5b8d44f470364d18b9fafa753dc82 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
@@ -1058,8 +1058,7 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
     coupledPolyPatch::write(os);
     if (!nbrPatchName_.empty())
     {
-        os.writeKeyword("neighbourPatch") << nbrPatchName_
-            << token::END_STATEMENT << nl;
+        os.writeEntry("neighbourPatch", nbrPatchName_);
     }
     coupleGroup_.write(os);
 
@@ -1067,23 +1066,19 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
     {
         case ROTATIONAL:
         {
-            os.writeKeyword("rotationAxis") << rotationAxis_
-                << token::END_STATEMENT << nl;
-            os.writeKeyword("rotationCentre") << rotationCentre_
-                << token::END_STATEMENT << nl;
+            os.writeEntry("rotationAxis", rotationAxis_);
+            os.writeEntry("rotationCentre", rotationCentre_);
 
             if (rotationAngleDefined_)
             {
-                os.writeKeyword("rotationAngle") << radToDeg(rotationAngle_)
-                    << token::END_STATEMENT << nl;
+                os.writeEntry("rotationAngle", radToDeg(rotationAngle_));
             }
 
             break;
         }
         case TRANSLATIONAL:
         {
-            os.writeKeyword("separationVector") << separationVector_
-                << token::END_STATEMENT << nl;
+            os.writeEntry("separationVector", separationVector_);
             break;
         }
         case NOORDERING:
@@ -1098,30 +1093,29 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
 
     if (AMIMethod_ != AMIPatchToPatchInterpolation::imFaceAreaWeight)
     {
-        os.writeKeyword("method")
-            <<  AMIPatchToPatchInterpolation::interpolationMethodToWord
-                (
-                    AMIMethod_
-                )
-            << token::END_STATEMENT << nl;
+        os.writeEntry
+        (
+            "method",
+            AMIPatchToPatchInterpolation::interpolationMethodToWord
+            (
+                AMIMethod_
+            )
+        );
     }
 
     if (AMIReverse_)
     {
-        os.writeKeyword("flipNormals") << AMIReverse_
-            << token::END_STATEMENT << nl;
+        os.writeEntry("flipNormals", AMIReverse_);
     }
 
     if (AMILowWeightCorrection_ > 0)
     {
-        os.writeKeyword("lowWeightCorrection") << AMILowWeightCorrection_
-            << token::END_STATEMENT << nl;
+        os.writeEntry("lowWeightCorrection", AMILowWeightCorrection_);
     }
 
     if (!surfDict_.empty())
     {
-        os.writeKeyword(surfDict_.dictName());
-        os  << surfDict_;
+        surfDict_.writeEntry(surfDict_.dictName(), os);
     }
 }
 
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
index fcbf9dd6ab0cd3ec299da377ed0bb9c0d1e4c972..46aad8db98593cbdb15cc13bb826625d0088c3a1 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
@@ -709,25 +709,10 @@ void Foam::cyclicPeriodicAMIPolyPatch::write(Ostream& os) const
 {
     cyclicAMIPolyPatch::write(os);
 
-    os.writeKeyword("periodicPatch") << periodicPatchName_
-        << token::END_STATEMENT << nl;
-
-    if (nTransforms_ != 0)
-    {
-        os.writeKeyword("nTransforms") << nTransforms_ <<
-            token::END_STATEMENT << nl;
-    }
-
-    if (nSectors_ != 0)
-    {
-        os.writeKeyword("nSectors") << nSectors_ <<
-            token::END_STATEMENT << nl;
-    }
-
-    if (maxIter_ != 36)
-    {
-        os.writeKeyword("maxIter") << maxIter_ << token::END_STATEMENT << nl;
-    }
+    os.writeEntry("periodicPatch", periodicPatchName_);
+    os.writeEntryIfDifferent<label>("nTransforms", 0, nTransforms_);
+    os.writeEntryIfDifferent<label>("nSectors", 0, nSectors_);
+    os.writeEntryIfDifferent<label>("maxIter", 36, maxIter_);
 }
 
 
diff --git a/src/meshTools/coordinateSystems/coordinateSystem.C b/src/meshTools/coordinateSystems/coordinateSystem.C
index e8c507a7f848e6177ca7a6dbc697af94703b1841..b4a9e7882009046141db1ef497fbcfd16b26acae 100644
--- a/src/meshTools/coordinateSystems/coordinateSystem.C
+++ b/src/meshTools/coordinateSystems/coordinateSystem.C
@@ -297,25 +297,23 @@ void Foam::coordinateSystem::writeDict(Ostream& os, bool subDict) const
 {
     if (subDict)
     {
-        os  << indent << name_ << nl
-            << indent << token::BEGIN_BLOCK << incrIndent << nl;
+        os.beginBlock(name_);
     }
 
-    os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
 
-
-    // The note entry is optional
     if (note_.size())
     {
-        os.writeKeyword("note") << note_ << token::END_STATEMENT << nl;
+        // note is optional
+        os.writeEntry("note", note_);
     }
 
-    os.writeKeyword("origin") << origin_ << token::END_STATEMENT << nl;
+    os.writeEntry("origin", origin_);
     R_->write(os);
 
     if (subDict)
     {
-        os  << decrIndent << indent << token::END_BLOCK << endl;
+        os.endBlock();
     }
 }
 
diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C
index 6f114e545b3fc11c9be299bb8b50a64727df7fdf..bf2a0801932536844c4ab31094d6a8126ba65a8c 100644
--- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C
+++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C
@@ -1432,8 +1432,7 @@ void Foam::mappedPatchBase::write(Ostream& os) const
 
             if (!surfDict_.empty())
             {
-                os.writeKeyword(surfDict_.dictName());
-                os  << surfDict_;
+                surfDict_.writeEntry(surfDict_.dictName(), os);
             }
         }
     }
diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C
index 6248dce65062ca655ae9a61803446329a389117d..2a40a4695d6300c1801d309b904464c7851ed9a8 100644
--- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C
+++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C
@@ -167,7 +167,7 @@ Foam::mappedVariableThicknessWallPolyPatch::
 void Foam::mappedVariableThicknessWallPolyPatch::
 write(Foam::Ostream& os) const
 {
-    os.writeKeyword("thickness") << thickness_ << token::END_STATEMENT << nl;
+    os.writeEntry("thickness", thickness_);
 }
 
 
diff --git a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C
index bbdb866f94f1b85d92afe6ab2ba15622922e52ae..9defb4090bdd86dbf044e011836948f6b0f129a3 100644
--- a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C
+++ b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C
@@ -331,21 +331,17 @@ bool Foam::regionCoupledBase::order
 
 void Foam::regionCoupledBase::write(Ostream& os) const
 {
-    os.writeKeyword("neighbourPatch") << nbrPatchName_
-    << token::END_STATEMENT << nl;
-    os.writeKeyword("neighbourRegion") << nbrRegionName_
-    << token::END_STATEMENT << nl;
+    os.writeEntry("neighbourPatch", nbrPatchName_);
+    os.writeEntry("neighbourRegion", nbrRegionName_);
 
     if (AMIReverse_)
     {
-        os.writeKeyword("flipNormals") << AMIReverse_
-            << token::END_STATEMENT << nl;
+        os.writeEntry("flipNormals", AMIReverse_);
     }
 
     if (!surfDict_.empty())
     {
-        os.writeKeyword(surfDict_.dictName());
-        os  << surfDict_;
+        surfDict_.writeEntry(surfDict_.dictName(), os);
     }
 }
 
diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C
index dac63860b81a145b358556159c3197f0d0c28135..86680da8d99fa0f866bd82cea11b1d74a401a5d5 100644
--- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C
+++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C
@@ -384,28 +384,23 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::write
 ) const
 {
     mixedFvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "filmRegion",
         "surfaceFilmProperties",
         filmRegionName_
     );
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "pyrolysisRegion",
         "pyrolysisProperties",
         pyrolysisRegionName_
     );
-    os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("qr")<< qrName_ << token::END_STATEMENT << nl;
-    os.writeKeyword("convectiveScaling") << convectiveScaling_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("filmDeltaDry") << filmDeltaDry_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("filmDeltaWet") << filmDeltaWet_
-        << token::END_STATEMENT << endl;
+    os.writeEntry("Tnbr", TnbrName_);
+    os.writeEntry("qr", qrName_);
+    os.writeEntry("convectiveScaling", convectiveScaling_);
+    os.writeEntry("filmDeltaDry", filmDeltaDry_);
+    os.writeEntry("filmDeltaWet", filmDeltaWet_);
     temperatureCoupledBase::write(os);
 }
 
diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C
index 3616268333ec686a9de755347975c484a0c08f18..6b1aee1745296c3292ac448791044f563c824861 100644
--- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C
+++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C
@@ -186,22 +186,20 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::write
 ) const
 {
     fvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "filmRegion",
         "surfaceFilmProperties",
         filmRegionName_
     );
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "pyrolysisRegion",
         "pyrolysisProperties",
         pyrolysisRegionName_
     );
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     writeEntry("value", os);
 }
 
diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C
index c5507e06a22385b35f803aff68434ad3a9e8d7c8..f4b4d4455524d90776857e78a1a4bb1f68088de4 100644
--- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C
+++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C
@@ -212,22 +212,20 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "filmRegion",
         "surfaceFilmProperties",
         filmRegionName_
     );
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "pyrolysisRegion",
         "pyrolysisProperties",
         pyrolysisRegionName_
     );
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
     writeEntry("value", os);
 }
 
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C
index 18a0bc751eb1c76ff064f228d6d7d2755564959d..a4c48dfb13314ed73c42ce59b1ce2ae213e30038 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C
@@ -132,9 +132,9 @@ void Foam::filmHeightInletVelocityFvPatchVectorField::updateCoeffs()
 void Foam::filmHeightInletVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-    writeEntryIfDifferent<word>(os, "deltaf", "deltaf", deltafName_);
+    os.writeEntryIfDifferent<word>("phi", "phi", phiName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("deltaf", "deltaf", deltafName_);
     writeEntry("value", os);
 }
 
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
index e34296a1079af6776289a5143c179427ce56e24b..c2f1c552a5b99d8c13415d84774cceae456b8474 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
@@ -192,9 +192,8 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::write
 ) const
 {
     fixedValueFvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "filmRegion",
         "surfaceFilmProperties",
         filmRegionName_
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
index 3bbc164e0afde210eb400da47d4c0321bf5bc22f..084e4ad6dfd3bd2c8b87c00e08277746f18e28f9 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
@@ -191,9 +191,8 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "filmRegion",
         "surfaceFilmProperties",
         filmRegionName_
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C
index 09e76db86e9367bfddafbad1a8ae539fdd48e4b7..f468aff4c6b603b75ae3a9dc12aae64d9c4c41c8 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C
@@ -237,18 +237,17 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
 void alphatFilmWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "filmRegion",
         "surfaceFilmProperties",
         filmRegionName_
     );
-    os.writeKeyword("B") << B_ << token::END_STATEMENT << nl;
-    os.writeKeyword("yPlusCrit") << yPlusCrit_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
+    os.writeEntry("B", B_);
+    os.writeEntry("yPlusCrit", yPlusCrit_);
+    os.writeEntry("Cmu", Cmu_);
+    os.writeEntry("kappa", kappa_);
+    os.writeEntry("Prt", Prt_);
     writeEntry("value", os);
 }
 
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C
index b35804673e4428ced356ea4720822686323987cd..4b733d82680bc8559d721b6ac296d57b2f2e9289 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C
@@ -247,16 +247,15 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::yPlus() const
 void nutkFilmWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    writeEntryIfDifferent<word>
+    os.writeEntryIfDifferent<word>
     (
-        os,
         "filmRegion",
         "surfaceFilmProperties",
         filmRegionName_
     );
     writeLocalEntries(os);
-    os.writeKeyword("B") << B_ << token::END_STATEMENT << nl;
-    os.writeKeyword("yPlusCrit") << yPlusCrit_ << token::END_STATEMENT << nl;
+    os.writeEntry("B", B_);
+    os.writeEntry("yPlusCrit", yPlusCrit_);
     writeEntry("value", os);
 }
 
diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C
index 58f784039858c581f13fbfeebec3995cdaae8c55..9895f146bc1ed4d190c3e09ee96a7096b1a378fd 100644
--- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C
+++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C
@@ -285,11 +285,10 @@ void thermalBaffleFvPatchScalarField::write(Ostream& os) const
         os << dict_.subDict(extrudeModel) << nl;
 
         word regionName = dict_.lookup("region");
-        os.writeKeyword("region") << regionName << token::END_STATEMENT << nl;
+        os.writeEntry("region", regionName);
 
         bool active = readBool(dict_.lookup("active"));
-        os.writeKeyword("active") <<  active
-            << token::END_STATEMENT << nl;
+        os.writeEntry("active", active);
 
         os.writeKeyword("thermoType");
         os << dict_.subDict("thermoType") << nl;
diff --git a/src/rigidBodyDynamics/bodies/cuboid/cuboid.C b/src/rigidBodyDynamics/bodies/cuboid/cuboid.C
index 5309ae50b48f280a508e683830d5a09ae3eba8d8..36f4cc4c1b182ef4f91fd2d6836c2cc6066c5856 100644
--- a/src/rigidBodyDynamics/bodies/cuboid/cuboid.C
+++ b/src/rigidBodyDynamics/bodies/cuboid/cuboid.C
@@ -62,14 +62,9 @@ Foam::RBD::cuboid::~cuboid()
 
 void Foam::RBD::cuboid::write(Ostream& os) const
 {
-    os.writeKeyword("type")
-        << type() << token::END_STATEMENT << nl;
-
-    os.writeKeyword("mass")
-        << m() << token::END_STATEMENT << nl;
-
-    os.writeKeyword("L")
-        << L() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
+    os.writeEntry("mass", m());
+    os.writeEntry("L", L());
 }
 
 
diff --git a/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C b/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C
index 61e5b4bc757fcab95d598047ca31c08537744463..ad5c7ed99a1f2b0a9d27bd7417bfd09afc570005 100644
--- a/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C
+++ b/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C
@@ -68,8 +68,7 @@ bool Foam::RBD::masslessBody::massless() const
 
 void Foam::RBD::masslessBody::write(Ostream& os) const
 {
-    os.writeKeyword("type")
-        << type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
 }
 
 
diff --git a/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C
index d13772c1000f56a71cc1d7d080624df1c0c95651..51831470059432141750aa2c2ead1b7caa027edd 100644
--- a/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C
+++ b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C
@@ -118,17 +118,10 @@ void Foam::RBD::rigidBody::merge(const subBody& subBody)
 
 void Foam::RBD::rigidBody::write(Ostream& os) const
 {
-    os.writeKeyword("type")
-        << type() << token::END_STATEMENT << nl;
-
-    os.writeKeyword("mass")
-        << m() << token::END_STATEMENT << nl;
-
-    os.writeKeyword("centreOfMass")
-        << c() << token::END_STATEMENT << nl;
-
-    os.writeKeyword("inertia")
-        << Ic() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
+    os.writeEntry("mass", m());
+    os.writeEntry("centreOfMass", c());
+    os.writeEntry("inertia", Ic());
 }
 
 
diff --git a/src/rigidBodyDynamics/bodies/sphere/sphere.C b/src/rigidBodyDynamics/bodies/sphere/sphere.C
index ea4d13653e7d94875b9ffedb119967e624f8cd11..6e1c6b9b31078070b523d1565d67bf74c6b906fb 100644
--- a/src/rigidBodyDynamics/bodies/sphere/sphere.C
+++ b/src/rigidBodyDynamics/bodies/sphere/sphere.C
@@ -62,14 +62,9 @@ Foam::RBD::sphere::~sphere()
 
 void Foam::RBD::sphere::write(Ostream& os) const
 {
-    os.writeKeyword("type")
-        << type() << token::END_STATEMENT << nl;
-
-    os.writeKeyword("mass")
-        << m() << token::END_STATEMENT << nl;
-
-    os.writeKeyword("radius")
-        << r() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
+    os.writeEntry("mass", m());
+    os.writeEntry("radius", r());
 }
 
 
diff --git a/src/rigidBodyDynamics/bodies/subBody/subBody.C b/src/rigidBodyDynamics/bodies/subBody/subBody.C
index 96924506beb583f3322763af08343cadd206131d..06586248ac823a59e23db83ba64db04f6f9d424e 100644
--- a/src/rigidBodyDynamics/bodies/subBody/subBody.C
+++ b/src/rigidBodyDynamics/bodies/subBody/subBody.C
@@ -29,11 +29,8 @@ License
 
 void Foam::RBD::subBody::write(Ostream& os) const
 {
-    os.writeKeyword("master")
-        << masterName_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("transform")
-        << masterXT_ << token::END_STATEMENT << nl;
+    os.writeEntry("master", masterName_);
+    os.writeEntry("transform", masterXT_);
 }
 
 
diff --git a/src/rigidBodyDynamics/joints/Pa/Pa.C b/src/rigidBodyDynamics/joints/Pa/Pa.C
index b30997acadfce95a2adca9c549c6a6e621bc9588..30cc3711e30fe9742c0ab61f7559a57a07738fb5 100644
--- a/src/rigidBodyDynamics/joints/Pa/Pa.C
+++ b/src/rigidBodyDynamics/joints/Pa/Pa.C
@@ -98,8 +98,7 @@ void Foam::RBD::joints::Pa::jcalc
 void Foam::RBD::joints::Pa::write(Ostream& os) const
 {
     joint::write(os);
-    os.writeKeyword("axis")
-        << S_[0].l() << token::END_STATEMENT << nl;
+    os.writeEntry("axis", S_[0].l());
 }
 
 
diff --git a/src/rigidBodyDynamics/joints/Ra/Ra.C b/src/rigidBodyDynamics/joints/Ra/Ra.C
index 468985ea67c39da7bc9882f5682767d5c253dca0..df4f9048d65df7460f871340f55e55b7fbad62a8 100644
--- a/src/rigidBodyDynamics/joints/Ra/Ra.C
+++ b/src/rigidBodyDynamics/joints/Ra/Ra.C
@@ -98,8 +98,7 @@ void Foam::RBD::joints::Ra::jcalc
 void Foam::RBD::joints::Ra::write(Ostream& os) const
 {
     joint::write(os);
-    os.writeKeyword("axis")
-        << S_[0].w() << token::END_STATEMENT << nl;
+    os.writeEntry("axis", S_[0].w());
 }
 
 
diff --git a/src/rigidBodyDynamics/joints/joint/joint.C b/src/rigidBodyDynamics/joints/joint/joint.C
index 92204ffebd87a192ca78ab91d833632a768123b2..6448bb6f8b88f63032488678f7eb1a646d428af9 100644
--- a/src/rigidBodyDynamics/joints/joint/joint.C
+++ b/src/rigidBodyDynamics/joints/joint/joint.C
@@ -79,7 +79,7 @@ Foam::RBD::joint::~joint()
 
 void Foam::RBD::joint::write(Ostream& os) const
 {
-    os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
 }
 
 
diff --git a/src/rigidBodyDynamics/joints/joint/jointI.H b/src/rigidBodyDynamics/joints/joint/jointI.H
index eb6e36a2ca8408c1505eaad0a46f1a752cafa2bc..de655ff6c558097afb0d2cc62eb94ad3eaa4511b 100644
--- a/src/rigidBodyDynamics/joints/joint/jointI.H
+++ b/src/rigidBodyDynamics/joints/joint/jointI.H
@@ -112,9 +112,9 @@ Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joint::iNew::operator()
 
 inline Foam::Ostream& Foam::RBD::operator<<(Ostream& os, const joint& j)
 {
-    os  << indent << token::BEGIN_BLOCK << incrIndent << endl;
+    os.beginBlock();
     j.write(os);
-    os  << decrIndent << indent << token::END_BLOCK;
+    os.endBlock();
 
     return os;
 }
diff --git a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
index 8f0b6143e5cea8844309f5cf2be741667a626f77..379a69c4f4e327cae14197fe759f0847bfea8d46 100644
--- a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
+++ b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
@@ -184,17 +184,10 @@ void Foam::RBD::restraints::linearAxialAngularSpring::write
 {
     restraint::write(os);
 
-    os.writeKeyword("referenceOrientation")
-        << refQ_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("axis")
-        << axis_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("stiffness")
-        << stiffness_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("damping")
-        << damping_ << token::END_STATEMENT << nl;
+    os.writeEntry("referenceOrientation", refQ_);
+    os.writeEntry("axis", axis_);
+    os.writeEntry("stiffness", stiffness_);
+    os.writeEntry("damping", damping_);
 }
 
 
diff --git a/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C
index d3e4e063da47e91283415b6ee135ea4076c597b0..b15c39cb4dc8ed646e717605611086bf6aac93a8 100644
--- a/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C
+++ b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C
@@ -109,8 +109,7 @@ void Foam::RBD::restraints::linearDamper::write
 {
     restraint::write(os);
 
-    os.writeKeyword("coeff")
-        << coeff_ << token::END_STATEMENT << nl;
+    os.writeEntry("coeff", coeff_);
 }
 
 
diff --git a/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C b/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C
index 9449d60042d059fc05731bf72efee029df292ebb..189a7e9a9b40b134a28136cc9e2ec2b0f328ffac 100644
--- a/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C
+++ b/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C
@@ -134,20 +134,11 @@ void Foam::RBD::restraints::linearSpring::write
 {
     restraint::write(os);
 
-    os.writeKeyword("anchor")
-        << anchor_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("refAttachmentPt")
-        << refAttachmentPt_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("stiffness")
-        << stiffness_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("damping")
-        << damping_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("restLength")
-        << restLength_ << token::END_STATEMENT << nl;
+    os.writeEntry("anchor", anchor_);
+    os.writeEntry("refAttachmentPt", refAttachmentPt_);
+    os.writeEntry("stiffness", stiffness_);
+    os.writeEntry("damping", damping_);
+    os.writeEntry("restLength", restLength_);
 }
 
 
diff --git a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C
index be56e7b08428123362d065ccf0eb7cd4c343bf14..229e64ae3f5a654a93c5d6b2765987efa3cf0e4e 100644
--- a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C
+++ b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C
@@ -78,10 +78,8 @@ bool Foam::RBD::restraint::read(const dictionary& dict)
 
 void Foam::RBD::restraint::write(Ostream& os) const
 {
-    os.writeKeyword("type")
-        << type() << token::END_STATEMENT << nl;
-    os.writeKeyword("body")
-        << model_.name(bodyID_) << token::END_STATEMENT << nl;
+    os.writeEntry("type", type());
+    os.writeEntry("body", model_.name(bodyID_));
 }
 
 
diff --git a/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C
index 8ef17486b78232b6b3d104b8a7e3bbf7441c078e..441bfafc1f90530879080a3cc65a9c30eb102953 100644
--- a/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C
+++ b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C
@@ -109,7 +109,7 @@ void Foam::RBD::restraints::sphericalAngularDamper::write
 {
     restraint::write(os);
 
-    os.writeKeyword("coeff") << coeff_ << token::END_STATEMENT << nl;
+    os.writeEntry("coeff", coeff_);
 }
 
 
diff --git a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C
index 4a8de4eac4d72b0557ff26ed31edc9f7c0f02a8b..1fbe3fc60e982a4905204a6801afd788e9615322 100644
--- a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C
+++ b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C
@@ -377,17 +377,14 @@ Foam::spatialTransform Foam::RBD::rigidBodyModel::X0
         const subBody& mBody = mergedBody(bodyId);
         return mBody.masterXT() & X0_[mBody.masterID()];
     }
-    else
-    {
-        return X0_[bodyId];
-    }
+
+    return X0_[bodyId];
 }
 
 
 void Foam::RBD::rigidBodyModel::write(Ostream& os) const
 {
-    os  << indent << "bodies" << nl
-        << indent << token::BEGIN_BLOCK << incrIndent << nl;
+    os.beginBlock("bodies");
 
     // Write the moving bodies
     for (label i=1; i<nBodies(); i++)
@@ -396,61 +393,52 @@ void Foam::RBD::rigidBodyModel::write(Ostream& os) const
         // of composite joints
         if (!isType<jointBody>(bodies_[i]))
         {
-            os  << indent << bodies_[i].name() << nl
-                << indent << token::BEGIN_BLOCK << incrIndent << endl;
+            os.beginBlock(bodies_[i].name());
 
             bodies_[i].write(os);
 
-            os.writeKeyword("parent")
-                << bodies_[lambda_[i]].name() << token::END_STATEMENT << nl;
-
-            os.writeKeyword("transform")
-                << XT_[i] << token::END_STATEMENT << nl;
+            os.writeEntry("parent", bodies_[lambda_[i]].name());
+            os.writeEntry("transform", XT_[i]);
 
-            os  << indent << "joint" << nl << joints_[i] << endl;
+            os  << indent << "joint" << nl
+                << joints_[i] << endl;
 
-            os  << decrIndent << indent << token::END_BLOCK << endl;
+            os.endBlock();
         }
     }
 
     // Write the bodies merged into the parent bodies for efficiency
     forAll(mergedBodies_, i)
     {
-        os  << indent << mergedBodies_[i].name() << nl
-            << indent << token::BEGIN_BLOCK << incrIndent << endl;
+        os.beginBlock(mergedBodies_[i].name());
 
         mergedBodies_[i].body().write(os);
 
-        os.writeKeyword("transform")
-            << mergedBodies_[i].masterXT() << token::END_STATEMENT << nl;
-
-        os.writeKeyword("mergeWith")
-            << mergedBodies_[i].masterName() << token::END_STATEMENT << nl;
+        os.writeEntry("transform", mergedBodies_[i].masterXT());
+        os.writeEntry("mergeWith", mergedBodies_[i].masterName());
 
-        os  << decrIndent << indent << token::END_BLOCK << endl;
+        os.endBlock();
     }
 
-    os  << decrIndent << indent << token::END_BLOCK << nl;
+    os.endBlock();
 
 
     if (!restraints_.empty())
     {
-        os  << indent << "restraints" << nl
-            << indent << token::BEGIN_BLOCK << incrIndent << nl;
+        os.beginBlock("restraints");
 
         forAll(restraints_, ri)
         {
-            word restraintType = restraints_[ri].type();
+            const word& restraintType(restraints_[ri].type());
 
-            os  << indent << restraints_[ri].name() << nl
-                << indent << token::BEGIN_BLOCK << incrIndent << endl;
+            os.beginBlock(restraints_[ri].name());
 
             restraints_[ri].write(os);
 
-            os  << decrIndent << indent << token::END_BLOCK << endl;
+            os.endBlock();
         }
 
-        os  << decrIndent << indent << token::END_BLOCK << nl;
+        os.endBlock();
     }
 }
 
diff --git a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C
index 038d42a31a01f62718f15c1b30e3e2ad85006371..66a7418cd51a3de5bce303b6f488bfc608b1d77e 100644
--- a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C
+++ b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C
@@ -39,10 +39,10 @@ void Foam::RBD::rigidBodyModelState::write(dictionary& dict) const
 
 void Foam::RBD::rigidBodyModelState::write(Ostream& os) const
 {
-    os.writeKeyword("q") << q_ << token::END_STATEMENT << nl;
-    os.writeKeyword("qDot") << qDot_ << token::END_STATEMENT << nl;
-    os.writeKeyword("qDdot") << qDdot_ << token::END_STATEMENT << nl;
-    os.writeKeyword("deltaT") << deltaT_ << token::END_STATEMENT << nl;
+    os.writeEntry("q", q_);
+    os.writeEntry("qDot", qDot_);
+    os.writeEntry("qDdot", qDdot_);
+    os.writeEntry("deltaT", deltaT_);
 }
 
 
diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C
index 915af7f56f1a5fd3dd467a889f74fdf6709c1f08..eed9c95b468797e2966f011df513fd69fe2372c2 100644
--- a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C
+++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C
@@ -44,12 +44,9 @@ void Foam::RBD::rigidBodyMotion::write(Ostream& os) const
 {
     rigidBodyModel::write(os);
 
-    os.writeKeyword("accelerationRelaxation")
-        << aRelax_ << token::END_STATEMENT << nl;
-    os.writeKeyword("accelerationDamping")
-        << aDamp_ << token::END_STATEMENT << nl;
-    os.writeKeyword("report")
-        << report_ << token::END_STATEMENT << nl;
+    os.writeEntry("accelerationRelaxation", aRelax_);
+    os.writeEntry("accelerationDamping", aDamp_);
+    os.writeEntry("report", report_);
 }
 
 
diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
index daeb9adf8d976ad0d9f0e6355842790494cee6d8..e1508439b6e0c4b080f0e52a843f4931e39d2c41 100644
--- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
+++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
@@ -255,16 +255,16 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::write(Ostream& os) const
 {
     pointPatchField<vector>::write(os);
 
-    os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
+    os.writeEntry("rho", rhoName_);
 
     if (rhoName_ == "rhoInf")
     {
-        os.writeKeyword("rhoInf") << rhoInf_ << token::END_STATEMENT << nl;
+        os.writeEntry("rhoInf", rhoInf_);
     }
 
     if (lookupGravity_ == 0 || lookupGravity_ == -2)
     {
-        os.writeKeyword("g") << g_ << token::END_STATEMENT << nl;
+        os.writeEntry("g", g_);
     }
 
     motion_.write(os);
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/axis/sixDoFRigidBodyMotionAxisConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/axis/sixDoFRigidBodyMotionAxisConstraint.C
index 985d7ae4caad77630c7e69d989bb5bb8202f7cb4..0650986bfd2c0de4d8035a11b833b1dc058f6051 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/axis/sixDoFRigidBodyMotionAxisConstraint.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/axis/sixDoFRigidBodyMotionAxisConstraint.C
@@ -116,8 +116,7 @@ void Foam::sixDoFRigidBodyMotionConstraints::axis::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("axis")
-        << axis_ << token::END_STATEMENT << nl;
+    os.writeEntry("axis", axis_);
 }
 
 // ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C
index 7e7189b0d1d4c271852bd0e6d6315963c03fb9df..6da64ea471bed7d6b636a6a408907f144934f12c 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C
@@ -130,10 +130,8 @@ void Foam::sixDoFRigidBodyMotionConstraints::line::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("centreOfRotation")
-        << centreOfRotation_ << token::END_STATEMENT << nl;
-    os.writeKeyword("direction")
-        << direction_ << token::END_STATEMENT << nl;
+    os.writeEntry("centreOfRotation", centreOfRotation_);
+    os.writeEntry("direction", direction_);
 }
 
 // ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C
index 7c291dee64cb0cf8a4906ecac9a04d4bc0cc6582..90190f2c63f9b36f48cdeef191a652d49b966234 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C
@@ -117,10 +117,8 @@ void Foam::sixDoFRigidBodyMotionConstraints::plane::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("centreOfRotation")
-        << centreOfRotation_ << token::END_STATEMENT << nl;
-    os.writeKeyword("normal")
-        << normal_ << token::END_STATEMENT << nl;
+    os.writeEntry("centreOfRotation", centreOfRotation_);
+    os.writeEntry("normal", normal_);
 }
 
 // ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C
index 32021c0747676d5fdae8a76144358176aa103811..5fc63648f20cbeaf8faf5d843cfa5163e0b5f9d2 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C
@@ -116,8 +116,7 @@ void Foam::sixDoFRigidBodyMotionConstraints::point::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("centreOfRotation")
-        << centreOfRotation_ << token::END_STATEMENT << nl;
+    os.writeEntry("centreOfRotation", centreOfRotation_);
 }
 
 // ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
index 2237bf6963c3816b7a425782cb99e84718fc3298..8575a52e774d6a6f59681cb634561e65a02f8156 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
@@ -186,17 +186,10 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("referenceOrientation")
-        << refQ_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("axis")
-        << axis_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("stiffness")
-        << stiffness_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("damping")
-        << damping_ << token::END_STATEMENT << nl;
+    os.writeEntry("referenceOrientation", refQ_);
+    os.writeEntry("axis", axis_);
+    os.writeEntry("stiffness", stiffness_);
+    os.writeEntry("damping", damping_);
 }
 
 // ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C
index 5d70d4db1121e71fe4562b337661de087751f805..1e6d31ce8ea39bec9f5aa1ecc22a75bca5c99c92 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C
@@ -105,8 +105,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearDamper::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("coeff")
-        << coeff_ << token::END_STATEMENT << nl;
+    os.writeEntry("coeff", coeff_);
 }
 
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C
index 40b19b2006cacd0a6cad623eac602e6c464b5147..c993c4d814354eede2c89af0e2abaab0a4ca3683 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C
@@ -125,20 +125,11 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearSpring::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("anchor")
-        << anchor_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("refAttachmentPt")
-        << refAttachmentPt_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("stiffness")
-        << stiffness_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("damping")
-        << damping_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("restLength")
-        << restLength_ << token::END_STATEMENT << nl;
+    os.writeEntry("anchor", anchor_);
+    os.writeEntry("refAttachmentPt", refAttachmentPt_);
+    os.writeEntry("stiffness", stiffness_);
+    os.writeEntry("damping", damping_);
+    os.writeEntry("restLength", restLength_);
 }
 
 // ************************************************************************* //
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C
index f0731256666d03a3d5bb1415f553bac527790598..27f890590a052a9cf0da809e78f8ca0f0d04e37a 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C
@@ -107,7 +107,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularDamper::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("coeff") << coeff_ << token::END_STATEMENT << nl;
+    os.writeEntry("coeff", coeff_);
 }
 
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C
index aa012153ce948e5e75d478ed3f5a8821b6a328d7..35db712d8f4fa784de68dbbbbf53e7be121ab0a5 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C
@@ -145,12 +145,9 @@ void Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularSpring::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("referenceOrientation")
-        << refQ_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("stiffness") << stiffness_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("damping") << damping_ << token::END_STATEMENT << nl;
+    os.writeEntry("referenceOrientation", refQ_);
+    os.writeEntry("stiffness", stiffness_);
+    os.writeEntry("damping", damping_);
 }
 
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C
index 000ca2618f3b27d3a871e7adb0cbe547c33bc2e6..601184e0a5d729f0c0bc76be22c43164ace28d68 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C
@@ -205,27 +205,21 @@ void Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::write
     Ostream& os
 ) const
 {
-    os.writeKeyword("referenceOrientation")
-        << refQ_ << token::END_STATEMENT << nl;
-
-    os.writeKeyword("axis")
-        << axis_ << token::END_STATEMENT << nl;
+    os.writeEntry("referenceOrientation", refQ_);
+    os.writeEntry("axis", axis_);
 
     moment_.write(os);
 
-    os.writeKeyword("angleFormat");
-
     if (convertToDegrees_)
     {
-        os  << "degrees" << token::END_STATEMENT << nl;
+        os.writeEntry("angleFormat", "degrees");
     }
     else
     {
-        os  << "radians" << token::END_STATEMENT << nl;
+        os.writeEntry("angleFormat", "radians");
     }
 
-    os.writeKeyword("damping")
-        << damping_ << token::END_STATEMENT << nl;
+    os.writeEntry("damping", damping_);
 }
 
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
index e04a11d4788b79f8d99f12fc5a5ade050ece1dac..4b54e45b175b5a27f83e819663b85771bf006224 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
@@ -51,67 +51,54 @@ void Foam::sixDoFRigidBodyMotion::write(Ostream& os) const
 {
     motionState_.write(os);
 
-    os.writeKeyword("centreOfMass")
-        << initialCentreOfMass_ << token::END_STATEMENT << nl;
-    os.writeKeyword("initialOrientation")
-        << initialQ_ << token::END_STATEMENT << nl;
-    os.writeKeyword("mass")
-        << mass_ << token::END_STATEMENT << nl;
-    os.writeKeyword("momentOfInertia")
-        << momentOfInertia_ << token::END_STATEMENT << nl;
-    os.writeKeyword("accelerationRelaxation")
-        << aRelax_ << token::END_STATEMENT << nl;
-    os.writeKeyword("accelerationDamping")
-        << aDamp_ << token::END_STATEMENT << nl;
-    os.writeKeyword("report")
-        << report_ << token::END_STATEMENT << nl;
+    os.writeEntry("centreOfMass", initialCentreOfMass_);
+    os.writeEntry("initialOrientation", initialQ_);
+    os.writeEntry("mass", mass_);
+    os.writeEntry("momentOfInertia", momentOfInertia_);
+    os.writeEntry("accelerationRelaxation", aRelax_);
+    os.writeEntry("accelerationDamping", aDamp_);
+    os.writeEntry("report", report_);
 
     if (!restraints_.empty())
     {
-        os  << indent << "restraints" << nl
-            << indent << token::BEGIN_BLOCK << incrIndent << nl;
+        os.beginBlock("restraints");
 
         forAll(restraints_, rI)
         {
-            word restraintType = restraints_[rI].type();
+            const word& restraintType(restraints_[rI].type());
 
-            os  << indent << restraints_[rI].name() << nl
-                << indent << token::BEGIN_BLOCK << incrIndent << endl;
+            os.beginBlock(restraints_[rI].name());
 
-            os.writeKeyword("sixDoFRigidBodyMotionRestraint")
-                << restraintType << token::END_STATEMENT << nl;
+            os.writeEntry("sixDoFRigidBodyMotionRestraint", restraintType);
 
             restraints_[rI].write(os);
 
-            os  << decrIndent << indent << token::END_BLOCK << endl;
+            os.endBlock();
         }
 
-        os  << decrIndent << indent << token::END_BLOCK << nl;
+        os.endBlock();
     }
 
     if (!constraints_.empty())
     {
-        os  << indent << "constraints" << nl
-            << indent << token::BEGIN_BLOCK << incrIndent << nl;
+        os.beginBlock("constraints");
 
         forAll(constraints_, rI)
         {
-            word constraintType = constraints_[rI].type();
+            const word& constraintType(constraints_[rI].type());
 
-            os  << indent << constraints_[rI].name() << nl
-                << indent << token::BEGIN_BLOCK << incrIndent << endl;
+            os.beginBlock(constraints_[rI].name());
 
-            os.writeKeyword("sixDoFRigidBodyMotionConstraint")
-                << constraintType << token::END_STATEMENT << nl;
+            os.writeEntry("sixDoFRigidBodyMotionConstraint", constraintType);
 
             constraints_[rI].sixDoFRigidBodyMotionConstraint::write(os);
 
             constraints_[rI].write(os);
 
-            os  << decrIndent << indent << token::END_BLOCK << endl;
+            os.endBlock();
         }
 
-        os  << decrIndent << indent << token::END_BLOCK << nl;
+        os.endBlock();
     }
 
     if (!solver_.empty())
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
index e24f81f448c8383c1ae45da51086b8d681f82b30..3924adde78c62db3ca2fc6f9697c6b25a072e2ab 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
@@ -41,18 +41,12 @@ void Foam::sixDoFRigidBodyMotionState::write(dictionary& dict) const
 
 void Foam::sixDoFRigidBodyMotionState::write(Ostream& os) const
 {
-    os.writeKeyword("centreOfRotation")
-        << centreOfRotation_ << token::END_STATEMENT << nl;
-    os.writeKeyword("orientation")
-        << Q_ << token::END_STATEMENT << nl;
-    os.writeKeyword("velocity")
-        << v_ << token::END_STATEMENT << nl;
-    os.writeKeyword("acceleration")
-        << a_ << token::END_STATEMENT << nl;
-    os.writeKeyword("angularMomentum")
-        << pi_ << token::END_STATEMENT << nl;
-    os.writeKeyword("torque")
-        << tau_ << token::END_STATEMENT << nl;
+    os.writeEntry("centreOfRotation", centreOfRotation_);
+    os.writeEntry("orientation", Q_);
+    os.writeEntry("velocity", v_);
+    os.writeEntry("acceleration", a_);
+    os.writeEntry("angularMomentum", pi_);
+    os.writeEntry("torque", tau_);
 }
 
 
diff --git a/src/surfMesh/surfZone/surfZone/surfZone.C b/src/surfMesh/surfZone/surfZone/surfZone.C
index e2699243b5c6f5e3d409392a3a8f92a5bc4360a5..b51cdcf60bf4732fce19d2dc5cc0ef6647e0efc7 100644
--- a/src/surfMesh/surfZone/surfZone/surfZone.C
+++ b/src/surfMesh/surfZone/surfZone/surfZone.C
@@ -112,14 +112,13 @@ void Foam::surfZone::write(Ostream& os) const
 
 void Foam::surfZone::writeDict(Ostream& os) const
 {
-    os  << indent << name() << nl
-        << indent << token::BEGIN_BLOCK << incrIndent << nl;
+    os.beginBlock(name());
 
     surfZoneIdentifier::write(os);
-    os.writeKeyword("nFaces")    << size()  << token::END_STATEMENT << nl;
-    os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl;
+    os.writeEntry("nFaces", size());
+    os.writeEntry("startFace", start());
 
-    os  << decrIndent << indent << token::END_BLOCK << endl;
+    os.endBlock();
 }
 
 
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C
index 751e1ece9e5006251432a1c89a135a50b769241b..f69354958135908ade696c3b4539c8387a12b1a8 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C
@@ -187,7 +187,7 @@ void Foam::radiation::MarshakRadiationFvPatchScalarField::write
 ) const
 {
     mixedFvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "T", "T", TName_);
+    os.writeEntryIfDifferent<word>("T", "T", TName_);
 }
 
 
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
index 70423f1a722fc6adcb5d02356a1aa19f45c26ba8..ca42809813ebe9c02b20e57782ef9e7d3db05808 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
@@ -248,8 +248,8 @@ void Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField::write
 ) const
 {
     mixedFvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "T", "T", TName_);
-    os.writeKeyword("solarLoad") << solarLoad_ << token::END_STATEMENT << nl;
+    os.writeEntryIfDifferent<word>("T", "T", TName_);
+    os.writeEntry("solarLoad", solarLoad_);
 }
 
 
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
index 44e347f28c94cf2143376623e7e9079fee15dbc3..f7adff2068e942b167f8b9b8566dc3f7d82d6d3c 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
@@ -192,7 +192,7 @@ write
 {
     fixedValueFvPatchScalarField::write(os);
     qro_.writeEntry("qro", os);
-    os.writeKeyword("solarLoad") << solarLoad_ << token::END_STATEMENT << nl;
+    os.writeEntry("solarLoad", solarLoad_);
 }
 
 
diff --git a/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReaction.C b/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReaction.C
index 18d2a9367c88b7156f00416475d4142de400cacb..da945226ce33727cce0d7c576c5a5760b28bdd82 100644
--- a/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReaction.C
+++ b/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReaction.C
@@ -112,8 +112,7 @@ template<class ReactionThermo>
 void Foam::solidReaction<ReactionThermo>::write(Ostream& os) const
 {
     OStringStream reaction;
-    os.writeKeyword("reaction") << solidReactionStr(reaction)
-        << token::END_STATEMENT << nl;
+    os.writeEntry("reaction", solidReactionStr(reaction));
 }
 
 
diff --git a/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReactionI.H b/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReactionI.H
index 9bad3ba77840727756338bb93e87ba9b787388e9..897904f507398e6ea90096bebe875d5b55ce2e86 100644
--- a/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReactionI.H
+++ b/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReactionI.H
@@ -40,7 +40,7 @@ inline Ostream& operator<<
 )
 {
     OStringStream reaction;
-    os << r.solidReactionStr(reaction)<< token::END_STATEMENT <<nl;
+    os << r.solidReactionStr(reaction) << token::END_STATEMENT <<nl;
     return os;
 }
 
diff --git a/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H b/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H
index 1ab4bcb50dda0bba6ba25b76dd9043d2ebae95c5..b9e8689047311aa2cfd223cc2c227abde45bca17 100644
--- a/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H
+++ b/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H
@@ -77,9 +77,9 @@ inline Foam::scalar Foam::solidArrheniusReactionRate::operator()
 
 inline void Foam::solidArrheniusReactionRate::write(Ostream& os) const
 {
-    os.writeKeyword("A") << A_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Tcrit") << Tcrit_ << token::END_STATEMENT << nl;
+    os.writeEntry("A", A_);
+    os.writeEntry("Ta", Ta_);
+    os.writeEntry("Tcrit", Tcrit_);
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.C b/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.C
index 255cf2b93fd9b8c3f249f54c98d12993c466d1a5..2911baca562bfc3bbf3554d710b81a7399298746 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.C
+++ b/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.C
@@ -196,19 +196,13 @@ void Foam::NonEquilibriumReversibleReaction
 {
     ReactionType<ReactionThermo>::write(os);
 
-    os  << indent << "forward" << nl;
-    os  << indent << token::BEGIN_BLOCK << nl;
-    os  << incrIndent;
+    os.beginBlock("forward");
     fk_.write(os);
-    os  << decrIndent;
-    os  << indent << token::END_BLOCK << nl;
+    os.endBlock();
 
-    os  << indent << "reverse" << nl;
-    os  << indent << token::BEGIN_BLOCK << nl;
-    os  << incrIndent;
+    os.beginBlock("reverse");
     rk_.write(os);
-    os  << decrIndent;
-    os  << indent << token::END_BLOCK << nl;
+    os.endBlock();
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C
index 5da2f878c4b72175943a1a175bb6a3aeee484281..913f11a712beb26dba9b8f711ef347e6c7714482 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C
+++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C
@@ -386,8 +386,7 @@ template<class ReactionThermo>
 void Foam::Reaction<ReactionThermo>::write(Ostream& os) const
 {
     OStringStream reaction;
-    os.writeKeyword("reaction") << reactionStr(reaction)
-        << token::END_STATEMENT << nl;
+    os.writeEntry("reaction", reactionStr(reaction));
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C
index 6d3f2539fc3459496a136072502884797555aa77..f2a1e0c698dcaafaeb1a13ba305d82ffd27d77f2 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C
+++ b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C
@@ -106,20 +106,21 @@ bool Foam::ReactionList<ThermoType>::readReactionDict()
 template<class ThermoType>
 void Foam::ReactionList<ThermoType>::write(Ostream& os) const
 {
-    os  << "reactions" << nl;
-    os  << token::BEGIN_BLOCK << incrIndent << nl;
+    os.beginBlock("reactions");
 
     forAllConstIter(typename SLPtrList<Reaction<ThermoType>>, *this, iter)
     {
         const Reaction<ThermoType>& r = iter();
-        os  << indent << r.name() << nl
-            << indent << token::BEGIN_BLOCK << incrIndent << nl;
-        os.writeKeyword("type") << r.type() << token::END_STATEMENT << nl;
+
+        os.beginBlock(r.name());
+
+        os.writeEntry("type", r.type());
         r.write(os);
-        os  << decrIndent << indent << token::END_BLOCK << nl;
+
+        os.endBlock();
     }
 
-    os << decrIndent << token::END_BLOCK << nl;
+    os.endBlock();
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H
index 49ec48c71e47ae0c3b6b3c049b20be3a9d8c629d..75bed82ef27039299ae3c5db202233f9352bd750 100644
--- a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H
@@ -77,9 +77,9 @@ inline Foam::scalar Foam::ArrheniusReactionRate::operator()
 
 inline void Foam::ArrheniusReactionRate::write(Ostream& os) const
 {
-    os.writeKeyword("A") << A_ << token::END_STATEMENT << nl;
-    os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl;
+    os.writeEntry("A", A_);
+    os.writeEntry("beta", beta_);
+    os.writeEntry("Ta", Ta_);
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H
index fff348d4810fac34d746bfba8cfbc66bcd383c86..1ff54cd5f43091bbd59453146ac71442f77e1048 100644
--- a/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H
@@ -68,10 +68,10 @@ Foam::FallOffReactionRate<ReactionRate, FallOffFunction>::operator()
     const scalarField& c
 ) const
 {
-    scalar k0 = k0_(p, T, c);
-    scalar kInf = kInf_(p, T, c);
+    const scalar k0 = k0_(p, T, c);
+    const scalar kInf = kInf_(p, T, c);
 
-    scalar Pr = k0*thirdBodyEfficiencies_.M(c)/kInf;
+    const scalar Pr = k0*thirdBodyEfficiencies_.M(c)/kInf;
 
     return kInf*(Pr/(1 + Pr))*F_(T, Pr);
 }
@@ -83,33 +83,21 @@ inline void Foam::FallOffReactionRate<ReactionRate, FallOffFunction>::write
     Ostream& os
 ) const
 {
-    os  << indent << "k0" << nl;
-    os  << indent << token::BEGIN_BLOCK << nl;
-    os  << incrIndent;
+    os.beginBlock("k0");
     k0_.write(os);
-    os  << decrIndent;
-    os  << indent << token::END_BLOCK << nl;
+    os.endBlock();
 
-    os  << indent << "kInf" << nl;
-    os  << indent << token::BEGIN_BLOCK << nl;
-    os  << incrIndent;
+    os.beginBlock("kInf");
     kInf_.write(os);
-    os  << decrIndent;
-    os  << indent << token::END_BLOCK << nl;
+    os.endBlock();
 
-    os  << indent << "F" << nl;
-    os  << indent << token::BEGIN_BLOCK << nl;
-    os  << incrIndent;
+    os.beginBlock("F");
     F_.write(os);
-    os  << decrIndent;
-    os  << indent << token::END_BLOCK << nl;
+    os.endBlock();
 
-    os  << indent << "thirdBodyEfficiencies" << nl;
-    os  << indent << token::BEGIN_BLOCK << nl;
-    os  << incrIndent;
+    os.beginBlock("thirdBodyEfficiencies");
     thirdBodyEfficiencies_.write(os);
-    os  << decrIndent;
-    os  << indent << token::END_BLOCK << nl;
+    os.endBlock();
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H
index 7d2c9ecd791b158a1ae644fdfe4010bddc3bd725..992b3d9ea429023a2eb630867bb6727081fbd1a2 100644
--- a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H
@@ -100,11 +100,11 @@ inline Foam::scalar Foam::LandauTellerReactionRate::operator()
 
 inline void Foam::LandauTellerReactionRate::write(Ostream& os) const
 {
-    os.writeKeyword("A") << A_ << token::END_STATEMENT << nl;
-    os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("B") << B_ << token::END_STATEMENT << nl;
-    os.writeKeyword("C") << C_ << token::END_STATEMENT << nl;
+    os.writeEntry("A", A_);
+    os.writeEntry("beta", beta_);
+    os.writeEntry("Ta", Ta_);
+    os.writeEntry("B", B_);
+    os.writeEntry("C", C_);
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H
index 68cce0350da547c5abee5108da1bc10e1c319a2a..58975727b4e71f2595973c516edfb6dc284acbdf 100644
--- a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H
@@ -67,11 +67,11 @@ inline Foam::scalar Foam::SRIFallOffFunction::operator()
 
 inline void Foam::SRIFallOffFunction::write(Ostream& os) const
 {
-    os.writeKeyword("a") << a_ << token::END_STATEMENT << nl;
-    os.writeKeyword("b") << b_ << token::END_STATEMENT << nl;
-    os.writeKeyword("c") << c_ << token::END_STATEMENT << nl;
-    os.writeKeyword("d") << d_ << token::END_STATEMENT << nl;
-    os.writeKeyword("e") << e_ << token::END_STATEMENT << nl;
+    os.writeEntry("a", a_);
+    os.writeEntry("b", b_);
+    os.writeEntry("c", c_);
+    os.writeEntry("d", d_);
+    os.writeEntry("e", e_);
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H
index 1913985c18de2017f72a3e9548f527afe1213b96..ab654e2103e1381f6b056ace13e882e8e828b7b9 100644
--- a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H
@@ -77,10 +77,10 @@ inline Foam::scalar Foam::TroeFallOffFunction::operator()
 
 inline void Foam::TroeFallOffFunction::write(Ostream& os) const
 {
-    os.writeKeyword("alpha") << alpha_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Tsss") << Tsss_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Ts") << Ts_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Tss") << Tss_ << token::END_STATEMENT << nl;
+    os.writeEntry("alpha", alpha_);
+    os.writeEntry("Tsss", Tsss_);
+    os.writeEntry("Ts", Ts_);
+    os.writeEntry("Tss", Tss_);
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H
index fcf9b808c3bcc6c91d6a866aefe02d7523b25825..40dd268003271ec88e817839fa0d2385beeffe75 100644
--- a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H
@@ -84,10 +84,10 @@ inline Foam::scalar Foam::powerSeriesReactionRate::operator()
 
 inline void Foam::powerSeriesReactionRate::write(Ostream& os) const
 {
-    os.writeKeyword("A") << A_ << token::END_STATEMENT << nl;
-    os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("coeffs") << coeffs_ << token::END_STATEMENT << nl;
+    os.writeEntry("A", A_);
+    os.writeEntry("beta", beta_);
+    os.writeEntry("Ta", Ta_);
+    os.writeEntry("coeffs", coeffs_);
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H
index 97a0e8eeed99e0d17827857c61c1a56c5b7e54a7..bcec76284b9a6918d12f8354a8ad4114ac7cf396 100644
--- a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H
@@ -102,7 +102,7 @@ inline void Foam::thirdBodyEfficiencies::write(Ostream& os) const
         coeffs[i].second() = operator[](i);
     }
 
-    os.writeKeyword("coeffs") << coeffs << token::END_STATEMENT << nl;
+    os.writeEntry("coeffs", coeffs);
 }
 
 
diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.C b/src/thermophysicalModels/specie/transport/const/constTransport.C
index 8b709c9c82161a3976341b6c5f1f47f8d987370a..2408dfb9cc6d38f469f112eb91e7a3611922b1c4 100644
--- a/src/thermophysicalModels/specie/transport/const/constTransport.C
+++ b/src/thermophysicalModels/specie/transport/const/constTransport.C
@@ -42,17 +42,19 @@ Foam::constTransport<Thermo>::constTransport(const dictionary& dict)
 template<class Thermo>
 void Foam::constTransport<Thermo>::constTransport::write(Ostream& os) const
 {
-    os  << this->name() << endl;
-    os  << token::BEGIN_BLOCK  << incrIndent << nl;
+    os.beginBlock(this->name());
 
     Thermo::write(os);
 
-    dictionary dict("transport");
-    dict.add("mu", mu_);
-    dict.add("Pr", 1.0/rPr_);
-    os  << indent << dict.dictName() << dict;
+    // Entries in dictionary format
+    {
+        os.beginBlock("transport");
+        os.writeEntry("mu", mu_);
+        os.writeEntry("Pr", scalar(1.0/rPr_));
+        os.endBlock();
+    }
 
-    os  << decrIndent << token::END_BLOCK << nl;
+    os.endBlock();
 }
 
 
diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C
index 27366f2893142fd005602359a267426b0c8e58c6..b35e2003df6c7da7adc0917b1f93330f3abb50e9 100644
--- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C
+++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C
@@ -57,25 +57,27 @@ Foam::logPolynomialTransport<Thermo, PolySize>::logPolynomialTransport
 template<class Thermo, int PolySize>
 void Foam::logPolynomialTransport<Thermo, PolySize>::write(Ostream& os) const
 {
-    os  << this->name() << endl;
-    os  << token::BEGIN_BLOCK << incrIndent << nl;
+    os.beginBlock(this->name());
 
     Thermo::write(os);
 
-    dictionary dict("transport");
-    dict.add
-    (
-        word("muLogCoeffs<" + Foam::name(PolySize) + '>'),
-        muCoeffs_
-    );
-    dict.add
-    (
-        word("kappaLogCoeffs<" + Foam::name(PolySize) + '>'),
-        kappaCoeffs_
-    );
-    os  << indent << dict.dictName() << dict;
+    // Entries in dictionary format
+    {
+        os.beginBlock("transport");
+        os.writeEntry
+        (
+            word("muLogCoeffs<" + Foam::name(PolySize) + '>'),
+            muCoeffs_
+        );
+        os.writeEntry
+        (
+            word("kappaLogCoeffs<" + Foam::name(PolySize) + '>'),
+            kappaCoeffs_
+        );
+        os.endBlock();
+    }
 
-    os  << decrIndent << token::END_BLOCK << nl;
+    os.endBlock();
 }
 
 
diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C
index cb907dd01d54396cdd818d80b94584c7d2c16338..88331a715ca7c7ade509b2790ddccacf92bb3c99 100644
--- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C
+++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C
@@ -57,25 +57,27 @@ Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport
 template<class Thermo, int PolySize>
 void Foam::polynomialTransport<Thermo, PolySize>::write(Ostream& os) const
 {
-    os  << this->name() << endl;
-    os  << token::BEGIN_BLOCK << incrIndent << nl;
+    os.beginBlock(this->name());
 
     Thermo::write(os);
 
-    dictionary dict("transport");
-    dict.add
-    (
-        word("muCoeffs<" + Foam::name(PolySize) + '>'),
-        muCoeffs_
-    );
-    dict.add
-    (
-        word("kappaCoeffs<" + Foam::name(PolySize) + '>'),
-        kappaCoeffs_
-    );
-    os  << indent << dict.dictName() << dict;
+    // Entries in dictionary format
+    {
+        os.beginBlock("transport");
+        os.writeEntry
+        (
+            word("muCoeffs<" + Foam::name(PolySize) + '>'),
+            muCoeffs_
+        );
+        os.writeEntry
+        (
+            word("kappaCoeffs<" + Foam::name(PolySize) + '>'),
+            kappaCoeffs_
+        );
+        os.endBlock();
+    }
 
-    os  << decrIndent << token::END_BLOCK << nl;
+    os.endBlock();
 }
 
 
diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C
index 1fa07890149b1842532843dc6faae2b2c18ffee1..d3576c52ee3d3b95421247e29f74433bfa701714 100644
--- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C
+++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C
@@ -68,17 +68,19 @@ Foam::sutherlandTransport<Thermo>::sutherlandTransport
 template<class Thermo>
 void Foam::sutherlandTransport<Thermo>::write(Ostream& os) const
 {
-    os  << this->specie::name() << endl
-        << token::BEGIN_BLOCK  << incrIndent << nl;
+    os.beginBlock(this->specie::name());
 
     Thermo::write(os);
 
-    dictionary dict("transport");
-    dict.add("As", As_);
-    dict.add("Ts", Ts_);
+    // Entries in dictionary format
+    {
+        os.beginBlock("transport");
+        os.writeEntry("As", As_);
+        os.writeEntry("Ts", Ts_);
+        os.endBlock();
+    }
 
-    os  << indent << dict.dictName() << dict
-        << decrIndent << token::END_BLOCK << nl;
+    os.endBlock();
 }
 
 
diff --git a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C
index e12b63b72534ec5048951f78aa98f4c20870fa5b..3f7bf842d0dfa375a7e28fee050fe9c17fa63d1f 100644
--- a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C
@@ -727,19 +727,19 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::write
 ) const
 {
     mixedFvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "p", "p", pName_);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
-    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
-    writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
-    writeEntryIfDifferent<word>(os, "Tnbr", "T", TnbrName_);
-    writeEntryIfDifferent<word>(os, "qrNbr", "none", qrNbrName_);
-    writeEntryIfDifferent<word>(os, "qr", "none", qrName_);
+    os.writeEntryIfDifferent<word>("p", "p", pName_);
+    os.writeEntryIfDifferent<word>("U", "U", UName_);
+    os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
+    os.writeEntryIfDifferent<word>("mu", "thermo:mu", muName_);
+    os.writeEntryIfDifferent<word>("Tnbr", "T", TnbrName_);
+    os.writeEntryIfDifferent<word>("qrNbr", "none", qrNbrName_);
+    os.writeEntryIfDifferent<word>("qr", "none", qrName_);
 
     if (fluid_)
     {
         os.writeEntry("mode", massModeTypeNames_[mode_]);
 
-        writeEntryIfDifferent<word>(os, "specie", "none", specieName_);
+        os.writeEntryIfDifferent<word>("specie", "none", specieName_);
 
         os.writeEntry("carrierMolWeight", Mcomp_);
 
diff --git a/src/transportModels/interfaceProperties/surfaceTensionModels/constant/constantSurfaceTension.C b/src/transportModels/interfaceProperties/surfaceTensionModels/constant/constantSurfaceTension.C
index 9a19092e0464a865daee7a7c45adea035e859a31..58593465835b45c898a918d26ea7f2effdb1f94e 100644
--- a/src/transportModels/interfaceProperties/surfaceTensionModels/constant/constantSurfaceTension.C
+++ b/src/transportModels/interfaceProperties/surfaceTensionModels/constant/constantSurfaceTension.C
@@ -106,10 +106,8 @@ bool Foam::surfaceTensionModels::constant::writeData(Ostream& os) const
         os  << sigma_ << token::END_STATEMENT << nl;
         return os.good();
     }
-    else
-    {
-        return false;
-    }
+
+    return false;
 }
 
 
diff --git a/src/transportModels/interfaceProperties/surfaceTensionModels/temperatureDependent/temperatureDependentSurfaceTension.C b/src/transportModels/interfaceProperties/surfaceTensionModels/temperatureDependent/temperatureDependentSurfaceTension.C
index 03fb3a106c75cbd13f791b2c9c63a1d37cf68472..0cf8f63b8bf551840f9973448e7486b1c3846501 100644
--- a/src/transportModels/interfaceProperties/surfaceTensionModels/temperatureDependent/temperatureDependentSurfaceTension.C
+++ b/src/transportModels/interfaceProperties/surfaceTensionModels/temperatureDependent/temperatureDependentSurfaceTension.C
@@ -128,10 +128,8 @@ bool Foam::surfaceTensionModels::temperatureDependent::writeData
         os  << sigma_() << token::END_STATEMENT << nl;
         return os.good();
     }
-    else
-    {
-        return false;
-    }
+
+    return false;
 }
 
 
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C
index c94e36ce778adc61ee8581701f93557a4f13134e..4594202d38c2a9dfd5f206e7911de30447fc19f3 100644
--- a/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C
@@ -113,7 +113,7 @@ void Foam::constantAlphaContactAngleFvPatchScalarField::write
 ) const
 {
     alphaContactAngleFvPatchScalarField::write(os);
-    os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl;
+    os.writeEntry("theta0", theta0_);
     writeEntry("value", os);
 }
 
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C
index b4a9db0062ae45939796add46cf81e95353f9c5a..e488fcd9ebbaa6ffd4c24c074a2ff892e41f1d81 100644
--- a/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C
@@ -146,10 +146,10 @@ Foam::dynamicAlphaContactAngleFvPatchScalarField::theta
 void Foam::dynamicAlphaContactAngleFvPatchScalarField::write(Ostream& os) const
 {
     alphaContactAngleFvPatchScalarField::write(os);
-    os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl;
-    os.writeKeyword("uTheta") << uTheta_ << token::END_STATEMENT << nl;
-    os.writeKeyword("thetaA") << thetaA_ << token::END_STATEMENT << nl;
-    os.writeKeyword("thetaR") << thetaR_ << token::END_STATEMENT << nl;
+    os.writeEntry("theta0", theta0_);
+    os.writeEntry("uTheta", uTheta_);
+    os.writeEntry("thetaA", thetaA_);
+    os.writeEntry("thetaR", thetaR_);
     writeEntry("value", os);
 }
 
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C
index 5eba3cc0b6c371746f979128a3aa7fe8e86c456b..8dfa30a477c0447f21f3de954e2e7d0703fe9b70 100644
--- a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C
@@ -121,7 +121,7 @@ void Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::write
 ) const
 {
     alphaContactAngleFvPatchScalarField::write(os);
-    writeEntryIfDifferent<word>(os, "T", "T", TName_);
+    os.writeEntryIfDifferent<word>("T", "T", TName_);
     theta0_->writeData(os);
     writeEntry("value", os);
 }
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C
index d014b1c6fcd997b8f44814186f88da599d7f7fc0..3ed663eb687be76f75352d50d187c54e81ea8715 100644
--- a/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C
@@ -131,10 +131,10 @@ void Foam::timeVaryingAlphaContactAngleFvPatchScalarField::write
 ) const
 {
     alphaContactAngleFvPatchScalarField::write(os);
-    os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl;
-    os.writeKeyword("thetaT0") << thetaT0_ << token::END_STATEMENT << nl;
-    os.writeKeyword("te") << te_ << token::END_STATEMENT << nl;
-    os.writeKeyword("thetaTe") << thetaTe_ << token::END_STATEMENT << nl;
+    os.writeEntry("t0", t0_);
+    os.writeEntry("thetaT0", thetaT0_);
+    os.writeEntry("te", te_);
+    os.writeEntry("thetaTe", thetaTe_);
     writeEntry("value", os);
 }
 
diff --git a/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C b/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C
index 6117513bc992aa6ce37ccb7994291e9eb97c3d42..4e57fcba84f47ba8104ffc0a7f511942bb3fbba2 100644
--- a/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C
+++ b/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C
@@ -120,8 +120,7 @@ void Foam::waveAlphaFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
 
-    os.writeKeyword("waveDictName") << waveDictName_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("waveDictName", waveDictName_);
 
     writeEntry("value", os);
 }
diff --git a/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C b/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C
index a237aabbc1705ebd897bc189ba4766f216af8353..83fa6c64eae9c5bbfa4fc9ff4ea82d340c6b94d3 100644
--- a/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C
+++ b/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C
@@ -120,8 +120,7 @@ void Foam::waveVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchField<vector>::write(os);
 
-    os.writeKeyword("waveDictName") << waveDictName_
-        << token::END_STATEMENT << nl;
+    os.writeEntry("waveDictName", waveDictName_);
 
     writeEntry("value", os);
 }