diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 41ee483d395f31052c42cfc3cea01270e3d541ed..d1c6bf721ce3f5601d7422f3f931f57c285d8a42 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.599 2007-02-14 14:54:29 geuzaine Exp $
+// $Id: GUI.cpp,v 1.600 2007-02-21 08:17:16 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -297,7 +297,7 @@ Context_Item menu_mesh[] = {
       {"Delete", (Fl_Callback *)mesh_delete_cb} ,
       //{"Update edges",   (Fl_Callback *)mesh_update_edges_cb} ,
       {"Reparameterize", (Fl_Callback *)mesh_parameterize_cb} ,
-      //{"Remesh",         (Fl_Callback *)mesh_remesh_cb} , 
+      //{"Remesh 2D",      (Fl_Callback *)mesh_remesh_cb} , 
       {0} 
     };  
         Context_Item menu_mesh_delete[] = {
diff --git a/Geo/GModelIO_Fourier.cpp b/Geo/GModelIO_Fourier.cpp
index 3a91859e87d6a0bb4c27a3e2db0ac2f19689b57c..26f720134a744533a8dccbb790431825ef7cd215 100644
--- a/Geo/GModelIO_Fourier.cpp
+++ b/Geo/GModelIO_Fourier.cpp
@@ -622,6 +622,7 @@ fourierFace::~fourierFace()
 
 void fourierFace::meshBoundary()
 {
+  /*
   const double tol = 1.e-6;
 
   _discrete = 0;
@@ -754,6 +755,7 @@ void fourierFace::meshBoundary()
   l_edges.push_back(_e[1]); l_dirs.push_back(1);
   l_edges.push_back(_e[2]); l_dirs.push_back(1);
   l_edges.push_back(_e[3]); l_dirs.push_back(1);
+  */
 }
 
 Range<double> fourierFace::parBounds(int i) const
@@ -826,12 +828,12 @@ int GModel::readFourier(const std::string &name)
     add(new fourierFace(this, i));
 
   // mesh each face with quads
-  //std::for_each(firstFace(), lastFace(), meshCartesian());
-  //return 1;
+  std::for_each(firstFace(), lastFace(), meshCartesian());
+  return 1;
 
   // mesh each face using the standard gmsh algorithms
-  std::for_each(firstFace(), lastFace(), meshGmsh());
-  return 1;
+  //std::for_each(firstFace(), lastFace(), meshGmsh());
+  //return 1;
 
   // compute partition of unity
   std::for_each(firstFace(), lastFace(), computePartitionOfUnity());
diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index 519d089cb691a7b0fd66eb5f53a54cff9d620633..f5e1fa08e7e550121c290ff988ff8c29750326d5 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -1,4 +1,4 @@
-// $Id: Geo.cpp,v 1.81 2007-02-15 08:26:45 geuzaine Exp $
+// $Id: Geo.cpp,v 1.82 2007-02-21 08:17:16 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -624,7 +624,6 @@ Surface *Create_Surface(int Num, int Typ)
   pS->Recombine_Dir = -1;
   pS->RecombineAngle = 75;
   pS->TrsfPoints = List_Create(4, 4, sizeof(Vertex *));
-  pS->Contours = List_Create(1, 1, sizeof(List_T *));
   pS->Control_Points = List_Create(1, 10, sizeof(Vertex *));
   pS->Generatrices = NULL;
   pS->EmbeddedPoints = NULL;
@@ -639,7 +638,6 @@ void Free_Surface(void *a, void *b)
   Surface *pS = *(Surface **) a;
   if(pS) {
     List_Delete(pS->TrsfPoints);
-    List_Delete(pS->Contours);
     List_Delete(pS->Control_Points);
     List_Delete(pS->Generatrices);
     List_Delete(pS->EmbeddedCurves);
@@ -952,9 +950,6 @@ void CopySurface(Surface * s, Surface * ss)
   for(i = 0; i < 3; i++)
     for(j = 0; j < 3; j++)
       ss->plan[i][j] = s->plan[i][j];
-  for(i = 0; i < 3; i++)
-    for(j = 0; j < 3; j++)
-      ss->invplan[i][j] = s->invplan[i][j];
   ss->Generatrices = List_Create(List_Nbr(s->Generatrices), 1, sizeof(Curve *));
   List_Copy(s->Generatrices, ss->Generatrices);
   if(s->Control_Points) {
@@ -2856,6 +2851,8 @@ void Projette(Vertex * v, double mat[3][3])
   v->Pos.Z = Z;
 }
 
+// Bunch of utility routines
+
 void sortEdgesInLoop(int num, List_T *edges)
 {
   // This function sorts the edges in an EdgeLoop and detects any
@@ -2909,7 +2906,7 @@ void sortEdgesInLoop(int num, List_T *edges)
 
 void setSurfaceEmbeddedPoints(Surface *s, List_T *points)
 {
-  if (! s->EmbeddedPoints )
+  if(!s->EmbeddedPoints)
     s->EmbeddedPoints = List_Create(4, 4, sizeof(Vertex *));
   int nbPoints = List_Nbr(points);
   for(int i = 0; i < nbPoints; i++) {
@@ -2917,7 +2914,7 @@ void setSurfaceEmbeddedPoints(Surface *s, List_T *points)
     List_Read(points, i, &iPoint);
     Vertex *v = FindPoint((int)iPoint);
     if(v)
-      List_Add (s->EmbeddedPoints,&v);
+      List_Add(s->EmbeddedPoints, &v);
     else
       Msg(GERROR, "Unknown point %d", iPoint);
   }
@@ -2925,7 +2922,7 @@ void setSurfaceEmbeddedPoints(Surface *s, List_T *points)
 
 void setSurfaceEmbeddedCurves(Surface *s, List_T *curves)
 {
-  if (! s->EmbeddedCurves )
+  if (!s->EmbeddedCurves)
     s->EmbeddedCurves = List_Create(4, 4, sizeof(Curve *));
   int nbCurves = List_Nbr(curves);
   for(int i = 0; i < nbCurves; i++) {
@@ -2933,14 +2930,12 @@ void setSurfaceEmbeddedCurves(Surface *s, List_T *curves)
     List_Read(curves, i, &iCurve);
     Curve *c = FindCurve((int)iCurve);
     if(c)
-      List_Add (s->EmbeddedCurves,&c);
+      List_Add(s->EmbeddedCurves, &c);
     else
       Msg(GERROR, "Unknown curve %d", iCurve);
   }
 }
 
-// Fills in the generatrices for a given surface, given the indices of
-// edge loops
 void setSurfaceGeneratrices(Surface *s, List_T *loops)
 {
   int nbLoop = List_Nbr(loops);
@@ -2993,9 +2988,7 @@ void setSurfaceGeneratrices(Surface *s, List_T *loops)
   }
 }
 
-// Fills in the boundary of a volume, given the indices of surface
-// loops
-void setVolumeSurfaces(Volume *v, List_T * loops)
+void setVolumeSurfaces(Volume *v, List_T *loops)
 {
   List_Reset(v->Surfaces);
   List_Reset(v->SurfacesOrientations);
diff --git a/Geo/Geo.h b/Geo/Geo.h
index 3ba55bd1e8dc2e541d67d32f58c55f4c3099625c..9ebe4417e24d6872609e6e41ad44f8ec85d036ee 100644
--- a/Geo/Geo.h
+++ b/Geo/Geo.h
@@ -155,9 +155,7 @@ typedef struct{
   List_T *Control_Points;
   List_T *TrsfPoints;
   double plan[3][3];
-  double invplan[3][3];
   double a, b, c, d;
-  List_T *Contours;
   ExtrudeParams *Extrude;
   DrawingColor Color;
   // A surface is defined topologically by its Generatrices
diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp
index 59415a7f73f9a5dbd91f9b643967dc1e4e9d3ff2..d0b1fb074db9cd2b725cb938eab71b5b7049a8b6 100644
--- a/Geo/gmshFace.cpp
+++ b/Geo/gmshFace.cpp
@@ -1,4 +1,4 @@
-// $Id: gmshFace.cpp,v 1.37 2007-02-12 08:36:11 geuzaine Exp $
+// $Id: gmshFace.cpp,v 1.38 2007-02-21 08:17:16 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -48,8 +48,17 @@ gmshFace::gmshFace(GModel *m, Surface *face)
 
   // always compute and store the mean plane for plane surfaces
   // (simply using the bounding vertices)
-  if(s->Typ == MSH_SURF_PLAN) computeMeanPlane();
-
+  if(s->Typ == MSH_SURF_PLAN){
+    computeMeanPlane();
+    for(int i = 0; i < 3; i++)
+      for(int j = 0; j < 3; j++)
+	s->plan[i][j] = meanPlane.plan[i][j];
+    s->a = meanPlane.a;
+    s->b = meanPlane.b;
+    s->c = meanPlane.c;
+    s->d = meanPlane.d;
+  }
+  
   if(s->EmbeddedCurves){
     for(int i = 0 ; i < List_Nbr(s->EmbeddedCurves); i++){
       Curve *c;
@@ -184,9 +193,7 @@ GPoint gmshFace::closestPoint(const SPoint3 & qp) const
   v.Pos.X = qp.x();
   v.Pos.Y = qp.y();
   v.Pos.Z = qp.z();
-
-  if(s->Typ != MSH_SURF_PLAN)
-    ProjectPointOnSurface(s, v, u);
+  ProjectPointOnSurface(s, v, u);
   return GPoint(v.Pos.X, v.Pos.Y, v.Pos.Z, this, u);
 }
 
@@ -204,12 +211,11 @@ int gmshFace::containsParam(const SPoint2 &pt) const
 SPoint2 gmshFace::parFromPoint(const SPoint3 &qp) const
 {
   if(s->Typ == MSH_SURF_PLAN){
-    double u,v;
-    double x,y,z,VX[3],VY[3];
+    double x, y, z, VX[3], VY[3];
     getMeanPlaneData(VX, VY, x, y, z);
-    double vec[3] = {qp.x()-x,qp.y()-y,qp.z()-z};
-    prosca(vec,VX,&u);
-    prosca(vec,VY,&v);
+    double u, v, vec[3] = {qp.x()-x, qp.y()-y, qp.z()-z};
+    prosca(vec, VX, &u);
+    prosca(vec, VY, &v);
     return SPoint2(u, v); 
   }
   else{
diff --git a/Mesh/meshGFaceTransfinite.cpp b/Mesh/meshGFaceTransfinite.cpp
index 7bb986fb54b46e18204cec094e8ccb278f65b6bb..13f7d8792e8d566a034a09206d2ca15450e3e157 100644
--- a/Mesh/meshGFaceTransfinite.cpp
+++ b/Mesh/meshGFaceTransfinite.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGFaceTransfinite.cpp,v 1.17 2007-01-30 08:56:36 geuzaine Exp $
+// $Id: meshGFaceTransfinite.cpp,v 1.18 2007-02-21 08:17:16 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -29,6 +29,8 @@
 #include "Context.h"
 #include "Message.h"
 
+extern Context_T CTX;
+
 /*
    s4 +-----c3-----+ s3
       |            |
diff --git a/benchmarks/2d/Square-Emb.geo b/benchmarks/2d/Square-Emb.geo
index 74aef27ddc5cd0e266f853374cc3463a6e8951b6..996792e424c1d8cdb874b0afe378ab2b6ad714b6 100644
--- a/benchmarks/2d/Square-Emb.geo
+++ b/benchmarks/2d/Square-Emb.geo
@@ -21,6 +21,6 @@ Line(4) = {4,3};
 Spline(5) = {11,22,33,44};       
 Line Loop(5) = {1,2,3,4};       
 Plane Surface(6) = {5};       
-Line {5} In  Surface 6 ;       
+Line {5} In  Surface {6};
 //Attractor Point{2} = {0.05,0.05,2};
 //Mesh.Algorithm = 2;
diff --git a/doc/TODO b/doc/TODO
index a1b17a24cf66e74be0a104d341fd90298b023ed1..c30a0122431dd8d1ac2d7316e7f123ca26c38ea2 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.49 2007-02-15 08:26:46 geuzaine Exp $
+$Id: TODO,v 1.50 2007-02-21 08:17:16 geuzaine Exp $
 
 ********************************************************************
 
@@ -58,6 +58,11 @@ recode BDS::remesh (for STL remeshing)
 
 ********************************************************************
 
+create pyramids on quad surfaces inside unstructured volume before
+tetrahedralizing (to enable hex/tet hybrid grids)
+
+********************************************************************
+
 physical groups->add->line/surface: pressing '-' after/while selecting 
 a surface should add it with reverse orientation?
 
diff --git a/doc/VERSIONS b/doc/VERSIONS
index 654bb32c5ffa7b20d483aae699d1126096ace947..88f328c6178dd18b401ce50448f2c595dc53e72e 100644
--- a/doc/VERSIONS
+++ b/doc/VERSIONS
@@ -1,8 +1,8 @@
-$Id: VERSIONS,v 1.378 2007-02-15 08:26:46 geuzaine Exp $
+$Id: VERSIONS,v 1.379 2007-02-21 08:17:16 geuzaine Exp $
 
-since 2.0: volumes can now be defined from external CAD surfaces; use
-Delaunay/Tetgen algorithm by default when available; fixed various
-bugs.
+since 2.0: volumes can now be defined from external CAD surfaces;
+Delaunay/Tetgen algorithm is now used by default when available; fixed
+various bugs.
 
 2.0 (February 5, 2007): new geometry and mesh databases, with support
 for STEP and IGES import via OpenCascade; complete rewrite of geometry