Index: lemon/bits/graph_extender.h
===================================================================
--- lemon/bits/graph_extender.h	(revision 1791)
+++ lemon/bits/graph_extender.h	(revision 1791)
@@ -0,0 +1,381 @@
+/* -*- C++ -*-
+ * lemon/graph_extender.h - Part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi
+ * Kutatocsoport (Egervary Research Group on Combinatorial Optimization,
+ * EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#ifndef LEMON_GRAPH_EXTENDER_H
+#define LEMON_GRAPH_EXTENDER_H
+
+#include <lemon/invalid.h>
+
+namespace lemon {
+
+  template <typename _Base>
+  class GraphExtender : public _Base {
+  public:
+
+    typedef _Base Parent;
+    typedef GraphExtender Graph;
+
+    typedef typename Parent::Node Node;
+    typedef typename Parent::Edge Edge;
+
+    int maxId(Node) const {
+      return Parent::maxNodeId();
+    }
+
+    int maxId(Edge) const {
+      return Parent::maxEdgeId();
+    }
+
+    Node fromId(int id, Node) const {
+      return Parent::nodeFromId(id);
+    }
+
+    Edge fromId(int id, Edge) const {
+      return Parent::edgeFromId(id);
+    }
+
+    Node oppositeNode(const Node &n, const Edge &e) const {
+      if (n == Parent::source(e))
+	return Parent::target(e);
+      else if(n==Parent::target(e))
+	return Parent::source(e);
+      else
+	return INVALID;
+    }
+
+  };
+
+  template <typename _Base>
+  class UndirGraphExtender : public _Base {
+    typedef _Base Parent;
+    typedef UndirGraphExtender Graph;
+
+  public:
+
+    typedef typename Parent::Edge UndirEdge;
+    typedef typename Parent::Node Node;
+
+    class Edge : public UndirEdge {
+      friend class UndirGraphExtender;
+
+    protected:
+      // FIXME: Marci use opposite logic in his graph adaptors. It would
+      // be reasonable to syncronize...
+      bool forward;
+
+      Edge(const UndirEdge &ue, bool _forward) :
+        UndirEdge(ue), forward(_forward) {}
+
+    public:
+      Edge() {}
+
+      /// Invalid edge constructor
+      Edge(Invalid i) : UndirEdge(i), forward(true) {}
+
+      bool operator==(const Edge &that) const {
+	return forward==that.forward && UndirEdge(*this)==UndirEdge(that);
+      }
+      bool operator!=(const Edge &that) const {
+	return forward!=that.forward || UndirEdge(*this)!=UndirEdge(that);
+      }
+      bool operator<(const Edge &that) const {
+	return forward<that.forward ||
+	  (!(that.forward<forward) && UndirEdge(*this)<UndirEdge(that));
+      }
+    };
+
+
+    /// \brief Edge of opposite direction.
+    ///
+    /// Returns the Edge of opposite direction.
+    Edge oppositeEdge(const Edge &e) const {
+      return Edge(e,!e.forward);
+    }
+
+  public:
+    /// \todo Shouldn't the "source" of an undirected edge be called "aNode"
+    /// or something???
+    using Parent::source;
+
+    /// Source of the given Edge.
+    Node source(const Edge &e) const {
+      return e.forward ? Parent::source(e) : Parent::target(e);
+    }
+
+    /// \todo Shouldn't the "target" of an undirected edge be called "bNode"
+    /// or something???
+    using Parent::target;
+
+    /// Target of the given Edge.
+    Node target(const Edge &e) const {
+      return e.forward ? Parent::target(e) : Parent::source(e);
+    }
+
+    Node oppositeNode(const Node &n, const UndirEdge &e) const {
+      if( n == Parent::source(e))
+	return Parent::target(e);
+      else if( n == Parent::target(e))
+	return Parent::source(e);
+      else
+	return INVALID;
+    }
+
+    /// \brief Directed edge from an undirected edge and a source node.
+    ///
+    /// Returns a (directed) Edge corresponding to the specified UndirEdge
+    /// and source Node.
+    ///
+    Edge direct(const UndirEdge &ue, const Node &s) const {
+      return Edge(ue, s == source(ue));
+    }
+
+    /// \brief Directed edge from an undirected edge.
+    ///
+    /// Returns a directed edge corresponding to the specified UndirEdge.
+    /// If the given bool is true the given undirected edge and the
+    /// returned edge have the same source node.
+    Edge direct(const UndirEdge &ue, bool d) const {
+      return Edge(ue, d);
+    }
+
+    /// Returns whether the given directed edge is same orientation as the
+    /// corresponding undirected edge.
+    ///
+    /// \todo reference to the corresponding point of the undirected graph
+    /// concept. "What does the direction of an undirected edge mean?"
+    bool direction(const Edge &e) const { return e.forward; }
+
+
+    using Parent::first;
+    void first(Edge &e) const {
+      Parent::first(e);
+      e.forward=true;
+    }
+
+    using Parent::next;
+    void next(Edge &e) const {
+      if( e.forward ) {
+	e.forward = false;
+      }
+      else {
+	Parent::next(e);
+	e.forward = true;
+      }
+    }
+
+  public:
+
+    void firstOut(Edge &e, const Node &n) const {
+      Parent::firstIn(e,n);
+      if( UndirEdge(e) != INVALID ) {
+	e.forward = false;
+      }
+      else {
+	Parent::firstOut(e,n);
+	e.forward = true;
+      }
+    }
+    void nextOut(Edge &e) const {
+      if( ! e.forward ) {
+	Node n = Parent::target(e);
+	Parent::nextIn(e);
+	if( UndirEdge(e) == INVALID ) {
+	  Parent::firstOut(e, n);
+	  e.forward = true;
+	}
+      }
+      else {
+	Parent::nextOut(e);
+      }
+    }
+
+    void firstIn(Edge &e, const Node &n) const {
+      Parent::firstOut(e,n);
+      if( UndirEdge(e) != INVALID ) {
+	e.forward = false;
+      }
+      else {
+	Parent::firstIn(e,n);
+	e.forward = true;
+      }
+    }
+    void nextIn(Edge &e) const {
+      if( ! e.forward ) {
+	Node n = Parent::source(e);
+	Parent::nextOut(e);
+	if( UndirEdge(e) == INVALID ) {
+	  Parent::firstIn(e, n);
+	  e.forward = true;
+	}
+      }
+      else {
+	Parent::nextIn(e);
+      }
+    }
+
+    void firstInc(UndirEdge &e, const Node &n) const {
+      Parent::firstOut(e, n);
+      if (e != INVALID) return;
+      Parent::firstIn(e, n);
+    }
+    void nextInc(UndirEdge &e, const Node &n) const {
+      if (Parent::source(e) == n) {
+	Parent::nextOut(e);
+	if (e != INVALID) return;
+	Parent::firstIn(e, n);
+      } else {
+	Parent::nextIn(e);
+      }
+    }
+
+    void firstInc(UndirEdge &e, bool &d, const Node &n) const {
+      d = true;
+      Parent::firstOut(e, n);
+      if (e != INVALID) return;
+      d = false;
+      Parent::firstIn(e, n);
+    }
+    void nextInc(UndirEdge &e, bool &d) const {
+      if (d) {
+	Node s = Parent::source(e);
+	Parent::nextOut(e);
+	if (e != INVALID) return;
+	d = false;
+	Parent::firstIn(e, s);
+      } else {
+	Parent::nextIn(e);
+      }
+    }
+
+    // Miscellaneous stuff:
+
+    /// \todo these methods (id, maxEdgeId) should be moved into separate
+    /// Extender
+
+    // using Parent::id;
+    // Using "using" is not a good idea, cause it could be that there is
+    // no "id" in Parent...
+
+    int id(const Node &n) const {
+      return Parent::id(n);
+    }
+
+    int id(const UndirEdge &e) const {
+      return Parent::id(e);
+    }
+
+    int id(const Edge &e) const {
+      return 2 * Parent::id(e) + int(e.forward);
+    }
+
+    int maxNodeId() const {
+      return Parent::maxNodeId();
+    }
+
+    int maxEdgeId() const {
+      return 2 * Parent::maxEdgeId() + 1;
+    }
+
+    int maxUndirEdgeId() const {
+      return Parent::maxEdgeId();
+    }
+
+    int maxId(Node) const {
+      return maxNodeId();
+    }
+
+    int maxId(Edge) const {
+      return maxEdgeId();
+    }
+    int maxId(UndirEdge) const {
+      return maxUndirEdgeId();
+    }
+
+    int edgeNum() const {
+      return 2 * Parent::edgeNum();
+    }
+
+    int undirEdgeNum() const {
+      return Parent::edgeNum();
+    }
+
+    Node nodeFromId(int id) const {
+      return Parent::nodeFromId(id);
+    }
+
+    Edge edgeFromId(int id) const {
+      return direct(Parent::edgeFromId(id >> 1), bool(id & 1));
+    }
+
+    UndirEdge undirEdgeFromId(int id) const {
+      return Parent::edgeFromId(id >> 1);
+    }
+
+    Node fromId(int id, Node) const {
+      return nodeFromId(id);
+    }
+
+    Edge fromId(int id, Edge) const {
+      return edgeFromId(id);
+    }
+
+    UndirEdge fromId(int id, UndirEdge) const {
+      return undirEdgeFromId(id);
+    }
+
+
+    Edge findEdge(Node source, Node target, Edge prev) const {
+      if (prev == INVALID) {
+	UndirEdge edge = Parent::findEdge(source, target);
+	if (edge != INVALID) return direct(edge, true);
+	edge = Parent::findEdge(target, source);
+	if (edge != INVALID) return direct(edge, false);
+      } else if (direction(prev)) {
+	UndirEdge edge = Parent::findEdge(source, target, prev);
+	if (edge != INVALID) return direct(edge, true);
+	edge = Parent::findEdge(target, source);
+	if (edge != INVALID) return direct(edge, false);	
+      } else {
+	UndirEdge edge = Parent::findEdge(target, source, prev);
+	if (edge != INVALID) return direct(edge, false);	      
+      }
+      return INVALID;
+    }
+
+    UndirEdge findUndirEdge(Node source, Node target, UndirEdge prev) const {
+      if (prev == INVALID) {
+	UndirEdge edge = Parent::findEdge(source, target);
+	if (edge != INVALID) return edge;
+	edge = Parent::findEdge(target, source);
+	if (edge != INVALID) return edge;
+      } else if (Parent::source(prev) == source) {
+	UndirEdge edge = Parent::findEdge(source, target, prev);
+	if (edge != INVALID) return edge;
+	edge = Parent::findEdge(target, source);
+	if (edge != INVALID) return edge;	
+      } else {
+	UndirEdge edge = Parent::findEdge(target, source, prev);
+	if (edge != INVALID) return edge;	      
+      }
+      return INVALID;
+    }
+
+  };
+
+}
+
+#endif // LEMON_UNDIR_GRAPH_EXTENDER_H
Index: lemon/bits/undir_graph_extender.h
===================================================================
--- lemon/bits/undir_graph_extender.h	(revision 1704)
+++ 	(revision )
@@ -1,311 +1,0 @@
-/* -*- C++ -*-
- *
- * lemon/undir_graph_extender.h - Part of LEMON, a generic C++
- * optimization library
- *
- * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi
- * Kutatocsoport (Egervary Research Group on Combinatorial Optimization,
- * EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_UNDIR_GRAPH_EXTENDER_H
-#define LEMON_UNDIR_GRAPH_EXTENDER_H
-
-#include <lemon/invalid.h>
-
-namespace lemon {
-
-  template <typename _Base>
-  class UndirGraphExtender : public _Base {
-    typedef _Base Parent;
-    typedef UndirGraphExtender Graph;
-
-  public:
-
-    typedef typename Parent::Edge UndirEdge;
-    typedef typename Parent::Node Node;
-
-    class Edge : public UndirEdge {
-      friend class UndirGraphExtender;
-
-    protected:
-      // FIXME: Marci use opposite logic in his graph adaptors. It would
-      // be reasonable to syncronize...
-      bool forward;
-
-      Edge(const UndirEdge &ue, bool _forward) :
-        UndirEdge(ue), forward(_forward) {}
-
-    public:
-      Edge() {}
-
-      /// Invalid edge constructor
-      Edge(Invalid i) : UndirEdge(i), forward(true) {}
-
-      bool operator==(const Edge &that) const {
-	return forward==that.forward && UndirEdge(*this)==UndirEdge(that);
-      }
-      bool operator!=(const Edge &that) const {
-	return forward!=that.forward || UndirEdge(*this)!=UndirEdge(that);
-      }
-      bool operator<(const Edge &that) const {
-	return forward<that.forward ||
-	  (!(that.forward<forward) && UndirEdge(*this)<UndirEdge(that));
-      }
-    };
-
-
-    /// \brief Edge of opposite direction.
-    ///
-    /// Returns the Edge of opposite direction.
-    Edge oppositeEdge(const Edge &e) const {
-      return Edge(e,!e.forward);
-    }
-
-  public:
-    /// \todo Shouldn't the "source" of an undirected edge be called "aNode"
-    /// or something???
-    using Parent::source;
-
-    /// Source of the given Edge.
-    Node source(const Edge &e) const {
-      return e.forward ? Parent::source(e) : Parent::target(e);
-    }
-
-    /// \todo Shouldn't the "target" of an undirected edge be called "bNode"
-    /// or something???
-    using Parent::target;
-
-    /// Target of the given Edge.
-    Node target(const Edge &e) const {
-      return e.forward ? Parent::target(e) : Parent::source(e);
-    }
-
-    Node oppositeNode(const Node &n, const UndirEdge &e) const {
-      if( n == Parent::source(e))
-	return Parent::target(e);
-      else if( n == Parent::target(e))
-	return Parent::source(e);
-      else
-	return INVALID;
-    }
-
-    /// \brief Directed edge from an undirected edge and a source node.
-    ///
-    /// Returns a (directed) Edge corresponding to the specified UndirEdge
-    /// and source Node.
-    ///
-    Edge direct(const UndirEdge &ue, const Node &s) const {
-      return Edge(ue, s == source(ue));
-    }
-
-    /// \brief Directed edge from an undirected edge.
-    ///
-    /// Returns a directed edge corresponding to the specified UndirEdge.
-    /// If the given bool is true the given undirected edge and the
-    /// returned edge have the same source node.
-    Edge direct(const UndirEdge &ue, bool d) const {
-      return Edge(ue, d);
-    }
-
-    /// Returns whether the given directed edge is same orientation as the
-    /// corresponding undirected edge.
-    ///
-    /// \todo reference to the corresponding point of the undirected graph
-    /// concept. "What does the direction of an undirected edge mean?"
-    bool direction(const Edge &e) const { return e.forward; }
-
-
-    using Parent::first;
-    void first(Edge &e) const {
-      Parent::first(e);
-      e.forward=true;
-    }
-
-    using Parent::next;
-    void next(Edge &e) const {
-      if( e.forward ) {
-	e.forward = false;
-      }
-      else {
-	Parent::next(e);
-	e.forward = true;
-      }
-    }
-
-  public:
-
-    void firstOut(Edge &e, const Node &n) const {
-      Parent::firstIn(e,n);
-      if( UndirEdge(e) != INVALID ) {
-	e.forward = false;
-      }
-      else {
-	Parent::firstOut(e,n);
-	e.forward = true;
-      }
-    }
-    void nextOut(Edge &e) const {
-      if( ! e.forward ) {
-	Node n = Parent::target(e);
-	Parent::nextIn(e);
-	if( UndirEdge(e) == INVALID ) {
-	  Parent::firstOut(e, n);
-	  e.forward = true;
-	}
-      }
-      else {
-	Parent::nextOut(e);
-      }
-    }
-
-    void firstIn(Edge &e, const Node &n) const {
-      Parent::firstOut(e,n);
-      if( UndirEdge(e) != INVALID ) {
-	e.forward = false;
-      }
-      else {
-	Parent::firstIn(e,n);
-	e.forward = true;
-      }
-    }
-    void nextIn(Edge &e) const {
-      if( ! e.forward ) {
-	Node n = Parent::source(e);
-	Parent::nextOut(e);
-	if( UndirEdge(e) == INVALID ) {
-	  Parent::firstIn(e, n);
-	  e.forward = true;
-	}
-      }
-      else {
-	Parent::nextIn(e);
-      }
-    }
-
-    void firstInc(UndirEdge &e, const Node &n) const {
-      Parent::firstOut(e, n);
-      if (e != INVALID) return;
-      Parent::firstIn(e, n);
-    }
-    void nextInc(UndirEdge &e, const Node &n) const {
-      if (Parent::source(e) == n) {
-	Parent::nextOut(e);
-	if (e != INVALID) return;
-	Parent::firstIn(e, n);
-      } else {
-	Parent::nextIn(e);
-      }
-    }
-
-    void firstInc(UndirEdge &e, bool &d, const Node &n) const {
-      d = true;
-      Parent::firstOut(e, n);
-      if (e != INVALID) return;
-      d = false;
-      Parent::firstIn(e, n);
-    }
-    void nextInc(UndirEdge &e, bool &d) const {
-      if (d) {
-	Node s = Parent::source(e);
-	Parent::nextOut(e);
-	if (e != INVALID) return;
-	d = false;
-	Parent::firstIn(e, s);
-      } else {
-	Parent::nextIn(e);
-      }
-    }
-
-    // Miscellaneous stuff:
-
-    /// \todo these methods (id, maxEdgeId) should be moved into separate
-    /// Extender
-
-    // using Parent::id;
-    // Using "using" is not a good idea, cause it could be that there is
-    // no "id" in Parent...
-
-    int id(const Node &n) const {
-      return Parent::id(n);
-    }
-
-    int id(const UndirEdge &e) const {
-      return Parent::id(e);
-    }
-
-    int id(const Edge &e) const {
-      return 2 * Parent::id(e) + int(e.forward);
-    }
-
-
-    int maxId(Node) const {
-      return Parent::maxId(Node());
-    }
-
-    int maxId(Edge) const {
-      return 2 * Parent::maxId(typename Parent::Edge()) + 1;
-    }
-    int maxId(UndirEdge) const {
-      return Parent::maxId(typename Parent::Edge());
-    }
-
-
-    int edgeNum() const {
-      return 2 * Parent::edgeNum();
-    }
-
-    int undirEdgeNum() const {
-      return Parent::edgeNum();
-    }
-
-    Edge findEdge(Node source, Node target, Edge prev) const {
-      if (prev == INVALID) {
-	UndirEdge edge = Parent::findEdge(source, target);
-	if (edge != INVALID) return direct(edge, true);
-	edge = Parent::findEdge(target, source);
-	if (edge != INVALID) return direct(edge, false);
-      } else if (direction(prev)) {
-	UndirEdge edge = Parent::findEdge(source, target, prev);
-	if (edge != INVALID) return direct(edge, true);
-	edge = Parent::findEdge(target, source);
-	if (edge != INVALID) return direct(edge, false);	
-      } else {
-	UndirEdge edge = Parent::findEdge(target, source, prev);
-	if (edge != INVALID) return direct(edge, false);	      
-      }
-      return INVALID;
-    }
-
-    UndirEdge findUndirEdge(Node source, Node target, UndirEdge prev) const {
-      if (prev == INVALID) {
-	UndirEdge edge = Parent::findEdge(source, target);
-	if (edge != INVALID) return edge;
-	edge = Parent::findEdge(target, source);
-	if (edge != INVALID) return edge;
-      } else if (Parent::source(prev) == source) {
-	UndirEdge edge = Parent::findEdge(source, target, prev);
-	if (edge != INVALID) return edge;
-	edge = Parent::findEdge(target, source);
-	if (edge != INVALID) return edge;	
-      } else {
-	UndirEdge edge = Parent::findEdge(target, source, prev);
-	if (edge != INVALID) return edge;	      
-      }
-      return INVALID;
-    }
-
-  };
-
-}
-
-#endif // LEMON_UNDIR_GRAPH_EXTENDER_H
Index: lemon/full_graph.h
===================================================================
--- lemon/full_graph.h	(revision 1726)
+++ lemon/full_graph.h	(revision 1791)
@@ -24,6 +24,5 @@
 #include <lemon/bits/alteration_notifier.h>
 #include <lemon/bits/static_map.h>
-
-#include <lemon/bits/undir_graph_extender.h>
+#include <lemon/bits/graph_extender.h>
 
 #include <lemon/invalid.h>
@@ -71,10 +70,10 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxId(Node = INVALID) const { return _nodeNum-1; }
+    int maxNodeId() const { return _nodeNum-1; }
     /// Maximum edge ID.
     
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxId(Edge = INVALID) const { return _edgeNum-1; }
+    int maxEdgeId() const { return _edgeNum-1; }
 
     Node source(Edge e) const { return e.id % _nodeNum; }
@@ -102,7 +101,7 @@
     static int id(Edge e) { return e.id; }
 
-    static Node fromId(int id, Node) { return Node(id);}
-    
-    static Edge fromId(int id, Edge) { return Edge(id);}
+    static Node nodeFromId(int id) { return Node(id);}
+    
+    static Edge edgeFromId(int id) { return Edge(id);}
 
     typedef True FindEdgeTag;
@@ -191,12 +190,8 @@
   };
 
-
-  typedef AlterableGraphExtender<FullGraphBase> 
-  AlterableFullGraphBase;
-  typedef IterableGraphExtender<AlterableFullGraphBase> 
-  IterableFullGraphBase;
   typedef StaticMappableGraphExtender<
     IterableGraphExtender<
-    AlterableGraphExtender<FullGraphBase> > > ExtendedFullGraphBase;
+    AlterableGraphExtender<
+    GraphExtender<FullGraphBase> > > > ExtendedFullGraphBase;
 
   /// \ingroup graphs
@@ -218,5 +213,4 @@
   };
 
-  ///@}
 
   class UndirFullGraphBase {
@@ -253,10 +247,10 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxId(Node = INVALID) const { return _nodeNum-1; }
+    int maxNodeId() const { return _nodeNum-1; }
     /// Maximum edge ID.
     
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxId(Edge = INVALID) const { return _edgeNum-1; }
+    int maxEdgeId() const { return _edgeNum-1; }
 
     Node source(Edge e) const { 
Index: lemon/graph_adaptor.h
===================================================================
--- lemon/graph_adaptor.h	(revision 1755)
+++ lemon/graph_adaptor.h	(revision 1791)
@@ -34,5 +34,5 @@
 #include <lemon/bits/alteration_notifier.h>
 #include <lemon/bits/default_map.h>
-#include <lemon/bits/undir_graph_extender.h>
+#include <lemon/bits/graph_extender.h>
 #include <iostream>
 
@@ -1860,9 +1860,9 @@
     int id(const Edge& edge) const { return edge.id; }
 
-    Node fromId(int id, Node) const { return graph->fromId(id, Node()); }
-    Edge fromId(int id, Edge) const { return Edge(id); }
-
-    int maxId(Node) const { return graph->maxId(Node()); };
-    int maxId(Edge) const { return edges.size() - 1; }
+    Node nodeFromId(int id) const { return graph->fromId(id, Node()); }
+    Edge edgeFromId(int id) const { return Edge(id); }
+
+    int maxNodeId() const { return graph->maxId(Node()); };
+    int maxEdgeId() const { return edges.size() - 1; }
 
     Node source(const Edge& edge) const { return edges[edge.id].source;}
Index: lemon/grid_graph.h
===================================================================
--- lemon/grid_graph.h	(revision 1703)
+++ lemon/grid_graph.h	(revision 1791)
@@ -25,6 +25,5 @@
 #include <lemon/bits/alteration_notifier.h>
 #include <lemon/bits/static_map.h>
-
-#include <lemon/bits/undir_graph_extender.h>
+#include <lemon/bits/graph_extender.h>
 
 #include <lemon/xy.h>
@@ -165,10 +164,10 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxId(Node = INVALID) const { return nodeNum() - 1; }
+    int maxNodeId() const { return nodeNum() - 1; }
     /// Maximum edge ID.
     
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxId(Edge = INVALID) const { return edgeNum() - 1; }
+    int maxEdgeId() const { return edgeNum() - 1; }
 
     /// \brief Gives back the source node of an edge.
@@ -216,7 +215,7 @@
     static int id(Edge e) { return e.id; }
 
-    static Node fromId(int id, Node) { return Node(id);}
-    
-    static Edge fromId(int id, Edge) { return Edge(id);}
+    static Node nodeFromId(int id) { return Node(id);}
+    
+    static Edge edgeFromId(int id) { return Edge(id);}
 
     typedef True FindEdgeTag;
@@ -359,6 +358,6 @@
   /// GridGraph graph(h, w);
   /// GridGraph::NodeMap<int> val(graph); 
-  /// for (int i = 0; i < graph.height(); ++i) {
-  ///   for (int j = 0; j < graph.width(); ++j) {
+  /// for (int i = 0; i < graph.width(); ++i) {
+  ///   for (int j = 0; j < graph.height(); ++j) {
   ///     val[graph(i, j)] = i + j;
   ///   }
@@ -504,12 +503,12 @@
   /// \brief Row map of the grid graph
   ///
-  /// Just returns an RowMap for the grid graph.
+  /// Just returns a RowMap for the grid graph.
   GridGraph::RowMap rowMap(const GridGraph& graph) {
     return GridGraph::RowMap(graph);
   }
 
-  /// \brief Coloumn map of the grid graph
-  ///
-  /// Just returns an ColMap for the grid graph.
+  /// \brief Column map of the grid graph
+  ///
+  /// Just returns a ColMap for the grid graph.
   GridGraph::ColMap colMap(const GridGraph& graph) {
     return GridGraph::ColMap(graph);
Index: lemon/hypercube_graph.h
===================================================================
--- lemon/hypercube_graph.h	(revision 1703)
+++ lemon/hypercube_graph.h	(revision 1791)
@@ -22,8 +22,10 @@
 #include <lemon/invalid.h>
 #include <lemon/utility.h>
+#include <lemon/error.h>
 
 #include <lemon/bits/iterable_graph_extender.h>
 #include <lemon/bits/alteration_notifier.h>
 #include <lemon/bits/default_map.h>
+#include <lemon/bits/graph_extender.h>
 
 ///\ingroup graphs
@@ -33,5 +35,5 @@
 namespace lemon {
 
-  /// \brief Base graph for HyperGraph.
+  /// \brief Base graph for HyperCubeGraph.
   ///
   /// Base graph for hyper-cube graph. It describes some member functions
@@ -78,10 +80,10 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxId(Node = INVALID) const { return nodeNum() - 1; }
+    int maxNodeId() const { return nodeNum() - 1; }
     /// Maximum edge ID.
     
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxId(Edge = INVALID) const { return edgeNum() - 1; }
+    int maxEdgeId() const { return edgeNum() - 1; }
 
     /// \brief Gives back the source node of an edge.
@@ -119,7 +121,7 @@
     static int id(Edge e) { return e.id; }
 
-    static Node fromId(int id, Node) { return Node(id);}
-    
-    static Edge fromId(int id, Edge) { return Edge(id);}
+    static Node nodeFromId(int id) { return Node(id);}
+    
+    static Edge edgeFromId(int id) { return Edge(id);}
 
     class Node {
@@ -236,5 +238,6 @@
     IterableGraphExtender<
     AlterableGraphExtender<
-    HyperCubeGraphBase > > > ExtendedHyperCubeGraphBase;
+    GraphExtender<
+    HyperCubeGraphBase> > > > ExtendedHyperCubeGraphBase;
 
   /// \ingroup graphs
@@ -308,5 +311,6 @@
 		   T fv = 0.0, const BF& bf = BF()) 
 	: _graph(graph), _values(begin, end), _first_value(fv), _bin_func(bf) {
-	if (_values.size() != graph.dimension()) {}
+	LEMON_ASSERT(_values.size() != graph.dimension(), 
+		     "Wrong size of dimension");
       }
 
Index: lemon/list_graph.h
===================================================================
--- lemon/list_graph.h	(revision 1774)
+++ lemon/list_graph.h	(revision 1791)
@@ -28,6 +28,5 @@
 #include <lemon/bits/alteration_notifier.h>
 #include <lemon/bits/default_map.h>
-
-#include <lemon/bits/undir_graph_extender.h>
+#include <lemon/bits/graph_extender.h>
 
 #include <lemon/error.h>
@@ -106,5 +105,5 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxId(Node = INVALID) const { return nodes.size()-1; } 
+    int maxNodeId() const { return nodes.size()-1; } 
 
     /// Maximum edge ID.
@@ -112,5 +111,5 @@
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxId(Edge = INVALID) const { return edges.size()-1; }
+    int maxEdgeId() const { return edges.size()-1; }
 
     Node source(Edge e) const { return edges[e.id].source; }
@@ -165,6 +164,6 @@
     static int id(Edge e) { return e.id; }
 
-    static Node fromId(int id, Node) { return Node(id);}
-    static Edge fromId(int id, Edge) { return Edge(id);}
+    static Node nodeFromId(int id) { return Node(id);}
+    static Edge edgeFromId(int id) { return Edge(id);}
 
     /// Adds a new node to the graph.
@@ -316,5 +315,6 @@
     MappableGraphExtender<
     IterableGraphExtender<
-    AlterableGraphExtender<ListGraphBase> > > > > > ExtendedListGraphBase;
+    AlterableGraphExtender<
+    GraphExtender<ListGraphBase> > > > > > > ExtendedListGraphBase;
 
   /// \addtogroup graphs
Index: lemon/smart_graph.h
===================================================================
--- lemon/smart_graph.h	(revision 1770)
+++ lemon/smart_graph.h	(revision 1791)
@@ -31,6 +31,5 @@
 #include <lemon/bits/alteration_notifier.h>
 #include <lemon/bits/default_map.h>
-
-#include <lemon/bits/undir_graph_extender.h>
+#include <lemon/bits/graph_extender.h>
 
 #include <lemon/utility.h>
@@ -91,10 +90,10 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxId(Node) const { return nodes.size()-1; }
+    int maxNodeId() const { return nodes.size()-1; }
     /// Maximum edge ID.
     
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxId(Edge) const { return edges.size()-1; }
+    int maxEdgeId() const { return edges.size()-1; }
 
     Node source(Edge e) const { return edges[e.n].source; }
@@ -104,6 +103,6 @@
     
     /// The ID of a valid Node is a nonnegative integer not greater than
-    /// \ref maxId(Node). The range of the ID's is not surely continuous
-    /// and the greatest node ID can be actually less then \ref maxId(Node).
+    /// \ref maxNodeId(). The range of the ID's is not surely continuous
+    /// and the greatest node ID can be actually less then \ref maxNodeId().
     ///
     /// The ID of the \ref INVALID node is -1.
@@ -113,6 +112,6 @@
     
     /// The ID of a valid Edge is a nonnegative integer not greater than
-    /// \ref maxId(Edge). The range of the ID's is not surely continuous
-    /// and the greatest edge ID can be actually less then \ref maxId(Edge).
+    /// \ref maxEdgeId(). The range of the ID's is not surely continuous
+    /// and the greatest edge ID can be actually less then \ref maxEdgeId().
     ///
     /// The ID of the \ref INVALID edge is -1.
@@ -120,7 +119,7 @@
     static int id(Edge e) { return e.n; }
 
-    static Node fromId(int id, Node) { return Node(id);}
-
-    static Edge fromId(int id, Edge) { return Edge(id);}
+    static Node nodeFromId(int id) { return Node(id);}
+
+    static Edge edgeFromId(int id) { return Edge(id);}
 
     Node addNode() {
@@ -152,8 +151,4 @@
     protected:
       int n;
-      ///\e
-
-      ///\todo It should be removed (or at least define a setToId() instead).
-      ///
       Node(int nn) {n=nn;}
     public:
@@ -172,6 +167,4 @@
     protected:
       int n;
-      ///\todo It should be removed (or at least define a setToId() instead).
-      ///
       Edge(int nn) {n=nn;}
     public:
@@ -231,8 +224,8 @@
     MappableGraphExtender<
     IterableGraphExtender<
-    AlterableGraphExtender<SmartGraphBase> > > > > ExtendedSmartGraphBase;
-
-  /// \addtogroup graphs
-  /// @{
+    AlterableGraphExtender<
+    GraphExtender<SmartGraphBase> > > > > > ExtendedSmartGraphBase;
+
+  /// \ingroup graphs
 
   ///A smart graph class.
