diff --git a/Common/Message.h b/Common/Message.h
index 30383e6dc4fb23d4b9ba22cdb2adb3e3f9a82bd5..ed5fe16fcda321e393c1bae818f669a281f4e5d2 100644
--- a/Common/Message.h
+++ b/Common/Message.h
@@ -7,7 +7,6 @@
 #define _MESSAGE_H_
 
 #include <map>
-#include <vector>
 #include <string>
 #include <stdarg.h>
 
diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp
index 78ba2ade13c6b3415a0a36e4674f867e8fc1b8a9..f887184cdd3b3c62580a650426d17c99606f611f 100644
--- a/Geo/GEdge.cpp
+++ b/Geo/GEdge.cpp
@@ -10,12 +10,10 @@
 #include "GFace.h"
 #include "MElement.h"
 #include "GmshDefines.h"
+#include "Message.h"
 
-#if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
-#else
-#  include "Message.h"
-#  include "GaussLegendre1D.h"
+#if !defined(HAVE_GMSH_EMBEDDED)
+#include "GaussLegendre1D.h"
 #endif
 
 GEdge::GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1)
diff --git a/Geo/GEdgeLoop.cpp b/Geo/GEdgeLoop.cpp
index 7e4d501e98f43148b40add3dd398fb6d78462b88..c1305259322426d0345808f0ba9d7e5029d59b70 100644
--- a/Geo/GEdgeLoop.cpp
+++ b/Geo/GEdgeLoop.cpp
@@ -6,12 +6,7 @@
 #include <algorithm>
 #include <functional>
 #include "GEdgeLoop.h"
-
-#if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
-#else
-#  include "Message.h"
-#endif
+#include "Message.h"
 
 void GEdgeSigned::print() const
 {
diff --git a/Geo/GEntity.cpp b/Geo/GEntity.cpp
index e98253798ab000317d64db16a89deb480d5b61f7..37996510afda56dcc74e19c480966dec82b2a259 100644
--- a/Geo/GEntity.cpp
+++ b/Geo/GEntity.cpp
@@ -7,12 +7,12 @@
 #include "GModel.h"
 #include "GEntity.h"
 #include "MElement.h"
+#include "VertexArray.h"
 
 #if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
+#include "GmshEmbedded.h"
 #else
-#  include "VertexArray.h"
-#  include "Context.h"
+#include "Context.h"
 #endif
 
 extern Context_T CTX;
diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp
index 8921c9a31560da0f5c3b52b695ee60d505f33add..51969a9b653a65fc04f2ca0093d57ecc73be2a83 100644
--- a/Geo/GFace.cpp
+++ b/Geo/GFace.cpp
@@ -8,23 +8,23 @@
 #include "GFace.h"
 #include "GEdge.h"
 #include "MElement.h"
+#include "Message.h"
+#include "VertexArray.h"
 
 #if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
+#include "GmshEmbedded.h"
 #else
-#  include "Message.h"
-#  include "Numeric.h"
-#  include "GaussLegendre1D.h"
-#  include "VertexArray.h"
-#  include "Context.h"
-#  if defined(HAVE_GSL)
-#    include <gsl/gsl_vector.h>
-#    include <gsl/gsl_linalg.h>
-#  else
-#    define NRANSI
-#    include "nrutil.h"
+#include "Numeric.h"
+#include "GaussLegendre1D.h"
+#include "Context.h"
+#if defined(HAVE_GSL)
+#include <gsl/gsl_vector.h>
+#include <gsl/gsl_linalg.h>
+#else
+#define NRANSI
+#include "nrutil.h"
 void dsvdcmp(double **a, int m, int n, double w[], double **v);
-#  endif
+#endif
 #endif
 
 extern Context_T CTX;
diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp
index 99a0931426eb8eb4a91db85fd226b1e47e00c2e0..b969cbdcca34f30c78e381ad2b2626be11a7bb10 100644
--- a/Geo/GModel.cpp
+++ b/Geo/GModel.cpp
@@ -10,16 +10,16 @@
 #include "discreteFace.h"
 #include "discreteEdge.h"
 #include "discreteVertex.h"
+#include "Message.h"
 
 #if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
+#include "GmshEmbedded.h"
 #else
-#  include "Message.h"
-#  include "gmshSurface.h"
-#  include "Octree.h"
-#  include "Field.h"
-#  include "Generator.h"
-#  include "Context.h"
+#include "gmshSurface.h"
+#include "Octree.h"
+#include "Field.h"
+#include "Generator.h"
+#include "Context.h"
 #endif
 
 extern Context_T CTX;
diff --git a/Geo/GModelIO_CGNS.cpp b/Geo/GModelIO_CGNS.cpp
index 7939d9ccd3132a12c2a74e2c341d2b1ad791fb4b..9eb61814594883851e99f9055eb4ee0180a950e5 100644
--- a/Geo/GModelIO_CGNS.cpp
+++ b/Geo/GModelIO_CGNS.cpp
@@ -39,10 +39,10 @@
 
 int cgnsErr(const int cgIndexFile = -1)
 {
-  Message::Error("Error detected by CGNS library\n");
-  Message::Error(cg_get_error());
+  Msg::Error("Error detected by CGNS library\n");
+  Msg::Error(cg_get_error());
   if(cgIndexFile != -1)
-    if(cg_close(cgIndexFile)) Message::Error("Unable to close CGNS file");
+    if(cg_close(cgIndexFile)) Msg::Error("Unable to close CGNS file");
   return 0;
 }
 
@@ -314,7 +314,7 @@ int GModel::writeCGNS(const std::string &name, int zoneDefinition,
           }
           break;
         default:
-          Message::Error("No mesh elements were found");
+          Msg::Error("No mesh elements were found");
           return 0;
         }
         // Place pointers to the entities in the 'groups' object
@@ -374,7 +374,7 @@ int GModel::writeCGNS(const std::string &name, int zoneDefinition,
       }
       break;
     default:
-      Message::Error("No mesh elements were found");
+      Msg::Error("No mesh elements were found");
       return 0;
     }
   }
@@ -866,7 +866,7 @@ int write_CGNS_zones(GModel &model, const int zoneDefinition, const int numZone,
             MElement::getInfoMSH(typeMSHm1+1, &elemName);
             if(typeCGNS == -1) {
               // This type is not supported in CGNS
-              Message::Warning("Element type %s is not supported in CGNS and "
+              Msg::Warning("Element type %s is not supported in CGNS and "
                                "has not been written to the file", elemName);
             }
             else {
@@ -1063,14 +1063,14 @@ int write_CGNS_zones(GModel &model, const int zoneDefinition, const int numZone,
 
 int GModel::readCGNS(const std::string &name)
 {
-  Message::Error("This version of Gmsh was compiled without CGNS support");
+  Msg::Error("This version of Gmsh was compiled without CGNS support");
   return 0;
 }
 
 int GModel::writeCGNS(const std::string &name, int zoneDefinition,
                       const CGNSOptions &options, double scalingFactor)
 {
-  Message::Error("This version of Gmsh was compiled without CGNS support");
+  Msg::Error("This version of Gmsh was compiled without CGNS support");
   return 0;
 }
 
diff --git a/Geo/GModelIO_Geo.cpp b/Geo/GModelIO_Geo.cpp
index 6ba5f396647c120427c1ab2a46d1f78da5d11650..aef507ff238b74647b15a41f545882272a128c05 100644
--- a/Geo/GModelIO_Geo.cpp
+++ b/Geo/GModelIO_Geo.cpp
@@ -137,12 +137,12 @@ int GModel::importGEOInternals()
   return 1;
 }
 
-class writeFieldOptionGEO{
+class writeFieldOptionGEO {
  private :
   FILE *geo;
   Field *field;
  public :
-  writeFieldOptionGEO(FILE *fp,Field *_field) { geo = fp ? fp : stdout; field=_field;}
+  writeFieldOptionGEO(FILE *fp,Field *_field) { geo = fp ? fp : stdout; field=_field; }
   void operator() (std::pair<std::string, FieldOption *> it)
   {
     std::string v;
@@ -151,7 +151,7 @@ class writeFieldOptionGEO{
   }
 };
 
-class writeFieldGEO{
+class writeFieldGEO {
  private :
   FILE *geo;
  public :
diff --git a/Geo/GModelIO_MED.cpp b/Geo/GModelIO_MED.cpp
index 213b04295cddca25ca3450acd869722861accdab..83c129fd248205e96a846763138a8ec2a5aa2277 100644
--- a/Geo/GModelIO_MED.cpp
+++ b/Geo/GModelIO_MED.cpp
@@ -235,8 +235,8 @@ int GModel::readMED(const std::string &name, int meshIndex)
 			   (meshDim > 2) ? coord[meshDim * i + 2] : 0.,
 			   0, nodeTags.empty() ? 0 : nodeTags[i]);
 
-  // read elements
-  for(int mshType = 0; mshType < 50; mshType++){ // loop over all possible MSH types
+  // read elements (loop over all possible MSH element types)
+  for(int mshType = 0; mshType < MSH_NUM_TYPE; mshType++){
     med_geometrie_element type = msh2medElementType(mshType);
     if(type == MED_NONE) continue;
     med_int numEle = MEDnEntMaa(fid, meshName, MED_CONN, MED_MAILLE, type, MED_NOD);
diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp
index 6ac8501d7bb7b3263b552a91c7cf934820bbee6a..41fef3126f09ba71ec01d665eee9fc7b23c2e3c5 100644
--- a/Geo/GModelIO_Mesh.cpp
+++ b/Geo/GModelIO_Mesh.cpp
@@ -16,12 +16,7 @@
 #include "discreteEdge.h"
 #include "discreteVertex.h"
 #include "StringUtils.h"
-
-#if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
-#else
-#  include "Message.h"
-#endif
+#include "Message.h"
 
 static void storePhysicalTagsInEntities(GModel *m, int dim,
                                         std::map<int, std::map<int, std::string> > &map)
@@ -115,14 +110,11 @@ int GModel::readMSH(const std::string &name)
     return 0;
   }
 
-  double version = 1.0;
-  bool binary = false, swap = false;
   char str[256] = "XXX";
+  double version = 1.0;
+  bool binary = false, swap = false, postpro = false;
   std::map<int, std::vector<MElement*> > elements[8];
   std::map<int, std::map<int, std::string> > physicals[4];
-  bool postpro = false;
-
-  // we might want to cache those for post-processing lookups
   std::map<int, MVertex*> vertexMap;
   std::vector<MVertex*> vertexVector;
  
@@ -424,7 +416,7 @@ int GModel::writeMSH(const std::string &name, double version, bool binary,
   // get the number of elements (we assume that all the elements in a
   // list have the same type, i.e., they are all of the same
   // polynomial order)
-  std::map<int,int> elements;
+  std::map<int, int> elements;
   for(viter it = firstVertex(); it != lastVertex(); ++it){
     int p = (saveAll ? 1 : (*it)->physicals.size());
     int n = p * (*it)->points.size();
@@ -455,7 +447,7 @@ int GModel::writeMSH(const std::string &name, double version, bool binary,
   }
 
   int numElements = 0;
-  std::map<int,int>::const_iterator it = elements.begin();
+  std::map<int, int>::const_iterator it = elements.begin();
   for(; it != elements.end(); ++it)
     numElements += it->second;
 
diff --git a/Geo/GRegion.cpp b/Geo/GRegion.cpp
index 1e45529c57edac03d3be4f650b2d46b9bb072a13..f785033ee0f66b111e9cdb0448c5ba1f5dbb0cee 100644
--- a/Geo/GRegion.cpp
+++ b/Geo/GRegion.cpp
@@ -8,12 +8,7 @@
 #include "GRegion.h"
 #include "GFace.h"
 #include "MElement.h"
-
-#if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
-#else
-#  include "Message.h"
-#endif
+#include "Message.h"
 
 GRegion::GRegion(GModel *model, int tag) : GEntity (model, tag)
 {
diff --git a/Geo/GVertex.cpp b/Geo/GVertex.cpp
index 9d9efb8a3b3b9abda8f8928ce7adf1e7bff15852..6bac3597d4d8ed0fc751b5f2b768e6c5f0b5196a 100644
--- a/Geo/GVertex.cpp
+++ b/Geo/GVertex.cpp
@@ -8,12 +8,7 @@
 #include "GVertex.h"
 #include "GFace.h"
 #include "MElement.h"
-
-#if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
-#else
-#  include "Message.h"
-#endif
+#include "Message.h"
 
 GVertex::GVertex(GModel *m, int tag, double ms) : GEntity(m, tag), meshSize(ms) 
 {
diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index d5f0c88040b28a181767f4813204bc5439b3d364..62e51f709ebedebf5130a8bef3042b6b4420fc8f 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -9,17 +9,17 @@
 #include "GEntity.h"
 #include "GFace.h"
 #include "FunctionSpace.h"
+#include "Message.h"
 
 #if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
+#include "GmshEmbedded.h"
 #else
-#  include "Numeric.h"
-#  include "GaussLegendre1D.h"
-#  include "Message.h"
-#  include "Context.h"
-#  include "qualityMeasures.h"
-#  include "meshGFaceDelaunayInsertion.h"
-#  include "meshGRegionDelaunayInsertion.h"
+#include "Numeric.h"
+#include "GaussLegendre1D.h"
+#include "Context.h"
+#include "qualityMeasures.h"
+#include "meshGFaceDelaunayInsertion.h"
+#include "meshGRegionDelaunayInsertion.h"
 #endif
 
 #define SQU(a)      ((a)*(a))
@@ -101,7 +101,7 @@ void MElement::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) const
 SPoint3 MTriangle::circumcenter()
 {
 #if defined(HAVE_GMSH_EMBEDDED)
-  return 0.;
+  return SPoint3();
 #else
   double p1[3] = {_v[0]->x(),_v[0]->y(),_v[0]->z()};
   double p2[3] = {_v[1]->x(),_v[1]->y(),_v[1]->z()};
@@ -115,7 +115,7 @@ SPoint3 MTriangle::circumcenter()
 SPoint3 MTetrahedron::circumcenter()
 {
 #if defined(HAVE_GMSH_EMBEDDED)
-  return 0.;
+  return SPoint3();
 #else
   MTet4 t(this,0);
   double res[3];
diff --git a/Geo/MFace.cpp b/Geo/MFace.cpp
index 3b254cbda380f125c24322ac5451a7eaebcc9aad..a151dc2523625666b2cc3005fcc64a907ba7df67 100644
--- a/Geo/MFace.cpp
+++ b/Geo/MFace.cpp
@@ -6,10 +6,10 @@
 #include "MFace.h"
 
 #if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
+#include "GmshEmbedded.h"
 #else
-#  include "Numeric.h"
-#  include "Context.h"
+#include "Numeric.h"
+#include "Context.h"
 #endif
 
 extern Context_T CTX;
diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp
index e03508e9e3177823aac70a56cddb5aef4e01c0ab..2da12d72fe08070f00f6e10157ed4dc5f6de3e1f 100644
--- a/Geo/MVertex.cpp
+++ b/Geo/MVertex.cpp
@@ -8,12 +8,7 @@
 #include "MVertex.h"
 #include "GEdge.h"
 #include "GFace.h"
-
-#if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
-#else
-#  include "Message.h"
-#endif
+#include "Message.h"
 
 int MVertex::_globalNum = 0;
 double MVertexLessThanLexicographic::tolerance = 1.e-6;
diff --git a/Geo/discreteEdge.cpp b/Geo/discreteEdge.cpp
index 0b623acb5856908e96d7d1647bca7b7e31c163b8..ebc325363b6df1377428fe57dbed16d02f206bf4 100644
--- a/Geo/discreteEdge.cpp
+++ b/Geo/discreteEdge.cpp
@@ -4,12 +4,10 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "discreteEdge.h"
+#include "Message.h"
 
-#if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
-#else
-#  include "Geo.h"
-#  include "Message.h"
+#if !defined(HAVE_GMSH_EMBEDDED)
+#include "Geo.h"
 #endif
 
 discreteEdge::discreteEdge(GModel *model, int num) : GEdge(model, num, 0, 0) 
diff --git a/Geo/discreteFace.cpp b/Geo/discreteFace.cpp
index ec964499161e33c81f542b7b377d186ee50c69bb..c80b0f0dd5c74a99d5081e89d0239f8819881d88 100644
--- a/Geo/discreteFace.cpp
+++ b/Geo/discreteFace.cpp
@@ -4,12 +4,10 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "discreteFace.h"
+#include "Message.h"
 
-#if defined(HAVE_GMSH_EMBEDDED)
-#  include "GmshEmbedded.h"
-#else
-#  include "Geo.h"
-#  include "Message.h"
+#if !defined(HAVE_GMSH_EMBEDDED)
+#include "Geo.h"
 #endif
 
 discreteFace::discreteFace(GModel *model, int num) : GFace(model, num)
diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp
index 6935469d6ed5c162615c837fe185e7986bc40554..043e7094ea4d0b25b4875c54f9350f5defb26c96 100644
--- a/Geo/gmshFace.cpp
+++ b/Geo/gmshFace.cpp
@@ -186,7 +186,6 @@ GPoint gmshFace::point(double par1, double par2) const
 
 GPoint gmshFace::closestPoint(const SPoint3 & qp, const double initialGuess[2]) const
 {
-
   if (s->Typ ==  MSH_SURF_PLAN && !s->geometry){
     double XP = qp.x();
     double YP = qp.y();
@@ -279,7 +278,6 @@ GEntity::GeomType gmshFace::geomType() const
   }
 }
 
-
 bool gmshFace::containsPoint(const SPoint3 &pt) const
 { 
   if(geomType() == Plane){
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index 2c3f688b409e0940b4bb5c99e14b5fa3e6bf8b82..efe9b7bde6ab6c88266bdb4d69689d2d3f60ad15 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1335,8 +1335,8 @@ class initPView {
     p->va_vectors->finalize();
 
     Msg::Info("Rendering %d vertices", p->va_points->getNumVertices() + 
-        p->va_lines->getNumVertices() + p->va_triangles->getNumVertices() + 
-        p->va_vectors->getNumVertices());
+	      p->va_lines->getNumVertices() + p->va_triangles->getNumVertices() + 
+	      p->va_vectors->getNumVertices());
 
     p->setChanged(false);
   }
@@ -1405,7 +1405,7 @@ class drawPView {
     }
 
     if(opt->RangeType == PViewOptions::Custom){
-      opt->TmpMin = opt->CustomMin;
+       opt->TmpMin = opt->CustomMin;
       opt->TmpMax = opt->CustomMax;
     }
     else if(opt->RangeType == PViewOptions::PerTimeStep){
diff --git a/Graphics/gl2ps.cpp b/Graphics/gl2ps.cpp
index f0427bfb4ba223f6aa407e646a1f4024d40cd37a..37e5df6f81ccbd64023330110d90bb34c1913263 100644
--- a/Graphics/gl2ps.cpp
+++ b/Graphics/gl2ps.cpp
@@ -1,8 +1,4 @@
-// Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
-//
-// See the LICENSE.txt file for license information. Please report all
-// bugs and problems to <gmsh@geuz.org>.
-/* $Id: gl2ps.cpp,v 1.115 2008-07-11 16:56:01 geuzaine Exp $ */
+/* $Id: gl2ps.cpp,v 1.116 2008-09-08 19:34:40 geuzaine Exp $ */
 /*
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2007 Christophe Geuzaine <geuz@geuz.org>
diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index f149924c640192b7b74193dfe15974dcc7eeed0d..c718026a0fd7b9812c1025f163184cda8d12bb68 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -476,8 +476,8 @@ class ThresholdField : public Field
     options["Sigmoid"] = new FieldOptionBool(sigmoid, "True to interpolate between LcMin "
 					     "and LcMax using a sigmoid, false to "
 					     "interpolate linearly");
-    options["StopAtDistMax"] = new FieldOptionBool(stopAtDistMax, "True to not impose element "
-						   "size outside DistMax");
+    options["StopAtDistMax"] = new FieldOptionBool(stopAtDistMax, "True to not impose "
+						   "element size outside DistMax");
   }
   double operator() (double x, double y, double z)
   {
@@ -826,7 +826,8 @@ class MathEvalExpression
     if(evaluators_id)
       delete evaluators_id;
   }
-  ~MathEvalExpression() {
+  ~MathEvalExpression()
+  {
     free_members();
   }
 };
@@ -838,7 +839,9 @@ class MathEvalField : public Field
  public:
   MathEvalField()
   {
-    options["F"] = new FieldOptionString(f, "Function", &update_needed);
+    options["F"] = new FieldOptionString(f, "Mathematical function (possible arguments: "
+					 "x, y, z for spatial coordinates or F0, F1, "
+					 "..., for field values)", &update_needed);
   }
   double operator() (double x, double y, double z)
   {
diff --git a/Mesh/Partition.cpp b/Mesh/Partition.cpp
index 03873774d42ebc36fefd6b03ec223301c08f907a..6da45ea7348a648af31eed3f89c630e4f563f727 100644
--- a/Mesh/Partition.cpp
+++ b/Mesh/Partition.cpp
@@ -327,7 +327,7 @@ int MakeGraph(GModel *const model, Graph &graph, BoElemGrVec *const boElemGrVec)
                             boElemGrVec);
           }
           catch(...) {
-            Message::Error("Exception thrown during graph generation");
+            Msg::Error("Exception thrown during graph generation");
             ier = 2;
           }
         }
@@ -349,7 +349,7 @@ int MakeGraph(GModel *const model, Graph &graph, BoElemGrVec *const boElemGrVec)
                             boElemGrVec);
           }
           catch(...) {
-            Message::Error("Exception thrown during graph generation");
+            Msg::Error("Exception thrown during graph generation");
             ier = 2;
           }
         }
@@ -386,7 +386,7 @@ int MakeGraph(GModel *const model, Graph &graph, BoElemGrVec *const boElemGrVec)
 //             if((*it)->triangles.size() + (*it)->quadrangles.size() > 0)
 //               groups[face][1].push_back(*it);
 //           if(groups[face].size() == 0) {
-//             Message::Error("No mesh elements were found");
+//             Msg::Error("No mesh elements were found");
 //             return;
 //           }
 //         }
@@ -409,7 +409,7 @@ int MakeGraph(GModel *const model, Graph &graph, BoElemGrVec *const boElemGrVec)
 //           }
 //           const int numGrVert = numElem[ElemTypeTri] + numElem[ElemTypeQuad];
 //           if(numGrVert == 0) {
-//             Message::Error("No mesh elements were found");
+//             Msg::Error("No mesh elements were found");
 //             return;
 //           }
 //           const int maxGrEdge =
@@ -441,7 +441,7 @@ int MakeGraph(GModel *const model, Graph &graph, BoElemGrVec *const boElemGrVec)
 //           const int numGrVert = numElem[ElemTypeTetra] + numElem[ElemTypeHexa] +
 //             numElem[ElemTypePrism] + numElem[ElemTypePyramid];
 //           if(numGrVert == 0) {
-//             Message::Error("No mesh elements were found");
+//             Msg::Error("No mesh elements were found");
 //             return;
 //           }
 //           const int maxGrEdge =
diff --git a/Numeric/NumericEmbedded.cpp b/Numeric/NumericEmbedded.cpp
index 84e2a5c535aa2927f5a91341a18a5c9ef75afbb4..6daede6b397a2339f23c22f84610bd2e5e9a3727 100644
--- a/Numeric/NumericEmbedded.cpp
+++ b/Numeric/NumericEmbedded.cpp
@@ -8,12 +8,7 @@
 // Msg)
 
 #include "NumericEmbedded.h"
-
-#if defined(HAVE_GMSH_EMBEDDED)
-#include "GmshEmbedded.h"
-#else
 #include "Message.h"
-#endif
 
 #define SQU(a)      ((a)*(a))
 
diff --git a/doc/texinfo/opt_fields.texi b/doc/texinfo/opt_fields.texi
index 40890a5f5cec51e035c1f8f74e81ce6b0798943e..f4924bc18d7c31edb6eb6fdb416efce1d9ce9111 100644
--- a/doc/texinfo/opt_fields.texi
+++ b/doc/texinfo/opt_fields.texi
@@ -77,7 +77,7 @@ Field index (type: integer; default value: 1)
 Options:
 @table @code
 @item F
-Function (type: string; default value: "")
+Mathematical function (possible arguments: x, y, z for spatial coordinates or F0, F1, ..., for field values) (type: string; default value: "")
 @end table
 @item Max
 
@@ -156,6 +156,8 @@ Element size outside DistMax (type: float; default value: 1)
 Element size inside DistMin (type: float; default value: 0.1)
 @item Sigmoid
 True to interpolate between LcMin and LcMax using a sigmoid, false to interpolate linearly (type: boolean; default value: 0)
+@item StopAtDistMax
+True to not impose element size outside DistMax (type: boolean; default value: 0)
 @end table
 @item UTM
 
diff --git a/utils/embed/GmshEmbedded.h b/utils/embed/GmshEmbedded.h
index d72638b4b73c3c864e63abb4059d9eca0d8d960a..18726b0364fa8252466d92fc91b4adce98e57af3 100644
--- a/utils/embed/GmshEmbedded.h
+++ b/utils/embed/GmshEmbedded.h
@@ -7,7 +7,6 @@
 #define _GMSH_EMBEDDED_H_
 
 #include "NumericEmbedded.h"
-#include "Message.h"
 
 class Context_T{
 public:
diff --git a/utils/embed/Makefile b/utils/embed/Makefile
index e8089c8c949a542bda7fed78b7d458b325cf9272..ff7462c6fe85984b3be7ee65dfb273f869d41345 100644
--- a/utils/embed/Makefile
+++ b/utils/embed/Makefile
@@ -19,6 +19,7 @@ SRC = GModel.cpp\
       MElement.cpp\
         MFace.cpp MVertex.cpp\
       NumericEmbedded.cpp\
+        FunctionSpace.cpp\
       StringUtils.cpp\
       GmshEmbedded.cpp