diff --git a/applications/utilities/preProcessing/mapFields/MapVolFields.H b/applications/utilities/preProcessing/mapFields/MapVolFields.H
index d72ae2948dec5f75fbf3b0749b5c54a608a2a08b..affbbb68f0793e0d91ce682c15959a6b5236330e 100644
--- a/applications/utilities/preProcessing/mapFields/MapVolFields.H
+++ b/applications/utilities/preProcessing/mapFields/MapVolFields.H
@@ -29,7 +29,6 @@ License
 
 #include "GeometricField.H"
 #include "meshToMesh.H"
-#include "cuttingPlane.H"
 #include "IOobjectList.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/Make/files b/src/sampling/Make/files
index 991057a157d640b8a0070c58e4e12967a74da0fe..c20d4aa7a6838ded07b2abede4248a20094bd485 100644
--- a/src/sampling/Make/files
+++ b/src/sampling/Make/files
@@ -12,11 +12,13 @@ sampledSet/midPointAndFace/midPointAndFaceSet.C
 sampledSet/sampledSets/sampledSets.C
 sampledSet/sampledSetsFunctionObject/sampledSetsFunctionObject.C
 
-sampledSet/writers/writer/writers.C
-sampledSet/writers/raw/rawWriters.C
-sampledSet/writers/xmgr/xmgrWriters.C
-sampledSet/writers/gnuplot/gnuplotWriters.C
-sampledSet/writers/jplot/jplotWriters.C
+setWriters = sampledSet/writers
+
+$(setWriters)/writers.C
+$(setWriters)/gnuplot/gnuplotSetWriterRunTime.C
+$(setWriters)/jplot/jplotSetWriterRunTime.C
+$(setWriters)/raw/rawSetWriterRunTime.C
+$(setWriters)/xmgrace/xmgraceSetWriterRunTime.C
 
 cuttingPlane/cuttingPlane.C
 
@@ -31,13 +33,15 @@ sampledSurface/sampledSurface/sampledSurface.C
 sampledSurface/sampledSurfaces/sampledSurfaces.C
 sampledSurface/sampledSurfacesFunctionObject/sampledSurfacesFunctionObject.C
 
-sampledSurface/writers/surfaceWriters.C
-sampledSurface/writers/foamFile/foamFileWriters.C
-sampledSurface/writers/dx/dxWriters.C
-sampledSurface/writers/raw/rawSurfaceWriters.C
-sampledSurface/writers/vtk/vtkWriters.C
-sampledSurface/writers/stl/stlWriters.C
-sampledSurface/writers/null/nullWriters.C
+surfWriters = sampledSurface/writers
+
+$(surfWriters)/surfaceWriters.C
+$(surfWriters)/dx/dxSurfaceWriterRunTime.C
+$(surfWriters)/foamFile/foamFileSurfaceWriterRunTime.C
+$(surfWriters)/null/nullSurfaceWriterRunTime.C
+$(surfWriters)/raw/rawSurfaceWriterRunTime.C
+$(surfWriters)/stl/stlSurfaceWriterRunTime.C
+$(surfWriters)/vtk/vtkSurfaceWriterRunTime.C
 
 graphField/writePatchGraph.C
 graphField/writeCellGraph.C
diff --git a/src/sampling/sampledSet/writers/gnuplot/gnuplot.C b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.C
similarity index 91%
rename from src/sampling/sampledSet/writers/gnuplot/gnuplot.C
rename to src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.C
index e394de1d3a91272fe13fdda11d54c8b521b627e1..07976741bc0ed0f73bdf6ddb33ca28e292f31972 100644
--- a/src/sampling/sampledSet/writers/gnuplot/gnuplot.C
+++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.C
@@ -24,7 +24,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "gnuplot.H"
+#include "gnuplotSetWriter.H"
 #include "clock.H"
 #include "coordSet.H"
 #include "fileName.H"
@@ -34,9 +34,8 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 template<class Type>
-Foam::gnuplot<Type>::gnuplot()
+Foam::gnuplotSetWriter<Type>::gnuplotSetWriter()
 :
     writer<Type>()
 {}
@@ -44,14 +43,14 @@ Foam::gnuplot<Type>::gnuplot()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::gnuplot<Type>::~gnuplot()
+Foam::gnuplotSetWriter<Type>::~gnuplotSetWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::fileName Foam::gnuplot<Type>::getFileName
+Foam::fileName Foam::gnuplotSetWriter<Type>::getFileName
 (
     const coordSet& points,
     const wordList& valueSetNames
@@ -62,7 +61,7 @@ Foam::fileName Foam::gnuplot<Type>::getFileName
 
 
 template<class Type>
-void Foam::gnuplot<Type>::write
+void Foam::gnuplotSetWriter<Type>::write
 (
     const coordSet& points,
     const wordList& valueSetNames,
diff --git a/src/sampling/sampledSet/writers/gnuplot/gnuplot.H b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H
similarity index 89%
rename from src/sampling/sampledSet/writers/gnuplot/gnuplot.H
rename to src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H
index d531ac4aeb67d11d98b4786f71a747e3f2c73e9c..07022266ad0e4275d3b74e2603b93c9594165ecd 100644
--- a/src/sampling/sampledSet/writers/gnuplot/gnuplot.H
+++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H
@@ -23,17 +23,17 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::gnuplot
+    Foam::gnuplotSetWriter
 
 Description
 
 SourceFiles
-    gnuplot.C
+    gnuplotSetWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef gnuplot_H
-#define gnuplot_H
+#ifndef gnuplotSetWriter_H
+#define gnuplotSetWriter_H
 
 #include "writer.H"
 
@@ -43,11 +43,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class gnuplot Declaration
+                     Class gnuplotSetWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class gnuplot
+class gnuplotSetWriter
 :
     public writer<Type>
 {
@@ -61,11 +61,11 @@ public:
     // Constructors
 
         //- Construct null
-        gnuplot();
+        gnuplotSetWriter();
 
 
     //- Destructor
-    virtual ~gnuplot();
+    virtual ~gnuplotSetWriter();
 
 
     // Member Functions
@@ -93,7 +93,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "gnuplot.C"
+#   include "gnuplotSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.C b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriterRunTime.C
similarity index 94%
rename from src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.C
rename to src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriterRunTime.C
index 7abc5c8fd0bdea26b35858c0d41f24ba88c38f32..f8855ea6579d244198c5d5d966b2101f35a7ce78 100644
--- a/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.C
+++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriterRunTime.C
@@ -24,14 +24,15 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "gnuplotWriters.H"
+#include "gnuplotSetWriter.H"
+#include "writers.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-    makeWriters(gnuplot)
+    makeSetWriters(gnuplotSetWriter)
 }
 
 // ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.H b/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.H
deleted file mode 100644
index 6f125366f24422e96f235849c220ae5d764a601c..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.H
+++ /dev/null
@@ -1,51 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::gnuplotWriters
-
-SourceFiles
-    gnuplotWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef gnuplotWriters_H
-#define gnuplotWriters_H
-
-#include "gnuplot.H"
-#include "writers.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    makeWritersTypedefs(gnuplot)
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/jplot/jplot.C b/src/sampling/sampledSet/writers/jplot/jplotSetWriter.C
similarity index 87%
rename from src/sampling/sampledSet/writers/jplot/jplot.C
rename to src/sampling/sampledSet/writers/jplot/jplotSetWriter.C
index 31775302fbaaf4cdc45fec93a092dba0a135e8db..cc9ada6352b92df39bd35c50587af55d99006411 100644
--- a/src/sampling/sampledSet/writers/jplot/jplot.C
+++ b/src/sampling/sampledSet/writers/jplot/jplotSetWriter.C
@@ -24,7 +24,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "jplot.H"
+#include "jplotSetWriter.H"
 #include "clock.H"
 #include "coordSet.H"
 #include "fileName.H"
@@ -34,21 +34,19 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::Ostream& Foam::jplot<Type>::writeHeader(Ostream& os) const
+Foam::Ostream& Foam::jplotSetWriter<Type>::writeHeader(Ostream& os) const
 {
     return os
-        << "# JPlot input file" << endl
-        << "#" << endl
-        << endl
+        << "# JPlot input file" << nl
+        << "#" << nl << nl
         << "# Generated by sample on " << clock::date().c_str() << endl;
 }
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 template<class Type>
-Foam::jplot<Type>::jplot()
+Foam::jplotSetWriter<Type>::jplotSetWriter()
 :
     writer<Type>()
 {}
@@ -57,14 +55,14 @@ Foam::jplot<Type>::jplot()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::jplot<Type>::~jplot()
+Foam::jplotSetWriter<Type>::~jplotSetWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::fileName Foam::jplot<Type>::getFileName
+Foam::fileName Foam::jplotSetWriter<Type>::getFileName
 (
     const coordSet& points,
     const wordList& valueSetNames
@@ -75,7 +73,7 @@ Foam::fileName Foam::jplot<Type>::getFileName
 
 
 template<class Type>
-void Foam::jplot<Type>::write
+void Foam::jplotSetWriter<Type>::write
 (
     const coordSet& points,
     const wordList& valueSetNames,
@@ -83,7 +81,7 @@ void Foam::jplot<Type>::write
     Ostream& os
 ) const
 {
-    os  << "# JPlot file" << endl
+    os  << "# JPlot file" << nl
         << "# column 1: " << points.name() << endl;
 
     forAll(valueSets, i)
diff --git a/src/sampling/sampledSet/writers/jplot/jplot.H b/src/sampling/sampledSet/writers/jplot/jplotSetWriter.H
similarity index 90%
rename from src/sampling/sampledSet/writers/jplot/jplot.H
rename to src/sampling/sampledSet/writers/jplot/jplotSetWriter.H
index 45a39ebe161195bcd9215dbf1edd7436eeef141e..c6df63dc3a9ee49d5b81e1bb492373ea068f974d 100644
--- a/src/sampling/sampledSet/writers/jplot/jplot.H
+++ b/src/sampling/sampledSet/writers/jplot/jplotSetWriter.H
@@ -23,15 +23,15 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::jplot
+    Foam::jplotSetWriter
 
 SourceFiles
-    jplot.C
+    jplotSetWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef jplot_H
-#define jplot_H
+#ifndef jplotSetWriter_H
+#define jplotSetWriter_H
 
 #include "writer.H"
 #include "vector.H"
@@ -42,11 +42,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class jplot Declaration
+                      Class jplotSetWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class jplot
+class jplotSetWriter
 :
     public writer<Type>
 {
@@ -65,11 +65,11 @@ public:
     // Constructors
 
         //- Construct null
-        jplot();
+        jplotSetWriter();
 
 
     //- Destructor
-    virtual ~jplot();
+    virtual ~jplotSetWriter();
 
 
     // Member Functions
@@ -97,7 +97,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "jplot.C"
+#   include "jplotSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSet/writers/xmgr/xmgrWriters.C b/src/sampling/sampledSet/writers/jplot/jplotSetWriterRunTime.C
similarity index 94%
rename from src/sampling/sampledSet/writers/xmgr/xmgrWriters.C
rename to src/sampling/sampledSet/writers/jplot/jplotSetWriterRunTime.C
index 90828ad64f7cf4e041fe1362ca073b6a96a7bef1..c5a6fe6a02e658e795fe0be71df35707388319c7 100644
--- a/src/sampling/sampledSet/writers/xmgr/xmgrWriters.C
+++ b/src/sampling/sampledSet/writers/jplot/jplotSetWriterRunTime.C
@@ -24,14 +24,15 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "xmgrWriters.H"
+#include "jplotSetWriter.H"
+#include "writers.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-    makeWriters(xmgr)
+    makeSetWriters(jplotSetWriter)
 }
 
 // ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/jplot/jplotWriters.H b/src/sampling/sampledSet/writers/jplot/jplotWriters.H
deleted file mode 100644
index 21b0121ec02cb926f43552a847df698a5e475b04..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSet/writers/jplot/jplotWriters.H
+++ /dev/null
@@ -1,51 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::jplotWriters
-
-SourceFiles
-    jplotWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef jplotWriters_H
-#define jplotWriters_H
-
-#include "jplot.H"
-#include "writers.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    makeWritersTypedefs(jplot)
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/raw/raw.C b/src/sampling/sampledSet/writers/raw/rawSetWriter.C
similarity index 91%
rename from src/sampling/sampledSet/writers/raw/raw.C
rename to src/sampling/sampledSet/writers/raw/rawSetWriter.C
index 021e50c5c96e085291d90a340330d28fec1d2fa2..d8e6f060eda6c13d6b2118a70e63424fe572c8f9 100644
--- a/src/sampling/sampledSet/writers/raw/raw.C
+++ b/src/sampling/sampledSet/writers/raw/rawSetWriter.C
@@ -24,16 +24,15 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "raw.H"
+#include "rawSetWriter.H"
 #include "coordSet.H"
 #include "fileName.H"
 #include "OFstream.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 template<class Type>
-Foam::raw<Type>::raw()
+Foam::rawSetWriter<Type>::rawSetWriter()
 :
     writer<Type>()
 {}
@@ -42,14 +41,14 @@ Foam::raw<Type>::raw()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::raw<Type>::~raw()
+Foam::rawSetWriter<Type>::~rawSetWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::fileName Foam::raw<Type>::getFileName
+Foam::fileName Foam::rawSetWriter<Type>::getFileName
 (
     const coordSet& points,
     const wordList& valueSetNames
@@ -60,7 +59,7 @@ Foam::fileName Foam::raw<Type>::getFileName
 
 
 template<class Type>
-void Foam::raw<Type>::write
+void Foam::rawSetWriter<Type>::write
 (
     const coordSet& points,
     const wordList& valueSetNames,
diff --git a/src/sampling/sampledSet/writers/raw/raw.H b/src/sampling/sampledSet/writers/raw/rawSetWriter.H
similarity index 90%
rename from src/sampling/sampledSet/writers/raw/raw.H
rename to src/sampling/sampledSet/writers/raw/rawSetWriter.H
index 1f4b856f66dfaf916667ea549c661947725591c0..961c5a5c7a2d32d4870cad5c3c9a9436e059b753 100644
--- a/src/sampling/sampledSet/writers/raw/raw.H
+++ b/src/sampling/sampledSet/writers/raw/rawSetWriter.H
@@ -23,17 +23,17 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::raw
+    Foam::rawSetWriter
 
 Description
 
 SourceFiles
-    raw.C
+    rawSetWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef raw_H
-#define raw_H
+#ifndef rawSetWriter_H
+#define rawSetWriter_H
 
 #include "writer.H"
 
@@ -43,11 +43,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class raw Declaration
+                       Class rawSetWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class raw
+class rawSetWriter
 :
     public writer<Type>
 {
@@ -61,11 +61,11 @@ public:
     // Constructors
 
         //- Construct null
-        raw();
+        rawSetWriter();
 
 
     //- Destructor
-    virtual ~raw();
+    virtual ~rawSetWriter();
 
 
     // Member Functions
@@ -93,7 +93,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "raw.C"
+#   include "rawSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSet/writers/jplot/jplotWriters.C b/src/sampling/sampledSet/writers/raw/rawSetWriterRunTime.C
similarity index 94%
rename from src/sampling/sampledSet/writers/jplot/jplotWriters.C
rename to src/sampling/sampledSet/writers/raw/rawSetWriterRunTime.C
index b117178971a3390ce794bb939bd44b9a154b4fd5..d3ac5e272ba75e8fcb145f495bec83d11af39168 100644
--- a/src/sampling/sampledSet/writers/jplot/jplotWriters.C
+++ b/src/sampling/sampledSet/writers/raw/rawSetWriterRunTime.C
@@ -24,14 +24,15 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "jplotWriters.H"
+#include "rawSetWriter.H"
+#include "writers.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-    makeWriters(jplot)
+    makeSetWriters(rawSetWriter)
 }
 
 // ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/raw/rawWriters.H b/src/sampling/sampledSet/writers/raw/rawWriters.H
deleted file mode 100644
index 020b750fe291443767bd9dbe2501fb91d3287cb9..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSet/writers/raw/rawWriters.H
+++ /dev/null
@@ -1,51 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::rawWriters
-
-SourceFiles
-    rawWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef rawWriters_H
-#define rawWriters_H
-
-#include "raw.H"
-#include "writers.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    makeWritersTypedefs(raw)
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/writer/writer.C b/src/sampling/sampledSet/writers/writer.C
similarity index 100%
rename from src/sampling/sampledSet/writers/writer/writer.C
rename to src/sampling/sampledSet/writers/writer.C
diff --git a/src/sampling/sampledSet/writers/writer/writer.H b/src/sampling/sampledSet/writers/writer.H
similarity index 69%
rename from src/sampling/sampledSet/writers/writer/writer.H
rename to src/sampling/sampledSet/writers/writer.H
index 73fe2fd10fa8f95d181c0400bc03ad221a1cc5b3..901575fde733825e2294744b0e94bde0b6306363 100644
--- a/src/sampling/sampledSet/writers/writer/writer.H
+++ b/src/sampling/sampledSet/writers/writer.H
@@ -205,49 +205,6 @@ public:
 #   include "writer.C"
 #endif
 
-// Only used internally
-#define makeTypeWritersTypeName(type)                                         \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug(type, 0);
-
-// Used externally sometimes
-#define makeWritersTypeName(typeWriter)                                       \
-                                                                              \
-makeTypeWritersTypeName(typeWriter##ScalarWriter);                            \
-makeTypeWritersTypeName(typeWriter##VectorWriter);                            \
-makeTypeWritersTypeName(typeWriter##SphericalTensorWriter);                   \
-makeTypeWritersTypeName(typeWriter##SymmTensorWriter);                        \
-makeTypeWritersTypeName(typeWriter##TensorWriter);
-
-// Define type info for single template instantiation (e.g. vector)
-#define makeWriterTypes(WriterType, type)                                     \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug(type, 0);                                 \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    WriterType, type, word                                                    \
-);
-
-
-// Define type info info for scalar, vector etc. instantiations
-#define makeWriters(typeWriter)                                               \
-                                                                              \
-makeWriterTypes(writerScalarWriter, typeWriter##ScalarWriter);                \
-makeWriterTypes(writerVectorWriter, typeWriter##VectorWriter);                \
-makeWriterTypes(writerSphericalTensorWriter, typeWriter##SphericalTensorWriter);\
-makeWriterTypes(writerSymmTensorWriter, typeWriter##SymmTensorWriter);        \
-makeWriterTypes(writerTensorWriter, typeWriter##TensorWriter);
-
-
-#define makeWritersTypedefs(typeWriter)                                       \
-                                                                              \
-typedef typeWriter<scalar> typeWriter##ScalarWriter;                          \
-typedef typeWriter<vector> typeWriter##VectorWriter;                          \
-typedef typeWriter<sphericalTensor> typeWriter##SphericalTensorWriter;        \
-typedef typeWriter<symmTensor> typeWriter##SymmTensorWriter;                  \
-typedef typeWriter<tensor> typeWriter##TensorWriter;
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/sampling/sampledSet/writers/writer/writers.C b/src/sampling/sampledSet/writers/writer/writers.C
deleted file mode 100644
index 8aaa5c4127a8f132c7d6bdd17832e8d9e98b51a7..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSet/writers/writer/writers.C
+++ /dev/null
@@ -1,55 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-\*---------------------------------------------------------------------------*/
-
-#include "writers.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-defineNamedTemplateTypeNameAndDebug(writerScalarWriter, 0);
-defineTemplateRunTimeSelectionTable(writerScalarWriter, word);
-
-defineNamedTemplateTypeNameAndDebug(writerVectorWriter, 0);
-defineTemplateRunTimeSelectionTable(writerVectorWriter, word);
-
-defineNamedTemplateTypeNameAndDebug(writerSphericalTensorWriter, 0);
-defineTemplateRunTimeSelectionTable(writerSphericalTensorWriter, word);
-
-defineNamedTemplateTypeNameAndDebug(writerSymmTensorWriter, 0);
-defineTemplateRunTimeSelectionTable(writerSymmTensorWriter, word);
-
-defineNamedTemplateTypeNameAndDebug(writerTensorWriter, 0);
-defineTemplateRunTimeSelectionTable(writerTensorWriter, word);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/writer/writers.H b/src/sampling/sampledSet/writers/writer/writers.H
deleted file mode 100644
index ba46c5880a3008e418aeadbcd8d7e5794532089a..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSet/writers/writer/writers.H
+++ /dev/null
@@ -1,50 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::rawWriters
-
-SourceFiles
-    writers.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef writers_H
-#define writers_H
-
-#include "writer.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    makeWritersTypedefs(writer)
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/writers.C b/src/sampling/sampledSet/writers/writers.C
new file mode 100644
index 0000000000000000000000000000000000000000..7e624292a3b771a764a1a4cde189730968dcd88c
--- /dev/null
+++ b/src/sampling/sampledSet/writers/writers.C
@@ -0,0 +1,50 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the
+    Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM; if not, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+\*---------------------------------------------------------------------------*/
+
+#include "writers.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+#define defineSetWriterType(dataType)                                         \
+    defineNamedTemplateTypeNameAndDebug(writer<dataType >, 0);                \
+    defineTemplatedRunTimeSelectionTable(writer, word, dataType);
+
+defineSetWriterType(scalar);
+defineSetWriterType(vector);
+defineSetWriterType(sphericalTensor);
+defineSetWriterType(symmTensor);
+defineSetWriterType(tensor);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/writers.H b/src/sampling/sampledSet/writers/writers.H
new file mode 100644
index 0000000000000000000000000000000000000000..080fb4f01380ed3e9254bd08e0c0da219915a83b
--- /dev/null
+++ b/src/sampling/sampledSet/writers/writers.H
@@ -0,0 +1,80 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the
+    Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM; if not, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+InClass
+    Foam::writer
+
+SourceFiles
+    writers.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef writers_H
+#define writers_H
+
+#include "writer.H"
+#include "fieldTypes.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// Only used internally
+#define makeTypeSetWritersTypeName(typeWriter, dataType)                     \
+                                                                             \
+    defineNamedTemplateTypeNameAndDebug(typeWriter<dataType >, 0);
+
+// Sometimes used externally
+#define makeSetWritersTypeName(typeWriter)                                   \
+                                                                             \
+    makeTypeSetWritersTypeName(typeWriter, scalar);                          \
+    makeTypeSetWritersTypeName(typeWriter, vector);                          \
+    makeTypeSetWritersTypeName(typeWriter, sphericalTensor);                 \
+    makeTypeSetWritersTypeName(typeWriter, symmTensor);                      \
+    makeTypeSetWritersTypeName(typeWriter, tensor);
+
+// Define type info for single dataType template instantiation (eg, vector)
+#define makeSetWriterType(typeWriter, dataType)                              \
+                                                                             \
+    defineNamedTemplateTypeNameAndDebug(typeWriter<dataType >, 0);           \
+    addTemplatedToRunTimeSelectionTable                                      \
+    (                                                                        \
+        writer, typeWriter, dataType, word                                   \
+    );
+
+
+// Define type info for scalar, vector etc. instantiations
+#define makeSetWriters(typeWriter)                                            \
+                                                                              \
+    makeSetWriterType(typeWriter, scalar);                                    \
+    makeSetWriterType(typeWriter, vector);                                    \
+    makeSetWriterType(typeWriter, sphericalTensor);                           \
+    makeSetWriterType(typeWriter, symmTensor);                                \
+    makeSetWriterType(typeWriter, tensor);
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/xmgr/xmgrWriters.H b/src/sampling/sampledSet/writers/xmgr/xmgrWriters.H
deleted file mode 100644
index b1b554409a77b3e07cec4a2e84091ea7f916a7ad..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSet/writers/xmgr/xmgrWriters.H
+++ /dev/null
@@ -1,54 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::xmgrWriters
-
-Description
-
-SourceFiles
-    xmgrWriters.C
-
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef xmgrWriters_H
-#define xmgrWriters_H
-
-#include "xmgr.H"
-#include "writers.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    makeWritersTypedefs(xmgr)
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/xmgr/xmgr.C b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.C
similarity index 91%
rename from src/sampling/sampledSet/writers/xmgr/xmgr.C
rename to src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.C
index d8385a07de5c7c7413eb8380dfa9e029d3971fe3..cecc5f238c9e28b7276e0db97cd18bb9fe0a52f2 100644
--- a/src/sampling/sampledSet/writers/xmgr/xmgr.C
+++ b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.C
@@ -24,7 +24,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "xmgr.H"
+#include "xmgraceSetWriter.H"
 #include "coordSet.H"
 #include "fileName.H"
 #include "OFstream.H"
@@ -32,9 +32,8 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 template<class Type>
-Foam::xmgr<Type>::xmgr()
+Foam::xmgraceSetWriter<Type>::xmgraceSetWriter()
 :
     writer<Type>()
 {}
@@ -43,14 +42,14 @@ Foam::xmgr<Type>::xmgr()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::xmgr<Type>::~xmgr()
+Foam::xmgraceSetWriter<Type>::~xmgraceSetWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::fileName Foam::xmgr<Type>::getFileName
+Foam::fileName Foam::xmgraceSetWriter<Type>::getFileName
 (
     const coordSet& points,
     const wordList& valueSetNames
@@ -61,7 +60,7 @@ Foam::fileName Foam::xmgr<Type>::getFileName
 
 
 template<class Type>
-void Foam::xmgr<Type>::write
+void Foam::xmgraceSetWriter<Type>::write
 (
     const coordSet& points,
     const wordList& valueSetNames,
@@ -85,5 +84,4 @@ void Foam::xmgr<Type>::write
     }
 }
 
-
 // ************************************************************************* //
diff --git a/src/sampling/sampledSet/writers/xmgr/xmgr.H b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.H
similarity index 89%
rename from src/sampling/sampledSet/writers/xmgr/xmgr.H
rename to src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.H
index 4478730fd8560f67d43b9db72b114fe5bba50473..c96438e91dd2148c922db82ce32ae6a3ee43d9bc 100644
--- a/src/sampling/sampledSet/writers/xmgr/xmgr.H
+++ b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriter.H
@@ -23,17 +23,17 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::xmgr
+    Foam::xmgraceSetWriter
 
 Description
 
 SourceFiles
-    xmgr.C
+    xmgraceSetWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef xmgr_H
-#define xmgr_H
+#ifndef xmgraceSetWriter_H
+#define xmgraceSetWriter_H
 
 #include "writer.H"
 
@@ -43,11 +43,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class xmgr Declaration
+                     Class xmgraceSetWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class xmgr
+class xmgraceSetWriter
 :
     public writer<Type>
 {
@@ -61,11 +61,11 @@ public:
     // Constructors
 
         //- Construct null
-        xmgr();
+        xmgraceSetWriter();
 
 
     //- Destructor
-    virtual ~xmgr();
+    virtual ~xmgraceSetWriter();
 
 
     // Member Functions
@@ -93,7 +93,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "xmgr.C"
+#   include "xmgraceSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSet/writers/raw/rawWriters.C b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriterRunTime.C
similarity index 94%
rename from src/sampling/sampledSet/writers/raw/rawWriters.C
rename to src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriterRunTime.C
index 0b3a28898cf81c9616e61ae890224bbc9ee9cbfa..d4049cf2bf92591ec9457838a11716b3a9525e2d 100644
--- a/src/sampling/sampledSet/writers/raw/rawWriters.C
+++ b/src/sampling/sampledSet/writers/xmgrace/xmgraceSetWriterRunTime.C
@@ -24,14 +24,15 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "rawWriters.H"
+#include "xmgraceSetWriter.H"
+#include "writers.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-    makeWriters(raw)
+    makeSetWriters(xmgraceSetWriter)
 }
 
 // ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/dx/dx.C b/src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.C
similarity index 90%
rename from src/sampling/sampledSurface/writers/dx/dx.C
rename to src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.C
index deb80de894fc14311a3fba8658084b31e3251379..45506e1797ceb76cd0182c46417a0d1da885c06d 100644
--- a/src/sampling/sampledSurface/writers/dx/dx.C
+++ b/src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.C
@@ -24,7 +24,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "dx.H"
+#include "dxSurfaceWriter.H"
 #include "fileName.H"
 #include "OFstream.H"
 #include "faceList.H"
@@ -33,7 +33,7 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-void Foam::dx<Type>::writeDXGeometry
+void Foam::dxSurfaceWriter<Type>::writeDXGeometry
 (
     const pointField& points,
     const faceList& faces,
@@ -84,7 +84,7 @@ void Foam::dx<Type>::writeDXGeometry
 
 // Write scalarField in DX format
 template<class Type>
-void Foam::dx<Type>::writeDXData
+void Foam::dxSurfaceWriter<Type>::writeDXData
 (
     const pointField& points,
     const scalarField& values,
@@ -116,7 +116,7 @@ void Foam::dx<Type>::writeDXData
 
 // Write vectorField in DX format
 template<class Type>
-void Foam::dx<Type>::writeDXData
+void Foam::dxSurfaceWriter<Type>::writeDXData
 (
     const pointField& points,
     const vectorField& values,
@@ -150,7 +150,7 @@ void Foam::dx<Type>::writeDXData
 
 // Write sphericalTensorField in DX format
 template<class Type>
-void Foam::dx<Type>::writeDXData
+void Foam::dxSurfaceWriter<Type>::writeDXData
 (
     const pointField& points,
     const sphericalTensorField& values,
@@ -182,7 +182,7 @@ void Foam::dx<Type>::writeDXData
 
 // Write symmTensorField in DX format
 template<class Type>
-void Foam::dx<Type>::writeDXData
+void Foam::dxSurfaceWriter<Type>::writeDXData
 (
     const pointField& points,
     const symmTensorField& values,
@@ -219,7 +219,7 @@ void Foam::dx<Type>::writeDXData
 
 // Write tensorField in DX format
 template<class Type>
-void Foam::dx<Type>::writeDXData
+void Foam::dxSurfaceWriter<Type>::writeDXData
 (
     const pointField& points,
     const tensorField& values,
@@ -256,7 +256,7 @@ void Foam::dx<Type>::writeDXData
 
 // Write trailer in DX format
 template<class Type>
-void Foam::dx<Type>::writeDXTrailer(Ostream& os) const
+void Foam::dxSurfaceWriter<Type>::writeDXTrailer(Ostream& os) const
 {
     os  << "# the field, with three components: \"positions\","
         << " \"connections\", and \"data\"" << nl
@@ -272,7 +272,7 @@ void Foam::dx<Type>::writeDXTrailer(Ostream& os) const
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::dx<Type>::dx()
+Foam::dxSurfaceWriter<Type>::dxSurfaceWriter()
 :
     surfaceWriter<Type>()
 {}
@@ -281,14 +281,14 @@ Foam::dx<Type>::dx()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::dx<Type>::~dx()
+Foam::dxSurfaceWriter<Type>::~dxSurfaceWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::dx<Type>::write
+void Foam::dxSurfaceWriter<Type>::write
 (
     const fileName& samplePath,
     const fileName& timeDir,
@@ -307,22 +307,22 @@ void Foam::dx<Type>::write
         mkDir(surfaceDir);
     }
 
-    fileName planeFName(surfaceDir/fieldName + '_' + surfaceName + ".dx");
+    fileName fName(surfaceDir/fieldName + '_' + surfaceName + ".dx");
 
     if (verbose)
     {
-        Info<< "Writing field " << fieldName << " to " << planeFName << endl;
+        Info<< "Writing field " << fieldName << " to " << fName << endl;
     }
 
-    OFstream dxFile(planeFName);
+    OFstream os(fName);
 
-    writeDXGeometry(points, faces, dxFile);
+    writeDXGeometry(points, faces, os);
 
-    writeDXData(points, values, dxFile);
+    writeDXData(points, values, os);
 
-    writeDXTrailer(dxFile);
+    writeDXTrailer(os);
 
-    dxFile << "end" << nl;
+    os << "end" << nl;
 }
 
 
diff --git a/src/sampling/sampledSurface/writers/dx/dx.H b/src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.H
similarity index 92%
rename from src/sampling/sampledSurface/writers/dx/dx.H
rename to src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.H
index cccf64e3cf3f74a25ed3c3948a2453d67c197e25..1096d59b366be091a36db6df3b77a87eac73d9c6 100644
--- a/src/sampling/sampledSurface/writers/dx/dx.H
+++ b/src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.H
@@ -23,17 +23,17 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::dx
+    Foam::dxSurfaceWriter
 
 Description
 
 SourceFiles
-    dx.C
+    dxSurfaceWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef dx_H
-#define dx_H
+#ifndef dxSurfaceWriter_H
+#define dxSurfaceWriter_H
 
 #include "surfaceWriter.H"
 
@@ -43,11 +43,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class dx Declaration
+                      Class dxSurfaceWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class dx
+class dxSurfaceWriter
 :
     public surfaceWriter<Type>
 {
@@ -107,12 +107,12 @@ public:
     // Constructors
 
         //- Construct null
-        dx();
+        dxSurfaceWriter();
 
 
     // Destructor
 
-        virtual ~dx();
+        virtual ~dxSurfaceWriter();
 
 
     // Member Functions
@@ -141,7 +141,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "dx.C"
+#   include "dxSurfaceWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/writers/dx/dxWriters.C b/src/sampling/sampledSurface/writers/dx/dxSurfaceWriterRunTime.C
similarity index 94%
rename from src/sampling/sampledSurface/writers/dx/dxWriters.C
rename to src/sampling/sampledSurface/writers/dx/dxSurfaceWriterRunTime.C
index 1cac2b8d78338e7592fb215fb7845d5a5df42a1e..2201282834627aa8920dc3c35b109ff4a6674712 100644
--- a/src/sampling/sampledSurface/writers/dx/dxWriters.C
+++ b/src/sampling/sampledSurface/writers/dx/dxSurfaceWriterRunTime.C
@@ -24,7 +24,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "dxWriters.H"
+#include "dxSurfaceWriter.H"
+#include "surfaceWriters.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -34,7 +35,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-makeSurfaceWriters(dx);
+makeSurfaceWriters(dxSurfaceWriter);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/sampling/sampledSurface/writers/dx/dxWriters.H b/src/sampling/sampledSurface/writers/dx/dxWriters.H
deleted file mode 100644
index 0700b647b414ab341fe342c71374d9b5dca4638a..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSurface/writers/dx/dxWriters.H
+++ /dev/null
@@ -1,63 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::dxWriters
-
-Description
-
-SourceFiles
-    dxWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef dxWriters_H
-#define dxWriters_H
-
-#include "dx.H"
-#include "surfaceWriters.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-typedef dx<scalar> dxScalarWriter;
-typedef dx<vector> dxVectorWriter;
-typedef dx<sphericalTensor> dxSphericalTensorWriter;
-typedef dx<symmTensor> dxSymmTensorWriter;
-typedef dx<tensor> dxTensorWriter;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFile.C b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C
similarity index 78%
rename from src/sampling/sampledSurface/writers/foamFile/foamFile.C
rename to src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C
index 334c490c43a414b1de65fd9aa560bd618ae9ba1c..4180dcd96363513abadb41009bf45e7d8344c950 100644
--- a/src/sampling/sampledSurface/writers/foamFile/foamFile.C
+++ b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C
@@ -24,7 +24,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "foamFile.H"
+#include "foamFileSurfaceWriter.H"
 #include "fileName.H"
 #include "OFstream.H"
 #include "faceList.H"
@@ -33,7 +33,7 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::foamFile<Type>::foamFile()
+Foam::foamFileSurfaceWriter<Type>::foamFileSurfaceWriter()
 :
     surfaceWriter<Type>()
 {}
@@ -42,14 +42,14 @@ Foam::foamFile<Type>::foamFile()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::foamFile<Type>::~foamFile()
+Foam::foamFileSurfaceWriter<Type>::~foamFileSurfaceWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::foamFile<Type>::write
+void Foam::foamFileSurfaceWriter<Type>::write
 (
     const fileName& samplePath,
     const fileName& timeDir,
@@ -61,42 +61,36 @@ void Foam::foamFile<Type>::write
     const bool verbose
 ) const
 {
-    fileName planeFName(samplePath/timeDir/surfaceName);
+    fileName surfaceDir(samplePath/timeDir/surfaceName);
 
-    if (!exists(planeFName))
+    if (!exists(surfaceDir))
     {
-        mkDir(planeFName);
+        mkDir(surfaceDir);
     }
 
     if (verbose)
     {
-        Info<< "Writing field " << fieldName << " to " << planeFName << endl;
+        Info<< "Writing field " << fieldName << " to " << surfaceDir << endl;
     }
 
     // Points
-    OFstream pointsFile(planeFName/"points");
-
-    pointsFile << points;
+    OFstream(surfaceDir/"points")() << points;
 
     // Faces
-    OFstream facesFile(planeFName/"faces");
-
-    facesFile << faces;
+    OFstream(surfaceDir/"faces")() << faces;
 
     // Values to separate directory (e.g. "scalarField/p")
 
     fileName foamName(pTraits<Type>::typeName);
-
-    fileName valuesDir(planeFName  / (foamName + Field<Type>::typeName));
+    fileName valuesDir(surfaceDir  / (foamName + Field<Type>::typeName));
 
     if (!exists(valuesDir))
     {
         mkDir(valuesDir);
     }
 
-    OFstream valuesFile(valuesDir/fieldName);
-
-    valuesFile << values;
+    // values
+    OFstream(valuesDir/fieldName)() << values;
 }
 
 
diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFile.H b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.H
similarity index 88%
rename from src/sampling/sampledSurface/writers/foamFile/foamFile.H
rename to src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.H
index fcd5fe4f8a1703930dcfe2d625a42892cb6c2926..1fbee34b515d501d890eed2f070d481227887c2c 100644
--- a/src/sampling/sampledSurface/writers/foamFile/foamFile.H
+++ b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.H
@@ -23,18 +23,18 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::foamFile
+    Foam::foamFileSurfaceWriter
 
 Description
     A surfaceWriter for foamFiles
 
 SourceFiles
-    foamFile.C
+    foamFileSurfaceWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef foamFile_H
-#define foamFile_H
+#ifndef foamFileSurfaceWriter_H
+#define foamFileSurfaceWriter_H
 
 #include "surfaceWriter.H"
 
@@ -44,11 +44,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class foamFile Declaration
+                   Class foamFileSurfaceWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class foamFile
+class foamFileSurfaceWriter
 :
     public surfaceWriter<Type>
 {
@@ -62,12 +62,12 @@ public:
     // Constructors
 
         //- Construct null
-        foamFile();
+        foamFileSurfaceWriter();
 
 
     // Destructor
 
-        virtual ~foamFile();
+        virtual ~foamFileSurfaceWriter();
 
 
     // Member Functions
@@ -96,7 +96,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "foamFile.C"
+#   include "foamFileSurfaceWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriterRunTime.C b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriterRunTime.C
new file mode 100644
index 0000000000000000000000000000000000000000..6d669446f775b47a1e911190ac8f4371429ae772
--- /dev/null
+++ b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriterRunTime.C
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the
+    Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM; if not, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+\*---------------------------------------------------------------------------*/
+
+#include "foamFileSurfaceWriter.H"
+#include "surfaceWriters.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+makeSurfaceWriters(foamFileSurfaceWriter);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFileWriters.H b/src/sampling/sampledSurface/writers/foamFile/foamFileWriters.H
deleted file mode 100644
index ff963568fb32b9958a1f924ba1c9523ae2a9fa89..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSurface/writers/foamFile/foamFileWriters.H
+++ /dev/null
@@ -1,63 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::foamFileWriters
-
-Description
-
-SourceFiles
-    foamFileWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef foamFileWriters_H
-#define foamFileWriters_H
-
-#include "foamFile.H"
-#include "surfaceWriters.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-typedef foamFile<scalar> foamFileScalarWriter;
-typedef foamFile<vector> foamFileVectorWriter;
-typedef foamFile<sphericalTensor> foamFileSphericalTensorWriter;
-typedef foamFile<symmTensor> foamFileSymmTensorWriter;
-typedef foamFile<tensor> foamFileTensorWriter;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/null/null.C b/src/sampling/sampledSurface/writers/null/nullSurfaceWriter.C
similarity index 92%
rename from src/sampling/sampledSurface/writers/null/null.C
rename to src/sampling/sampledSurface/writers/null/nullSurfaceWriter.C
index 979109a00b539753fb5018db1dabfa9056e4f7fc..b4efa9bd389265448885c89c301390e04926b1e4 100644
--- a/src/sampling/sampledSurface/writers/null/null.C
+++ b/src/sampling/sampledSurface/writers/null/nullSurfaceWriter.C
@@ -24,7 +24,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "null.H"
+#include "nullSurfaceWriter.H"
 #include "fileName.H"
 #include "OFstream.H"
 #include "faceList.H"
@@ -35,7 +35,7 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::null<Type>::null()
+Foam::nullSurfaceWriter<Type>::nullSurfaceWriter()
 :
     surfaceWriter<Type>()
 {}
@@ -44,14 +44,14 @@ Foam::null<Type>::null()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::null<Type>::~null()
+Foam::nullSurfaceWriter<Type>::~nullSurfaceWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::null<Type>::write
+void Foam::nullSurfaceWriter<Type>::write
 (
     const fileName& samplePath,
     const fileName& timeDir,
diff --git a/src/sampling/sampledSurface/writers/null/null.H b/src/sampling/sampledSurface/writers/null/nullSurfaceWriter.H
similarity index 89%
rename from src/sampling/sampledSurface/writers/null/null.H
rename to src/sampling/sampledSurface/writers/null/nullSurfaceWriter.H
index baf84f218cc1708dc70b6471679319a2ee4bab24..a94c57d537a86f98807b952730277f4d8ace66cb 100644
--- a/src/sampling/sampledSurface/writers/null/null.H
+++ b/src/sampling/sampledSurface/writers/null/nullSurfaceWriter.H
@@ -23,17 +23,17 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::null
+    Foam::nullSurfaceWriter
 
 Description
 
 SourceFiles
-    null.C
+    nullSurfaceWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef null_H
-#define null_H
+#ifndef nullSurfaceWriter_H
+#define nullSurfaceWriter_H
 
 #include "surfaceWriter.H"
 
@@ -43,11 +43,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class null Declaration
+                     Class nullSurfaceWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class null
+class nullSurfaceWriter
 :
     public surfaceWriter<Type>
 {
@@ -61,12 +61,12 @@ public:
     // Constructors
 
         //- Construct null
-        null();
+        nullSurfaceWriter();
 
 
     // Destructor
 
-        virtual ~null();
+        virtual ~nullSurfaceWriter();
 
 
     // Member Functions
@@ -95,7 +95,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "null.C"
+#   include "nullSurfaceWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/writers/null/nullSurfaceWriterRunTime.C b/src/sampling/sampledSurface/writers/null/nullSurfaceWriterRunTime.C
new file mode 100644
index 0000000000000000000000000000000000000000..4e779fcefd377355dc3922c505b1bce42a0a6da5
--- /dev/null
+++ b/src/sampling/sampledSurface/writers/null/nullSurfaceWriterRunTime.C
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the
+    Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM; if not, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+\*---------------------------------------------------------------------------*/
+
+#include "nullSurfaceWriter.H"
+#include "surfaceWriters.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+makeSurfaceWriters(nullSurfaceWriter);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/null/nullWriters.H b/src/sampling/sampledSurface/writers/null/nullWriters.H
deleted file mode 100644
index 3cb81e1a016a67d4a64e1e6b0d95d1f977bb4330..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSurface/writers/null/nullWriters.H
+++ /dev/null
@@ -1,63 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::nullWriters
-
-Description
-
-SourceFiles
-    nullWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef nullWriters_H
-#define nullWriters_H
-
-#include "null.H"
-#include "surfaceWriters.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-typedef null<scalar> nullScalarWriter;
-typedef null<vector> nullVectorWriter;
-typedef null<sphericalTensor> nullSphericalTensorWriter;
-typedef null<symmTensor> nullSymmTensorWriter;
-typedef null<tensor> nullTensorWriter;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
index 2f281c20dfa07ee79a95fa274e94f16a9b23792f..f25249b1b075cdac79f9408cdd8c525845de9826 100644
--- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
+++ b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
@@ -347,16 +347,15 @@ void Foam::rawSurfaceWriter<Type>::write
         mkDir(surfaceDir);
     }
 
-    fileName planeFName(surfaceDir/fieldName + '_' + surfaceName + ".raw");
+    fileName fName(surfaceDir/fieldName + '_' + surfaceName + ".raw");
 
     if (verbose)
     {
-        Info<< "Writing field " << fieldName << " to " << planeFName << endl;
+        Info<< "Writing field " << fieldName << " to " << fName << endl;
     }
 
-    OFstream rawFile(planeFName);
-
-    writeData(fieldName, points, faces, values, rawFile);
+    OFstream os(fName);
+    writeData(fieldName, points, faces, values, os);
 }
 
 
diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriters.C b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriterRunTime.C
similarity index 96%
rename from src/sampling/sampledSurface/writers/raw/rawSurfaceWriters.C
rename to src/sampling/sampledSurface/writers/raw/rawSurfaceWriterRunTime.C
index cd147b3193bd652eceb90f125b5fee11bb4b534e..ee1168266c4e01dc2ccecfab8a1b7363951dd689 100644
--- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriters.C
+++ b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriterRunTime.C
@@ -24,7 +24,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "rawSurfaceWriters.H"
+#include "rawSurfaceWriter.H"
+#include "surfaceWriters.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriters.H b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriters.H
deleted file mode 100644
index b96bc71dfdf963ce0582a70c11678a91b37da36d..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriters.H
+++ /dev/null
@@ -1,63 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::rawSurfaceWriters
-
-Description
-
-SourceFiles
-    rawSurfaceWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef rawSurfaceWriters_H
-#define rawSurfaceWriters_H
-
-#include "rawSurfaceWriter.H"
-#include "surfaceWriters.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-typedef rawSurfaceWriter<scalar> rawSurfaceWriterScalarWriter;
-typedef rawSurfaceWriter<vector> rawSurfaceWriterVectorWriter;
-typedef rawSurfaceWriter<sphericalTensor> rawSurfaceWriterSphericalTensorWriter;
-typedef rawSurfaceWriter<symmTensor> rawSurfaceWriterSymmTensorWriter;
-typedef rawSurfaceWriter<tensor> rawSurfaceWriterTensorWriter;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/stl/stl.C b/src/sampling/sampledSurface/writers/stl/stlSurfaceWriter.C
similarity index 89%
rename from src/sampling/sampledSurface/writers/stl/stl.C
rename to src/sampling/sampledSurface/writers/stl/stlSurfaceWriter.C
index 82c36b3df035803269896fe7028c7ae0a6771d0e..f5c42c02f1959bb451737ed4e3b1fe599507ddb5 100644
--- a/src/sampling/sampledSurface/writers/stl/stl.C
+++ b/src/sampling/sampledSurface/writers/stl/stlSurfaceWriter.C
@@ -24,7 +24,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "stl.H"
+#include "stlSurfaceWriter.H"
 #include "fileName.H"
 #include "OFstream.H"
 #include "faceList.H"
@@ -34,7 +34,7 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::stl<Type>::stl()
+Foam::stlSurfaceWriter<Type>::stlSurfaceWriter()
 :
     surfaceWriter<Type>()
 {}
@@ -43,14 +43,14 @@ Foam::stl<Type>::stl()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::stl<Type>::~stl()
+Foam::stlSurfaceWriter<Type>::~stlSurfaceWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::stl<Type>::write
+void Foam::stlSurfaceWriter<Type>::write
 (
     const fileName& samplePath,
     const fileName& timeDir,
@@ -69,11 +69,11 @@ void Foam::stl<Type>::write
         mkDir(surfaceDir);
     }
 
-    fileName planeFName(surfaceDir/fieldName + '_' + surfaceName + ".stl");
+    fileName fName(surfaceDir/fieldName + '_' + surfaceName + ".stl");
 
     if (verbose)
     {
-        Info<< "Writing field " << fieldName << " to " << planeFName << endl;
+        Info<< "Writing field " << fieldName << " to " << fName << endl;
     }
 
     // Convert faces to triangles.
@@ -108,7 +108,7 @@ void Foam::stl<Type>::write
             )
         ),
         points
-    ).write(planeFName);
+    ).write(fName);
 }
 
 
diff --git a/src/sampling/sampledSurface/writers/stl/stl.H b/src/sampling/sampledSurface/writers/stl/stlSurfaceWriter.H
similarity index 90%
rename from src/sampling/sampledSurface/writers/stl/stl.H
rename to src/sampling/sampledSurface/writers/stl/stlSurfaceWriter.H
index 6941ab8c1be38428ea90732a042e0e5f628f6702..5e1c2e5ffb17af9dc216bfda87af2b8ed2093bd7 100644
--- a/src/sampling/sampledSurface/writers/stl/stl.H
+++ b/src/sampling/sampledSurface/writers/stl/stlSurfaceWriter.H
@@ -23,17 +23,17 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::stl
+    Foam::stlSurfaceWriter
 
 Description
 
 SourceFiles
-    stl.C
+    stlSurfaceWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef stl_H
-#define stl_H
+#ifndef stlSurfaceWriter_H
+#define stlSurfaceWriter_H
 
 #include "surfaceWriter.H"
 
@@ -43,11 +43,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class stl Declaration
+                     Class stlSurfaceWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class stl
+class stlSurfaceWriter
 :
     public surfaceWriter<Type>
 {
@@ -61,12 +61,12 @@ public:
     // Constructors
 
         //- Construct null
-        stl();
+        stlSurfaceWriter();
 
 
     // Destructor
 
-        virtual ~stl();
+        virtual ~stlSurfaceWriter();
 
 
     // Member Functions
@@ -95,7 +95,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "stl.C"
+#   include "stlSurfaceWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFileWriters.C b/src/sampling/sampledSurface/writers/stl/stlSurfaceWriterRunTime.C
similarity index 94%
rename from src/sampling/sampledSurface/writers/foamFile/foamFileWriters.C
rename to src/sampling/sampledSurface/writers/stl/stlSurfaceWriterRunTime.C
index 6db5497d3744dbea36df5411a8384d99fa0bea2b..a748733ecfaad3c15dbbb8d221f676542ab50300 100644
--- a/src/sampling/sampledSurface/writers/foamFile/foamFileWriters.C
+++ b/src/sampling/sampledSurface/writers/stl/stlSurfaceWriterRunTime.C
@@ -24,7 +24,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "foamFileWriters.H"
+#include "stlSurfaceWriter.H"
+#include "surfaceWriters.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -34,7 +35,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-makeSurfaceWriters(foamFile);
+makeSurfaceWriters(stlSurfaceWriter);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/sampling/sampledSurface/writers/stl/stlWriters.C b/src/sampling/sampledSurface/writers/stl/stlWriters.C
deleted file mode 100644
index c0b923e758bc37c5b2e10b27bf7b089051547f0e..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSurface/writers/stl/stlWriters.C
+++ /dev/null
@@ -1,43 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-\*---------------------------------------------------------------------------*/
-
-#include "stlWriters.H"
-#include "addToRunTimeSelectionTable.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-makeSurfaceWriters(stl);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/stl/stlWriters.H b/src/sampling/sampledSurface/writers/stl/stlWriters.H
deleted file mode 100644
index b47d3d82c3af9388ef30f56d93beae982e09e876..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSurface/writers/stl/stlWriters.H
+++ /dev/null
@@ -1,63 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::stlWriters
-
-Description
-
-SourceFiles
-    stlWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef stlWriters_H
-#define stlWriters_H
-
-#include "stl.H"
-#include "surfaceWriters.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-typedef stl<scalar> stlScalarWriter;
-typedef stl<vector> stlVectorWriter;
-typedef stl<sphericalTensor> stlSphericalTensorWriter;
-typedef stl<symmTensor> stlSymmTensorWriter;
-typedef stl<tensor> stlTensorWriter;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/surfaceWriter.H b/src/sampling/sampledSurface/writers/surfaceWriter.H
index 4fd01fad39abcac135217956b312523f6229c329..3a894c6dd1e372c557efc314cb53282fb556e353 100644
--- a/src/sampling/sampledSurface/writers/surfaceWriter.H
+++ b/src/sampling/sampledSurface/writers/surfaceWriter.H
@@ -117,41 +117,6 @@ public:
 #   include "surfaceWriter.C"
 #endif
 
-// Only used internally
-#define makeTypeSurfaceWritersTypeName(type)                                 \
-                                                                             \
-defineNamedTemplateTypeNameAndDebug(type, 0);
-
-// Used externally sometimes
-#define makeSurfaceWritersTypeName(typeWriter)                               \
-                                                                             \
-makeTypeSurfaceWritersTypeName(typeWriter##ScalarWriter);                    \
-makeTypeSurfaceWritersTypeName(typeWriter##VectorWriter);                    \
-makeTypeSurfaceWritersTypeName(typeWriter##SphericalTensorWriter);           \
-makeTypeSurfaceWritersTypeName(typeWriter##SymmTensorWriter);                \
-makeTypeSurfaceWritersTypeName(typeWriter##TensorWriter);
-
-// Define type info for single template instantiation (e.g. vector)
-#define makeSurfaceWriterTypes(WriterType, type)                             \
-                                                                             \
-defineNamedTemplateTypeNameAndDebug(type, 0);                                \
-                                                                             \
-addToRunTimeSelectionTable                                                   \
-(                                                                            \
-    WriterType, type, word                                                   \
-);
-
-
-// Define type info info for scalar, vector etc. instantiations
-#define makeSurfaceWriters(typeWriter)                                       \
-                                                                             \
-makeSurfaceWriterTypes(scalarWriter, typeWriter##ScalarWriter);              \
-makeSurfaceWriterTypes(vectorWriter, typeWriter##VectorWriter);              \
-makeSurfaceWriterTypes(sphericalTensorWriter, typeWriter##SphericalTensorWriter);\
-makeSurfaceWriterTypes(symmTensorWriter, typeWriter##SymmTensorWriter);      \
-makeSurfaceWriterTypes(tensorWriter, typeWriter##TensorWriter);
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #endif
diff --git a/src/sampling/sampledSurface/writers/surfaceWriters.C b/src/sampling/sampledSurface/writers/surfaceWriters.C
index e0d9487eb3c6d5c7e6b0c22c8230069e3d37614c..76781c6e3939775e86d9b37088f298d69c4f1330 100644
--- a/src/sampling/sampledSurface/writers/surfaceWriters.C
+++ b/src/sampling/sampledSurface/writers/surfaceWriters.C
@@ -32,21 +32,15 @@ namespace Foam
 {
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-defineNamedTemplateTypeNameAndDebug(scalarWriter, 0);
-defineTemplateRunTimeSelectionTable(scalarWriter, word);
-
-defineNamedTemplateTypeNameAndDebug(vectorWriter, 0);
-defineTemplateRunTimeSelectionTable(vectorWriter, word);
-
-defineNamedTemplateTypeNameAndDebug(sphericalTensorWriter, 0);
-defineTemplateRunTimeSelectionTable(sphericalTensorWriter, word);
-
-defineNamedTemplateTypeNameAndDebug(symmTensorWriter, 0);
-defineTemplateRunTimeSelectionTable(symmTensorWriter, word);
-
-defineNamedTemplateTypeNameAndDebug(tensorWriter, 0);
-defineTemplateRunTimeSelectionTable(tensorWriter, word);
+#define defineSurfaceWriterType(dataType)                                     \
+    defineNamedTemplateTypeNameAndDebug(surfaceWriter<dataType >, 0);         \
+    defineTemplatedRunTimeSelectionTable(surfaceWriter, word, dataType);
+
+defineSurfaceWriterType(scalar);
+defineSurfaceWriterType(vector);
+defineSurfaceWriterType(sphericalTensor);
+defineSurfaceWriterType(symmTensor);
+defineSurfaceWriterType(tensor);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/sampling/sampledSurface/writers/surfaceWriters.H b/src/sampling/sampledSurface/writers/surfaceWriters.H
index 969fa845d55e315de7450e53c6b43efad8b3792e..b4bb226a76370651a3de79ebd80d405a154c4265 100644
--- a/src/sampling/sampledSurface/writers/surfaceWriters.H
+++ b/src/sampling/sampledSurface/writers/surfaceWriters.H
@@ -36,21 +36,39 @@ Description
 #include "fieldTypes.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// Only used internally
+#define makeTypeSurfaceWritersTypeName(typeWriter, dataType)                 \
+                                                                             \
+    defineNamedTemplateTypeNameAndDebug(typeWriter<dataType >, 0);
+
+// Sometimes used externally
+#define makeSurfaceWritersTypeName(typeWriter)                               \
+                                                                             \
+    makeTypeSurfaceWritersTypeName(typeWriter, scalar);                      \
+    makeTypeSurfaceWritersTypeName(typeWriter, vector);                      \
+    makeTypeSurfaceWritersTypeName(typeWriter, sphericalTensor);             \
+    makeTypeSurfaceWritersTypeName(typeWriter, symmTensor);                  \
+    makeTypeSurfaceWritersTypeName(typeWriter, tensor);
+
+// Define type info for single dataType template instantiation (eg, vector)
+#define makeSurfaceWriterType(typeWriter, dataType)                          \
+                                                                             \
+    defineNamedTemplateTypeNameAndDebug(typeWriter<dataType >, 0);           \
+    addTemplatedToRunTimeSelectionTable                                      \
+    (                                                                        \
+        surfaceWriter, typeWriter, dataType, word                            \
+    );
+
+
+// Define type info for scalar, vector etc. instantiations
+#define makeSurfaceWriters(typeWriter)                                       \
+                                                                             \
+    makeSurfaceWriterType(typeWriter, scalar);                               \
+    makeSurfaceWriterType(typeWriter, vector);                               \
+    makeSurfaceWriterType(typeWriter, sphericalTensor);                      \
+    makeSurfaceWriterType(typeWriter, symmTensor);                           \
+    makeSurfaceWriterType(typeWriter, tensor);
 
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-typedef surfaceWriter<scalar> scalarWriter;
-typedef surfaceWriter<vector> vectorWriter;
-typedef surfaceWriter<sphericalTensor> sphericalTensorWriter;
-typedef surfaceWriter<symmTensor> symmTensorWriter;
-typedef surfaceWriter<tensor> tensorWriter;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/sampling/sampledSurface/writers/vtk/vtk.C b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C
similarity index 85%
rename from src/sampling/sampledSurface/writers/vtk/vtk.C
rename to src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C
index b334be4ed4a5595a53ce4e92e9c8508151144623..b7f27b37106d2127495522ba1009c9153ead28df 100644
--- a/src/sampling/sampledSurface/writers/vtk/vtk.C
+++ b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C
@@ -24,7 +24,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtk.H"
+#include "vtkSurfaceWriter.H"
 #include "fileName.H"
 #include "OFstream.H"
 #include "faceList.H"
@@ -33,7 +33,7 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-void Foam::vtk<Type>::writeGeometry
+void Foam::vtkSurfaceWriter<Type>::writeGeometry
 (
     const pointField& points,
     const faceList& faces,
@@ -48,37 +48,33 @@ void Foam::vtk<Type>::writeGeometry
         << "ASCII" << nl
         << "DATASET POLYDATA" << nl;
 
+    // Write vertex coords
     os  << "POINTS " << points.size() << " float" << nl;
-
     forAll(points, pointI)
     {
         const point& pt = points[pointI];
-
-        os  << float(pt.x()) << ' ' << float(pt.y()) << ' ' << float(pt.z())
-            << nl;
+        os  << float(pt.x()) << ' '
+            << float(pt.y()) << ' '
+            << float(pt.z()) << nl;
     }
     os  << endl;
 
 
-    // Write triangles
-
-    label nFaceVerts = 0;
-
+    // Write faces
+    label nNodes = 0;
     forAll(faces, faceI)
     {
-        const face& f = faces[faceI];
-
-        nFaceVerts += f.size() + 1;
+        nNodes += faces[faceI].size();
     }
 
-    os  << "POLYGONS " << faces.size() << ' ' << nFaceVerts << nl;
+    os  << "POLYGONS " << faces.size() << ' '
+        << faces.size() + nNodes << nl;
 
     forAll(faces, faceI)
     {
         const face& f = faces[faceI];
 
         os << f.size();
-
         forAll(f, fp)
         {
             os << ' ' << f[fp];
@@ -90,7 +86,7 @@ void Foam::vtk<Type>::writeGeometry
 
 // Write scalarField in vtk format
 template<class Type>
-void Foam::vtk<Type>::writeData
+void Foam::vtkSurfaceWriter<Type>::writeData
 (
     const fileName& fieldName,
     const pointField& points,
@@ -116,16 +112,18 @@ void Foam::vtk<Type>::writeData
 
     forAll(values, elemI)
     {
-        os << float(values[elemI]);
-
-        if (elemI > 0 && (elemI%10) == 0)
+        if (elemI)
         {
-            os << nl;
-        }
-        else
-        {
-            os << ' ';
+            if (elemI % 10)
+            {
+                os << ' ';
+            }
+            else
+            {
+                os << nl;
+            }
         }
+        os << float(values[elemI]);
     }
     os << nl;
 }
@@ -133,7 +131,7 @@ void Foam::vtk<Type>::writeData
 
 // Write vectorField in vtk format
 template<class Type>
-void Foam::vtk<Type>::writeData
+void Foam::vtkSurfaceWriter<Type>::writeData
 (
     const fileName& fieldName,
     const pointField& points,
@@ -168,7 +166,7 @@ void Foam::vtk<Type>::writeData
 
 // Write sphericalTensorField in vtk format
 template<class Type>
-void Foam::vtk<Type>::writeData
+void Foam::vtkSurfaceWriter<Type>::writeData
 (
     const fileName& fieldName,
     const pointField& points,
@@ -204,7 +202,7 @@ void Foam::vtk<Type>::writeData
 
 // Write symmTensorField in vtk format
 template<class Type>
-void Foam::vtk<Type>::writeData
+void Foam::vtkSurfaceWriter<Type>::writeData
 (
     const fileName& fieldName,
     const pointField& points,
@@ -241,7 +239,7 @@ void Foam::vtk<Type>::writeData
 
 // Write tensorField in vtk format
 template<class Type>
-void Foam::vtk<Type>::writeData
+void Foam::vtkSurfaceWriter<Type>::writeData
 (
     const fileName& fieldName,
     const pointField& points,
@@ -281,7 +279,7 @@ void Foam::vtk<Type>::writeData
 
 // Construct from components
 template<class Type>
-Foam::vtk<Type>::vtk()
+Foam::vtkSurfaceWriter<Type>::vtkSurfaceWriter()
 :
     surfaceWriter<Type>()
 {}
@@ -290,14 +288,14 @@ Foam::vtk<Type>::vtk()
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::vtk<Type>::~vtk()
+Foam::vtkSurfaceWriter<Type>::~vtkSurfaceWriter()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::vtk<Type>::write
+void Foam::vtkSurfaceWriter<Type>::write
 (
     const fileName& samplePath,
     const fileName& timeDir,
@@ -316,18 +314,17 @@ void Foam::vtk<Type>::write
         mkDir(surfaceDir);
     }
 
-    fileName planeFName(surfaceDir/fieldName + '_' + surfaceName + ".vtk");
+    fileName fName(surfaceDir/fieldName + '_' + surfaceName + ".vtk");
 
     if (verbose)
     {
-        Info<< "Writing field " << fieldName << " to " << planeFName << endl;
+        Info<< "Writing field " << fieldName << " to " << fName << endl;
     }
 
-    OFstream vtkFile(planeFName);
-
-    writeGeometry(points, faces, vtkFile);
+    OFstream os(fName);
 
-    writeData(fieldName, points, values, vtkFile);
+    writeGeometry(points, faces, os);
+    writeData(fieldName, points, values, os);
 }
 
 
diff --git a/src/sampling/sampledSurface/writers/vtk/vtk.H b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.H
similarity index 92%
rename from src/sampling/sampledSurface/writers/vtk/vtk.H
rename to src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.H
index 5e8655ebebff90ff5ab91f81bcfe64f592f53bef..167241d19ac539a9469d7fdc96f8b171c6db502f 100644
--- a/src/sampling/sampledSurface/writers/vtk/vtk.H
+++ b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.H
@@ -23,17 +23,17 @@ License
     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 Class
-    Foam::vtk
+    Foam::vtkSurfaceWriter
 
 Description
 
 SourceFiles
-    vtk.C
+    vtkSurfaceWriter.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtk_H
-#define vtk_H
+#ifndef vtkSurfaceWriter_H
+#define vtkSurfaceWriter_H
 
 #include "surfaceWriter.H"
 
@@ -43,11 +43,11 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class vtk Declaration
+                     Class vtkSurfaceWriter Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class vtk
+class vtkSurfaceWriter
 :
     public surfaceWriter<Type>
 {
@@ -110,12 +110,12 @@ public:
     // Constructors
 
         //- Construct null
-        vtk();
+        vtkSurfaceWriter();
 
 
     // Destructor
 
-        virtual ~vtk();
+        virtual ~vtkSurfaceWriter();
 
 
     // Member Functions
@@ -144,7 +144,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "vtk.C"
+#   include "vtkSurfaceWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/writers/null/nullWriters.C b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriterRunTime.C
similarity index 94%
rename from src/sampling/sampledSurface/writers/null/nullWriters.C
rename to src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriterRunTime.C
index 159d23e597ee34785404f5e5da92121ffd0d9312..0cc5cf4ce4567f4a7084a5bbc6b8feab1cd15bf1 100644
--- a/src/sampling/sampledSurface/writers/null/nullWriters.C
+++ b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriterRunTime.C
@@ -24,7 +24,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "nullWriters.H"
+#include "vtkSurfaceWriter.H"
+#include "surfaceWriters.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -34,7 +35,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-makeSurfaceWriters(null);
+makeSurfaceWriters(vtkSurfaceWriter);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/sampling/sampledSurface/writers/vtk/vtkWriters.C b/src/sampling/sampledSurface/writers/vtk/vtkWriters.C
deleted file mode 100644
index bd1ed10045ed55d17b10c660a9e1e920c87f50d4..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSurface/writers/vtk/vtkWriters.C
+++ /dev/null
@@ -1,43 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-\*---------------------------------------------------------------------------*/
-
-#include "vtkWriters.H"
-#include "addToRunTimeSelectionTable.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-makeSurfaceWriters(vtk);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// ************************************************************************* //
diff --git a/src/sampling/sampledSurface/writers/vtk/vtkWriters.H b/src/sampling/sampledSurface/writers/vtk/vtkWriters.H
deleted file mode 100644
index 421098e8574f8c26d11cb152f8cb2d749067373b..0000000000000000000000000000000000000000
--- a/src/sampling/sampledSurface/writers/vtk/vtkWriters.H
+++ /dev/null
@@ -1,63 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-InClass
-    Foam::vtkWriters
-
-Description
-
-SourceFiles
-    vtkWriters.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef vtkWriters_H
-#define vtkWriters_H
-
-#include "vtk.H"
-#include "surfaceWriters.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-typedef vtk<scalar> vtkScalarWriter;
-typedef vtk<vector> vtkVectorWriter;
-typedef vtk<sphericalTensor> vtkSphericalTensorWriter;
-typedef vtk<symmTensor> vtkSymmTensorWriter;
-typedef vtk<tensor> vtkTensorWriter;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //