diff --git a/Fltk/classificationEditor.cpp b/Fltk/classificationEditor.cpp
index 71b01db037b70c2ee8e03b2e50498a367108b2c9..edaeb678221b4b49cf7f545bbae57fd6feac8814 100644
--- a/Fltk/classificationEditor.cpp
+++ b/Fltk/classificationEditor.cpp
@@ -195,10 +195,10 @@ static void update_edges_cb(Fl_Widget *w, void *data)
     delete e->selected->lines[i];
   e->selected->lines.clear();
 
+  double threshold = e->inputs[CLASS_VALUE_ANGLE]->value() / 180. * M_PI;
   for(unsigned int i = 0; i < e->edges_detected.size(); i++){
-    edge_angle ea =  e->edges_detected[i];
-    if(ea.angle <= e->inputs[CLASS_VALUE_ANGLE]->value() / 180 * M_PI)
-      break;
+    edge_angle ea = e->edges_detected[i];
+    if(ea.angle <= threshold) break;
     e->selected->lines.push_back(new MLine(ea.v1, ea.v2));
   } 
 
@@ -315,6 +315,8 @@ static void show_only_edges_cb(Fl_Widget *w, void *data)
   static int old_se = (int)opt_mesh_surfaces_edges(0, GMSH_GET, 0.);
   if(e->toggles[CLASS_TOGGLE_SHOW_ONLY_EDGES]->value()){
     opt_mesh_lines(0, GMSH_SET | GMSH_GUI, 1.);
+    old_sf = (int)opt_mesh_surfaces_faces(0, GMSH_GET, 0.);
+    old_se = (int)opt_mesh_surfaces_edges(0, GMSH_GET, 0.);
     opt_mesh_surfaces_faces(0, GMSH_SET | GMSH_GUI, 0.);
     opt_mesh_surfaces_edges(0, GMSH_SET | GMSH_GUI, 0.);
   }
diff --git a/Fltk/classificationEditor.h b/Fltk/classificationEditor.h
index 4bd2b2711ba745fee3ce509a23e2198fd6c55847..b7153dded18f4b6a460d3738a0db8b2bbe2f4a28 100644
--- a/Fltk/classificationEditor.h
+++ b/Fltk/classificationEditor.h
@@ -7,12 +7,12 @@
 #define _CLASSIFICATION_EDITOR_H_
 
 #include <vector>
+#include <set>
 #include <FL/Fl_Window.H>
 #include <FL/Fl_Check_Button.H>
 #include <FL/Fl_Value_Input.H>
 #include "GModel.h"
 #include "MElement.h"
-#include "ColorTable.h"
 
 #define CLASS_BUTTON_SELECT_ELEMENTS       0
 #define CLASS_BUTTON_SELECT_ALL_ELEMENTS   1
@@ -22,18 +22,18 @@
 #define CLASS_BUTTON_SELECT_ALL_SURFACES   5
 #define CLASS_BUTTON_CLASSIFY              6
 
-#define CLASS_TOGGLE_HIDE             0
-#define CLASS_TOGGLE_BOUNDARY         1
-#define CLASS_TOGGLE_SHOW_ONLY_EDGES  2
+#define CLASS_TOGGLE_HIDE                  0
+#define CLASS_TOGGLE_BOUNDARY              1
+#define CLASS_TOGGLE_SHOW_ONLY_EDGES       2
 
-#define CLASS_VALUE_ANGLE             0
+#define CLASS_VALUE_ANGLE                  0
 
 class edge_angle {
  public :
   MVertex *v1, *v2;
   double angle;
-  edge_angle ( MVertex *_v1, MVertex *_v2, MElement *t1, MElement *t2);
-  bool operator < (const edge_angle & other) const
+  edge_angle(MVertex *_v1, MVertex *_v2, MElement *t1, MElement *t2);
+  bool operator < (const edge_angle &other) const
   {
     return other.angle < angle;
   }  
@@ -41,14 +41,13 @@ class edge_angle {
 
 class classificationEditor {
  public:
-  double op[10];
   std::vector<MTriangle*> elements;
   std::set<GFace*> faces;
   Fl_Window *window;
   Fl_Button *buttons[10];
   Fl_Check_Button *toggles[10];
   Fl_Value_Input *inputs[10];
-  GEdge *selected, *saved;
+  GEdge *selected;
   std::vector<edge_angle> edges_detected, edges_lonly;
   classificationEditor();
   void show(){ window->show(); }