diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C
index c4e6b21162333db17eb973a51f5a75934cfa8693..4790e0ffc2f559a1460581b14b9651f50dec323c 100644
--- a/applications/utilities/mesh/manipulation/setSet/setSet.C
+++ b/applications/utilities/mesh/manipulation/setSet/setSet.C
@@ -405,64 +405,71 @@ bool doCommand
                 backup(mesh, setName, currentSet, setName + "_old");
             }
 
-            if (action == topoSetSource::CLEAR)
+            switch (action)
             {
-                // Already handled above by not reading
-            }
-            else if (action == topoSetSource::INVERT)
-            {
-                currentSet.invert(currentSet.maxSize(mesh));
-            }
-            else if (action == topoSetSource::LIST)
-            {
-                currentSet.writeDebug(Pout, mesh, 100);
-                Pout<< endl;
-            }
-            else if (action == topoSetSource::SUBSET)
-            {
-                if (is >> sourceType)
+                case topoSetSource::CLEAR:
                 {
-                    autoPtr<topoSetSource> setSource
-                    (
-                        topoSetSource::New
+                    // Already handled above by not reading
+                    break;
+                }
+                case topoSetSource::INVERT:
+                {
+                    currentSet.invert(currentSet.maxSize(mesh));
+                    break;
+                }
+                case topoSetSource::LIST:
+                {
+                    currentSet.writeDebug(Pout, mesh, 100);
+                    Pout<< endl;
+                    break;
+                }
+                case topoSetSource::SUBSET:
+                {
+                    if (is >> sourceType)
+                    {
+                        autoPtr<topoSetSource> setSource
+                        (
+                            topoSetSource::New
+                            (
+                                sourceType,
+                                mesh,
+                                is
+                            )
+                        );
+
+                        // Backup current set.
+                        topoSet oldSet
                         (
-                            sourceType,
                             mesh,
-                            is
-                        )
-                    );
+                            currentSet.name() + "_old2",
+                            currentSet
+                        );
 
-                    // Backup current set.
-                    topoSet oldSet
-                    (
-                        mesh,
-                        currentSet.name() + "_old2",
-                        currentSet
-                    );
+                        currentSet.clear();
+                        currentSet.resize(oldSet.size());
+                        setSource().applyToSet(topoSetSource::NEW, currentSet);
 
-                    currentSet.clear();
-                    currentSet.resize(oldSet.size());
-                    setSource().applyToSet(topoSetSource::NEW, currentSet);
-
-                    // Combine new value of currentSet with old one.
-                    currentSet.subset(oldSet);
+                        // Combine new value of currentSet with old one.
+                        currentSet.subset(oldSet);
+                    }
+                    break;
                 }
-            }
-            else
-            {
-                if (is >> sourceType)
+                default:
                 {
-                    autoPtr<topoSetSource> setSource
-                    (
-                        topoSetSource::New
+                    if (is >> sourceType)
+                    {
+                        autoPtr<topoSetSource> setSource
                         (
-                            sourceType,
-                            mesh,
-                            is
-                        )
-                    );
-
-                    setSource().applyToSet(action, currentSet);
+                            topoSetSource::New
+                            (
+                                sourceType,
+                                mesh,
+                                is
+                            )
+                        );
+
+                        setSource().applyToSet(action, currentSet);
+                    }
                 }
             }
 
@@ -532,7 +539,7 @@ bool doCommand
         }
     }
 
-    return error;
+    return !error;
 }
 
 
@@ -612,31 +619,36 @@ commandStatus parseType
         switch(stat)
         {
             case polyMesh::UNCHANGED:
+            {
                 Pout<< "    mesh not changed." << endl;
-            break;
-
+                break;
+            }
             case polyMesh::POINTS_MOVED:
+            {
                 Pout<< "    points moved; topology unchanged." << endl;
-            break;
-
+                break;
+            }
             case polyMesh::TOPO_CHANGE:
+            {
                 Pout<< "    topology changed; patches unchanged." << nl
                     << "    ";
                 printMesh(runTime, mesh);
-
-            break;
-
+                break;
+            }
             case polyMesh::TOPO_PATCH_CHANGE:
+            {
                 Pout<< "    topology changed and patches changed." << nl
                     << "    ";
                 printMesh(runTime, mesh);
 
-            break;
-
+                break;
+            }
             default:
+            {
                 FatalErrorIn("parseType") << "Illegal mesh update state "
                     << stat  << abort(FatalError);
-            break;
+                break;
+            }
         }
 
         return INVALID;
diff --git a/bin/upgradeTurbulenceProperties b/bin/upgradeTurbulenceProperties
new file mode 100755
index 0000000000000000000000000000000000000000..35de08f0937380d713bc10626ed25b11c3e15791
--- /dev/null
+++ b/bin/upgradeTurbulenceProperties
@@ -0,0 +1,85 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 1991-2007 OpenCFD Ltd.
+#    \\/     M anipulation  |
+#------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software; you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by the
+#     Free Software Foundation; either version 2 of the License, or (at your
+#     option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM; if not, write to the Free Software Foundation,
+#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Script
+#     upgradeTurbulenceProperties
+#
+# Description
+#     Upgrade the turbulenceProperties dictionary to the new format employed
+#     in OpenFOAM version 1.5
+#     - RAS turbulence models now defined by the RASProperties dictionary,
+#       and RASModel keyword, and
+#     - LES turbulence models now defined by the LESProperties dictionary,
+#       and LESModel keyword.
+#
+#------------------------------------------------------------------------------
+
+printUsage()
+{
+    echo "Usage: `basename $0` <turbulenceProperties>"
+    echo "    Where <turbulenceProperties> is the full path to the"
+    echo "    turbulenceProperties dictionary"
+}
+
+convertDict()
+{
+    echo "    Identified $1 turbulence model"
+
+    sed -e "s/turbulenceProperties/$1Properties/" \
+        -e "s/$2/$1Model/" \
+        -e "s/[a-zA-Z0-9]* [ ]*\[[0-9 ]*\]//" \
+        $3 > "$outputPath/$1Properties"
+
+    echo "    written $1Properties to $outputPath/"
+}
+
+outputPath=`dirname $1`
+
+if [ $# -ne 1 ]; then
+    printUsage
+    exit 1
+elif [ ! -e $1 ]; then
+    echo "    Error: file $1 does not exist"
+    echo ""
+    printUsage
+    exit 1
+fi
+
+# Identify type of turbulence model
+RAS=`grep turbulenceModel $1`
+LES=`grep LESmodel $1`
+
+if [ -n "$RAS" ]; then
+    convertDict "RAS" "turbulenceModel" $1
+elif [ -n "$LES" ]; then
+    convertDict "LES" "LESmodel" $1
+else
+    echo "Unable to determine turbulence model type - nothing changed"
+    exit 1
+fi
+
+echo "done."
+
+exit 0
diff --git a/src/postProcessing/foamCalcFunctions/field/components/components.C b/src/postProcessing/foamCalcFunctions/field/components/components.C
index 644771023b65a1e76a8b25b9416f75bbd91f33f1..95f2421dffc4b61cf8e217f629c0978b85bcbdb7 100644
--- a/src/postProcessing/foamCalcFunctions/field/components/components.C
+++ b/src/postProcessing/foamCalcFunctions/field/components/components.C
@@ -111,6 +111,8 @@ void Foam::calcTypes::components::calc
                 mesh,
                 processed
             );
+            writeComponentFields<symmTensor>(fieldHeader, mesh, processed);
+            writeComponentFields<tensor>(fieldHeader, mesh, processed);
 
             if (!processed)
             {
diff --git a/tutorials/rhoSonicFoam/shockTube/system/sampleDict b/tutorials/rhoSonicFoam/shockTube/system/sampleDict
index 7c59b17bef976ce75dd5332ad5864b66ad030c28..95b819ee7496589ac0237a71a1c7bad9789fe3fd 100644
--- a/tutorials/rhoSonicFoam/shockTube/system/sampleDict
+++ b/tutorials/rhoSonicFoam/shockTube/system/sampleDict
@@ -25,13 +25,14 @@ FoamFile
 
 interpolationScheme cellPoint;
 
-writeFormat     raw;
+setFormat     raw;
 
-sampleSets      
+sets      
 (
-    uniform
+    data
     {
-        name            data;
+        type            uniform;
+
         axis            x;
         start           (-4.995 0 0);
         end             (4.995  0 0);
@@ -39,6 +40,9 @@ sampleSets
     }
 );
 
+surfaces
+();
+
 fields          
 (
     T
diff --git a/tutorials/solidDisplacementFoam/plateHole/system/sampleDict b/tutorials/solidDisplacementFoam/plateHole/system/sampleDict
index adf21bd6cf68ae63e3563628f966aaf7cf248610..056f0894fff493ce56989f8246ef780cc677197e 100644
--- a/tutorials/solidDisplacementFoam/plateHole/system/sampleDict
+++ b/tutorials/solidDisplacementFoam/plateHole/system/sampleDict
@@ -25,13 +25,13 @@ FoamFile
 
 interpolationScheme cellPoint;
 
-writeFormat     raw;
+setFormat     raw;
 
-sampleSets      
+sets
 (
-    uniform 
+    leftPatch
     {
-        name            leftPatch;
+        type            uniform;
         axis            y;
         start           (0 0.5 0.25);
         end             (0 2 0.25);
@@ -39,10 +39,12 @@ sampleSets
     }
 );
 
-fields          
+surfaces
+();
+
+fields
 (
     sigmaxx
 );
 
-
 // ************************************************************************* //