Index: lemon/clp.cc
===================================================================
--- lemon/clp.cc	(revision 485)
+++ lemon/clp.cc	(revision 587)
@@ -57,10 +57,10 @@
   }
 
-  ClpLp* ClpLp::_newSolver() const {
+  ClpLp* ClpLp::newSolver() const {
     ClpLp* newlp = new ClpLp;
     return newlp;
   }
 
-  ClpLp* ClpLp::_cloneSolver() const {
+  ClpLp* ClpLp::cloneSolver() const {
     ClpLp* copylp = new ClpLp(*this);
     return copylp;
Index: lemon/clp.h
===================================================================
--- lemon/clp.h	(revision 485)
+++ lemon/clp.h	(revision 587)
@@ -57,4 +57,9 @@
     ~ClpLp();
 
+    /// \e
+    virtual ClpLp* newSolver() const;
+    /// \e
+    virtual ClpLp* cloneSolver() const;
+
   protected:
 
@@ -66,7 +71,4 @@
 
   protected:
-
-    virtual ClpLp* _newSolver() const;
-    virtual ClpLp* _cloneSolver() const;
 
     virtual const char* _solverName() const;
Index: lemon/cplex.cc
===================================================================
--- lemon/cplex.cc	(revision 485)
+++ lemon/cplex.cc	(revision 587)
@@ -452,6 +452,6 @@
   CplexLp::~CplexLp() {}
 
-  CplexLp* CplexLp::_newSolver() const { return new CplexLp; }
-  CplexLp* CplexLp::_cloneSolver() const {return new CplexLp(*this); }
+  CplexLp* CplexLp::newSolver() const { return new CplexLp; }
+  CplexLp* CplexLp::cloneSolver() const {return new CplexLp(*this); }
 
   const char* CplexLp::_solverName() const { return "CplexLp"; }
@@ -824,6 +824,6 @@
   CplexMip::~CplexMip() {}
 
-  CplexMip* CplexMip::_newSolver() const { return new CplexMip; }
-  CplexMip* CplexMip::_cloneSolver() const {return new CplexMip(*this); }
+  CplexMip* CplexMip::newSolver() const { return new CplexMip; }
+  CplexMip* CplexMip::cloneSolver() const {return new CplexMip(*this); }
 
   const char* CplexMip::_solverName() const { return "CplexMip"; }
Index: lemon/cplex.h
===================================================================
--- lemon/cplex.h	(revision 485)
+++ lemon/cplex.h	(revision 587)
@@ -161,5 +161,5 @@
   /// This class implements an interface for the CPLEX LP solver.
   ///\ingroup lp_group
-  class CplexLp : public CplexBase, public LpSolver {
+  class CplexLp : public LpSolver, public CplexBase {
   public:
     /// \e
@@ -171,4 +171,9 @@
     /// \e
     virtual ~CplexLp();
+
+    /// \e
+    virtual CplexLp* cloneSolver() const;
+    /// \e
+    virtual CplexLp* newSolver() const;
 
   private:
@@ -186,7 +191,4 @@
 
   protected:
-
-    virtual CplexLp* _cloneSolver() const;
-    virtual CplexLp* _newSolver() const;
 
     virtual const char* _solverName() const;
@@ -223,5 +225,5 @@
   /// This class implements an interface for the CPLEX MIP solver.
   ///\ingroup lp_group
-  class CplexMip : public CplexBase, public MipSolver {
+  class CplexMip : public MipSolver, public CplexBase {
   public:
     /// \e
Index: lemon/glpk.cc
===================================================================
--- lemon/glpk.cc	(revision 485)
+++ lemon/glpk.cc	(revision 589)
@@ -523,4 +523,10 @@
   }
 
+  void GlpkBase::freeEnv() {
+    glp_free_env();
+  }
+
+  GlpkBase::FreeEnvHelper GlpkBase::freeEnvHelper;
+
   // GlpkLp members
 
@@ -535,6 +541,6 @@
   }
 
-  GlpkLp* GlpkLp::_newSolver() const { return new GlpkLp; }
-  GlpkLp* GlpkLp::_cloneSolver() const { return new GlpkLp(*this); }
+  GlpkLp* GlpkLp::newSolver() const { return new GlpkLp; }
+  GlpkLp* GlpkLp::cloneSolver() const { return new GlpkLp(*this); }
 
   const char* GlpkLp::_solverName() const { return "GlpkLp"; }
@@ -941,6 +947,6 @@
   }
 
-  GlpkMip* GlpkMip::_newSolver() const { return new GlpkMip; }
-  GlpkMip* GlpkMip::_cloneSolver() const {return new GlpkMip(*this); }
+  GlpkMip* GlpkMip::newSolver() const { return new GlpkMip; }
+  GlpkMip* GlpkMip::cloneSolver() const {return new GlpkMip(*this); }
 
   const char* GlpkMip::_solverName() const { return "GlpkMip"; }
Index: lemon/glpk.h
===================================================================
--- lemon/glpk.h	(revision 485)
+++ lemon/glpk.h	(revision 589)
@@ -101,4 +101,16 @@
     virtual void _clear();
 
+  private:
+
+    static void freeEnv();
+
+    struct FreeEnvHelper {
+      ~FreeEnvHelper() {
+        freeEnv();
+      }
+    };
+    
+    static FreeEnvHelper freeEnvHelper;
+    
   public:
 
@@ -120,5 +132,5 @@
   /// This class implements an interface for the GLPK LP solver.
   ///\ingroup lp_group
-  class GlpkLp : public GlpkBase, public LpSolver {
+  class GlpkLp : public LpSolver, public GlpkBase {
   public:
 
@@ -127,4 +139,9 @@
     ///\e
     GlpkLp(const GlpkLp&);
+
+    ///\e
+    virtual GlpkLp* cloneSolver() const;
+    ///\e
+    virtual GlpkLp* newSolver() const;
 
   private:
@@ -136,7 +153,4 @@
 
   protected:
-
-    virtual GlpkLp* _cloneSolver() const;
-    virtual GlpkLp* _newSolver() const;
 
     virtual const char* _solverName() const;
@@ -154,6 +168,4 @@
     virtual Value _getDualRay(int i) const;
 
-    ///\todo It should be clarified
-    ///
     virtual ProblemType _getPrimalType() const;
     virtual ProblemType _getDualType() const;
@@ -204,5 +216,5 @@
   /// This class implements an interface for the GLPK MIP solver.
   ///\ingroup lp_group
-  class GlpkMip : public GlpkBase, public MipSolver {
+  class GlpkMip : public MipSolver, public GlpkBase {
   public:
 
@@ -212,8 +224,8 @@
     GlpkMip(const GlpkMip&);
 
-  protected:
-
-    virtual GlpkMip* _cloneSolver() const;
-    virtual GlpkMip* _newSolver() const;
+    virtual GlpkMip* cloneSolver() const;
+    virtual GlpkMip* newSolver() const;
+
+  protected:
 
     virtual const char* _solverName() const;
Index: lemon/gomory_hu.h
===================================================================
--- lemon/gomory_hu.h	(revision 592)
+++ lemon/gomory_hu.h	(revision 593)
@@ -37,8 +37,8 @@
   /// \brief Gomory-Hu cut tree algorithm
   ///
-  /// The Gomory-Hu tree is a tree on the node set of the graph, but it
-  /// may contain edges which are not in the original digraph. It has the
+  /// The Gomory-Hu tree is a tree on the node set of a given graph, but it
+  /// may contain edges which are not in the original graph. It has the
   /// property that the minimum capacity edge of the path between two nodes 
-  /// in this tree has the same weight as the minimum cut in the digraph
+  /// in this tree has the same weight as the minimum cut in the graph
   /// between these nodes. Moreover the components obtained by removing
   /// this edge from the tree determine the corresponding minimum cut.
@@ -54,14 +54,18 @@
   /// 
   /// The members \c minCutMap() and \c minCutValue() calculate
-  /// the minimum cut and the minimum cut value between any two node
-  /// in the digraph. You can also list (iterate on) the nodes and the
-  /// edges of the cuts using MinCutNodeIt and MinCutEdgeIt.
+  /// the minimum cut and the minimum cut value between any two nodes
+  /// in the graph. You can also list (iterate on) the nodes and the
+  /// edges of the cuts using \c MinCutNodeIt and \c MinCutEdgeIt.
   ///
-  /// \tparam GR The undirected graph data structure the algorithm will run on
-  /// \tparam CAP type of the EdgeMap describing the Edge capacities.
-  /// it is typename GR::template EdgeMap<int> by default.
+  /// \tparam GR The type of the undirected graph the algorithm runs on.
+  /// \tparam CAP The type of the edge map describing the edge capacities.
+  /// It is \ref concepts::Graph::EdgeMap "GR::EdgeMap<int>" by default.
+#ifdef DOXYGEN
   template <typename GR,
-	    typename CAP = typename GR::template EdgeMap<int>
-            >
+	    typename CAP>
+#else
+  template <typename GR,
+	    typename CAP = typename GR::template EdgeMap<int> >
+#endif
   class GomoryHu {
   public:
@@ -69,5 +73,5 @@
     /// The graph type
     typedef GR Graph;
-    /// The type if the edge capacity map
+    /// The type of the edge capacity map
     typedef CAP Capacity;
     /// The value type of capacities
@@ -115,6 +119,6 @@
     ///
     /// Constructor
-    /// \param graph The graph the algorithm will run on.
-    /// \param capacity The capacity map.
+    /// \param graph The undirected graph the algorithm runs on.
+    /// \param capacity The edge capacity map.
     GomoryHu(const Graph& graph, const Capacity& capacity) 
       : _graph(graph), _capacity(capacity),
@@ -132,8 +136,7 @@
     }
 
-    // \brief Initialize the internal data structures.
-    //
-    // This function initializes the internal data structures.
-    //
+  private:
+  
+    // Initialize the internal data structures
     void init() {
       createStructures();
@@ -149,10 +152,5 @@
 
 
-    // \brief Start the algorithm
-    //
-    // This function starts the algorithm.
-    //
-    // \pre \ref init() must be called before using this function.
-    //
+    // Start the algorithm
     void start() {
       Preflow<Graph, Capacity> fa(_graph, _capacity, _root, INVALID);
@@ -199,4 +197,6 @@
     }
 
+  public:
+
     ///\name Execution Control
  
@@ -216,6 +216,6 @@
     ///The results of the algorithm can be obtained using these
     ///functions.\n
-    ///The \ref run() "run()" should be called before using them.\n
-    ///See also MinCutNodeIt and MinCutEdgeIt
+    ///\ref run() "run()" should be called before using them.\n
+    ///See also \ref MinCutNodeIt and \ref MinCutEdgeIt.
 
     ///@{
@@ -251,5 +251,5 @@
     /// This function returns the minimum cut value between two nodes. The
     /// algorithm finds the nearest common ancestor in the Gomory-Hu
-    /// tree and calculates the minimum weight arc on the paths to
+    /// tree and calculates the minimum weight edge on the paths to
     /// the ancestor.
     Value minCutValue(const Node& s, const Node& t) const {
@@ -272,19 +272,17 @@
     ///
     /// This function returns the minimum cut between the nodes \c s and \c t
-    /// the \r cutMap parameter by setting the nodes in the component of
-    /// \c \s to true and the other nodes to false.
-    ///
-    /// The \c cutMap should be \ref concepts::ReadWriteMap
-    /// "ReadWriteMap".
-    ///
-    /// For higher level interfaces, see MinCutNodeIt and MinCutEdgeIt
+    /// in the \c cutMap parameter by setting the nodes in the component of
+    /// \c s to \c true and the other nodes to \c false.
+    ///
+    /// For higher level interfaces, see MinCutNodeIt and MinCutEdgeIt.
     template <typename CutMap>
-    Value minCutMap(const Node& s, ///< Base node
+    Value minCutMap(const Node& s, ///< The base node.
                     const Node& t,
-                    ///< The node you want to separate from Node s.
+                    ///< The node you want to separate from node \c s.
                     CutMap& cutMap
-                    ///< The cut will be return in this map.
-                    /// It must be a \c bool \ref concepts::ReadWriteMap
-                    /// "ReadWriteMap" on the graph nodes.
+                    ///< The cut will be returned in this map.
+                    /// It must be a \c bool (or convertible) 
+                    /// \ref concepts::ReadWriteMap "ReadWriteMap"
+                    /// on the graph nodes.
                     ) const {
       Node sn = s, tn = t;
@@ -349,6 +347,6 @@
     /// GomoruHu<Graph> gom(g, capacities);
     /// gom.run();
-    /// int sum=0;
-    /// for(GomoruHu<Graph>::MinCutNodeIt n(gom,s,t);n!=INVALID;++n) ++sum;
+    /// int cnt=0;
+    /// for(GomoruHu<Graph>::MinCutNodeIt n(gom,s,t); n!=INVALID; ++n) ++cnt;
     /// \endcode
     class MinCutNodeIt
@@ -360,13 +358,13 @@
       /// Constructor
 
-      /// Constructor
+      /// Constructor.
       ///
       MinCutNodeIt(GomoryHu const &gomory,
                    ///< The GomoryHu class. You must call its
                    ///  run() method
-                   ///  before initializing this iterator
-                   const Node& s, ///< Base node
+                   ///  before initializing this iterator.
+                   const Node& s, ///< The base node.
                    const Node& t,
-                   ///< The node you want to separate from Node s.
+                   ///< The node you want to separate from node \c s.
                    bool side=true
                    ///< If it is \c true (default) then the iterator lists
@@ -399,7 +397,7 @@
             ++_node_it) {}
       }
-      /// Conversion to Node
-
-      /// Conversion to Node
+      /// Conversion to \c Node
+
+      /// Conversion to \c Node.
       ///
       operator typename Graph::Node() const
@@ -411,5 +409,5 @@
       /// Next node
 
-      /// Next node
+      /// Next node.
       ///
       MinCutNodeIt &operator++()
@@ -420,8 +418,8 @@
       /// Postfix incrementation
 
-      /// Postfix incrementation
+      /// Postfix incrementation.
       ///
       /// \warning This incrementation
-      /// returns a \c Node, not a \ref MinCutNodeIt, as one may
+      /// returns a \c Node, not a \c MinCutNodeIt, as one may
       /// expect.
       typename Graph::Node operator++(int)
@@ -447,9 +445,9 @@
     /// gom.run();
     /// int value=0;
-    /// for(GomoruHu<Graph>::MinCutEdgeIt e(gom,s,t);e!=INVALID;++e)
+    /// for(GomoruHu<Graph>::MinCutEdgeIt e(gom,s,t); e!=INVALID; ++e)
     ///   value+=capacities[e];
     /// \endcode
     /// the result will be the same as it is returned by
-    /// \ref GomoryHu::minCostValue() "gom.minCostValue(s,t)"
+    /// \ref GomoryHu::minCutValue() "gom.minCutValue(s,t)"
     class MinCutEdgeIt
     {
@@ -474,8 +472,8 @@
                    ///< The GomoryHu class. You must call its
                    ///  run() method
-                   ///  before initializing this iterator
-                   const Node& s,  ///< Base node
+                   ///  before initializing this iterator.
+                   const Node& s,  ///< The base node.
                    const Node& t,
-                   ///< The node you want to separate from Node s.
+                   ///< The node you want to separate from node \c s.
                    bool side=true
                    ///< If it is \c true (default) then the listed arcs
@@ -505,7 +503,7 @@
         while(_arc_it!=INVALID && _cut[_graph.target(_arc_it)]) step();
       }
-      /// Conversion to Arc
-
-      /// Conversion to Arc
+      /// Conversion to \c Arc
+
+      /// Conversion to \c Arc.
       ///
       operator typename Graph::Arc() const
@@ -513,7 +511,7 @@
         return _arc_it;
       }
-      /// Conversion to Edge
-
-      /// Conversion to Edge
+      /// Conversion to \c Edge
+
+      /// Conversion to \c Edge.
       ///
       operator typename Graph::Edge() const
@@ -525,5 +523,5 @@
       /// Next edge
 
-      /// Next edge
+      /// Next edge.
       ///
       MinCutEdgeIt &operator++()
@@ -535,9 +533,8 @@
       /// Postfix incrementation
       
-      /// Postfix incrementation
+      /// Postfix incrementation.
       ///
       /// \warning This incrementation
-      /// returns a \c Arc, not a \ref MinCutEdgeIt, as one may
-      /// expect.
+      /// returns an \c Arc, not a \c MinCutEdgeIt, as one may expect.
       typename Graph::Arc operator++(int)
       {
Index: lemon/lp_base.h
===================================================================
--- lemon/lp_base.h	(revision 561)
+++ lemon/lp_base.h	(revision 587)
@@ -919,6 +919,4 @@
 
     //Abstract virtual functions
-    virtual LpBase* _newSolver() const = 0;
-    virtual LpBase* _cloneSolver() const = 0;
 
     virtual int _addColId(int col) { return cols.addIndex(col); }
@@ -987,9 +985,4 @@
     /// Virtual destructor
     virtual ~LpBase() {}
-
-    ///Creates a new LP problem
-    LpBase* newSolver() {return _newSolver();}
-    ///Makes a copy of the LP problem
-    LpBase* cloneSolver() {return _cloneSolver();}
 
     ///Gives back the name of the solver.
@@ -1822,4 +1815,9 @@
   public:
 
+    ///Allocate a new LP problem instance
+    virtual LpSolver* newSolver() const = 0;
+    ///Make a copy of the LP problem
+    virtual LpSolver* cloneSolver() const = 0;
+
     ///\name Solve the LP
 
@@ -1936,11 +1934,6 @@
     ///@}
 
-    LpSolver* newSolver() {return _newSolver();}
-    LpSolver* cloneSolver() {return _cloneSolver();}
-
   protected:
 
-    virtual LpSolver* _newSolver() const = 0;
-    virtual LpSolver* _cloneSolver() const = 0;
   };
 
@@ -1976,4 +1969,9 @@
     };
 
+    ///Allocate a new MIP problem instance
+    virtual MipSolver* newSolver() const = 0;
+    ///Make a copy of the MIP problem
+    virtual MipSolver* cloneSolver() const = 0;
+
     ///\name Solve the MIP
 
@@ -2063,13 +2061,4 @@
     virtual Value _getSolValue() const = 0;
 
-  public:
-
-    MipSolver* newSolver() {return _newSolver();}
-    MipSolver* cloneSolver() {return _cloneSolver();}
-
-  protected:
-
-    virtual MipSolver* _newSolver() const = 0;
-    virtual MipSolver* _cloneSolver() const = 0;
   };
 
Index: lemon/lp_skeleton.cc
===================================================================
--- lemon/lp_skeleton.cc	(revision 482)
+++ lemon/lp_skeleton.cc	(revision 587)
@@ -106,8 +106,8 @@
   { return BASIC; }
 
-  LpSkeleton* LpSkeleton::_newSolver() const
+  LpSkeleton* LpSkeleton::newSolver() const
   { return static_cast<LpSkeleton*>(0); }
 
-  LpSkeleton* LpSkeleton::_cloneSolver() const
+  LpSkeleton* LpSkeleton::cloneSolver() const
   { return static_cast<LpSkeleton*>(0); }
 
@@ -123,8 +123,8 @@
   { return UNDEFINED; }
 
-  MipSkeleton* MipSkeleton::_newSolver() const
+  MipSkeleton* MipSkeleton::newSolver() const
   { return static_cast<MipSkeleton*>(0); }
 
-  MipSkeleton* MipSkeleton::_cloneSolver() const
+  MipSkeleton* MipSkeleton::cloneSolver() const
   { return static_cast<MipSkeleton*>(0); }
 
Index: lemon/lp_skeleton.h
===================================================================
--- lemon/lp_skeleton.h	(revision 576)
+++ lemon/lp_skeleton.h	(revision 588)
@@ -23,8 +23,14 @@
 
 ///\file
-///\brief A skeleton file to implement LP solver interfaces
+///\brief Skeleton file to implement LP/MIP solver interfaces
+///  
+///The classes in this file do nothing, but they can serve as skeletons when
+///implementing an interface to new solvers.
 namespace lemon {
 
-  ///A skeleton class to implement LP solver interfaces
+  ///A skeleton class to implement LP/MIP solver base interface
+  
+  ///This class does nothing, but it can serve as a skeleton when
+  ///implementing an interface to new solvers.
   class SkeletonSolverBase : public virtual LpBase {
     int col_num,row_num;
@@ -137,12 +143,18 @@
   };
 
-  /// \brief Interface for a skeleton LP solver
+  /// \brief Skeleton class for an LP solver interface
   ///
-  /// This class implements an interface for a skeleton LP solver.
+  ///This class does nothing, but it can serve as a skeleton when
+  ///implementing an interface to new solvers.
+
   ///\ingroup lp_group
-  class LpSkeleton : public SkeletonSolverBase, public LpSolver {
+  class LpSkeleton : public LpSolver, public SkeletonSolverBase {
   public:
-    LpSkeleton() : SkeletonSolverBase(), LpSolver() {}
-
+    ///\e
+    LpSkeleton() : LpSolver(), SkeletonSolverBase() {}
+    ///\e
+    virtual LpSkeleton* newSolver() const;
+    ///\e
+    virtual LpSkeleton* cloneSolver() const;
   protected:
 
@@ -174,53 +186,37 @@
 
     ///\e
-    virtual LpSkeleton* _newSolver() const;
-    ///\e
-    virtual LpSkeleton* _cloneSolver() const;
-    ///\e
     virtual const char* _solverName() const;
 
   };
 
-  /// \brief Interface for a skeleton MIP solver
+  /// \brief Skeleton class for a MIP solver interface
   ///
-  /// This class implements an interface for a skeleton MIP solver.
+  ///This class does nothing, but it can serve as a skeleton when
+  ///implementing an interface to new solvers.
   ///\ingroup lp_group
-  class MipSkeleton : public SkeletonSolverBase, public MipSolver {
+  class MipSkeleton : public MipSolver, public SkeletonSolverBase {
   public:
-    MipSkeleton() : SkeletonSolverBase(), MipSolver() {}
+    ///\e
+    MipSkeleton() : MipSolver(), SkeletonSolverBase() {}
+    ///\e
+    virtual MipSkeleton* newSolver() const;
+    ///\e
+    virtual MipSkeleton* cloneSolver() const;
 
   protected:
     ///\e
-
-    ///\bug Wrong interface
-    ///
     virtual SolveExitStatus _solve();
 
     ///\e
-
-    ///\bug Wrong interface
-    ///
     virtual Value _getSol(int i) const;
 
     ///\e
-
-    ///\bug Wrong interface
-    ///
     virtual Value _getSolValue() const;
 
     ///\e
-
-    ///\bug Wrong interface
-    ///
     virtual ProblemType _getType() const;
 
     ///\e
-    virtual MipSkeleton* _newSolver() const;
-
-    ///\e
-    virtual MipSkeleton* _cloneSolver() const;
-    ///\e
     virtual const char* _solverName() const;
-
   };
 
Index: lemon/soplex.cc
===================================================================
--- lemon/soplex.cc	(revision 485)
+++ lemon/soplex.cc	(revision 587)
@@ -20,5 +20,5 @@
 #include <lemon/soplex.h>
 
-#include <soplex/soplex.h>
+#include <soplex.h>
 
 
@@ -55,10 +55,10 @@
   }
 
-  SoplexLp* SoplexLp::_newSolver() const {
+  SoplexLp* SoplexLp::newSolver() const {
     SoplexLp* newlp = new SoplexLp();
     return newlp;
   }
 
-  SoplexLp* SoplexLp::_cloneSolver() const {
+  SoplexLp* SoplexLp::cloneSolver() const {
     SoplexLp* newlp = new SoplexLp(*this);
     return newlp;
Index: lemon/soplex.h
===================================================================
--- lemon/soplex.h	(revision 485)
+++ lemon/soplex.h	(revision 587)
@@ -74,9 +74,10 @@
     /// \e
     ~SoplexLp();
+    /// \e
+    virtual SoplexLp* newSolver() const;
+    /// \e
+    virtual SoplexLp* cloneSolver() const;
 
   protected:
-
-    virtual SoplexLp* _newSolver() const;
-    virtual SoplexLp* _cloneSolver() const;
 
     virtual const char* _solverName() const;
