Index: src/lemon/Makefile.am
===================================================================
--- src/lemon/Makefile.am	(revision 977)
+++ src/lemon/Makefile.am	(revision 980)
@@ -1,3 +1,4 @@
 pkginclude_HEADERS =							\
+	map_defines.h							\
 	array_map.h                                                     \
 	bfs.h                                                           \
@@ -7,5 +8,4 @@
 	dijkstra.h							\
 	dimacs.h							\
-	extended_pair.h                                                 \
 	fib_heap.h							\
 	full_graph.h							\
@@ -15,5 +15,4 @@
 	kruskal.h							\
 	list_graph.h							\
-	map_iterator.h                                                  \
 	alteration_observer_registry.h                                  \
 	maps.h								\
@@ -28,9 +27,6 @@
 	xy.h								\
 	concept_check.h							\
-	map_defines.h							\
-	map_bits.h							\
 	utility.h							\
 	iterable_graph_extender.h					\
-	idmappable_graph_extender.h				   	\
 	extendable_graph_extender.h					\
 	clearable_graph_extender.h					\
Index: src/lemon/alteration_observer_registry.h
===================================================================
--- src/lemon/alteration_observer_registry.h	(revision 978)
+++ src/lemon/alteration_observer_registry.h	(revision 980)
@@ -322,9 +322,9 @@
   public:
 
-    EdgeObserverRegistry& getEdgeObserverRegistry() const {
+    EdgeObserverRegistry& getObserverRegistry(Edge = INVALID) const {
       return edge_observers;
     }
 
-    NodeObserverRegistry& getNodeObserverRegistry() const {
+    NodeObserverRegistry& getObserverRegistry(Node = INVALID) const {
       return node_observers;
     }
@@ -365,5 +365,5 @@
     mutable UndirEdgeObserverRegistry undir_edge_observers;
 
-    UndirEdgeObserverRegistry& getUndirEdgeObserverRegistry() const {
+    UndirEdgeObserverRegistry& getObserverRegistry(UndirEdge = INVALID) const {
       return undir_edge_observers;
     }
Index: src/lemon/array_map.h
===================================================================
--- src/lemon/array_map.h	(revision 979)
+++ src/lemon/array_map.h	(revision 980)
@@ -45,5 +45,4 @@
 	    typename _Item,
 	    typename _ItemIt,
-	    typename _IdMap,
 	    typename _Value>
   class ArrayMap : public AlterationObserverRegistry<_Item>::ObserverBase {
@@ -61,6 +60,4 @@
     /// The iterator to iterate on the keys.
     typedef _ItemIt KeyIt;
-
-    typedef _IdMap IdMap;
 
     typedef _Value Value;
@@ -95,9 +92,9 @@
     /** Graph and Registry initialized map constructor.
      */
-    ArrayMap(const Graph& _g, Registry& _r) : graph(&_g) {
-      attach(_r);
+    ArrayMap(const Graph& _g) : graph(&_g) {
+      attach(_g.getObserverRegistry(_Item()));
       allocate_memory();
       for (KeyIt it(*graph); it != INVALID; ++it) {
-	int id = IdMap(*graph)[it];
+	int id = graph->id(it);;
 	allocator.construct(&(values[id]), Value());
       }								
@@ -108,9 +105,9 @@
     /// It constrates a map and initialize all of the the map. 
 
-    ArrayMap(const Graph& _g, Registry& _r, const Value& _v) : graph(&_g) {
-      attach(_r);
+    ArrayMap(const Graph& _g, const Value& _v) : graph(&_g) {
+      attach(_g.getObserverRegistry(_Item()));
       allocate_memory();
       for (KeyIt it(*graph); it != INVALID; ++it) {
-	int id = IdMap(*graph)[it];
+	int id = graph->id(it);;
 	allocator.construct(&(values[id]), _v);
       }								
@@ -127,5 +124,5 @@
       values = allocator.allocate(capacity);
       for (KeyIt it(*graph); it != INVALID; ++it) {
-	int id = IdMap(*graph)[it];
+	int id = graph->id(it);;
 	allocator.construct(&(values[id]), copy.values[id]);
       }
@@ -155,5 +152,5 @@
 
       for (KeyIt it(*graph); it != INVALID; ++it) {
-	int id = IdMap(*graph)[it];
+	int id = graph->id(it);;
 	allocator.construct(&(values[id]), copy.values[id]);
       }
@@ -177,5 +174,5 @@
      */
     ReferenceType operator[](const KeyType& key) {
-      int id = IdMap(*graph)[key];
+      int id = graph->id(key);
       return values[id];
     } 
@@ -186,5 +183,5 @@
      */
     ConstReferenceType operator[](const KeyType& key) const {
-      int id = IdMap(*graph)[key];
+      int id = graph->id(key);
       return values[id];
     }
@@ -200,5 +197,5 @@
      */
     void add(const KeyType& key) {
-      int id = IdMap(*graph)[key];
+      int id = graph->id(key);
       if (id >= capacity) {
 	int new_capacity = (capacity == 0 ? 1 : capacity);
@@ -208,5 +205,5 @@
 	Value* new_values = allocator.allocate(new_capacity);
 	for (KeyIt it(*graph); it != INVALID; ++it) {
-	  int jd = IdMap(*graph)[it];
+	  int jd = graph->id(it);;
 	  if (id != jd) {
 	    allocator.construct(&(new_values[jd]), values[jd]);
@@ -224,5 +221,5 @@
      */
     void erase(const KeyType& key) {
-      int id = IdMap(*graph)[key];
+      int id = graph->id(key);
       allocator.destroy(&(values[id]));
     }
@@ -231,5 +228,5 @@
       allocate_memory();
       for (KeyIt it(*graph); it != INVALID; ++it) {
-	int id = IdMap(*graph)[it];
+	int id = graph->id(it);;
 	allocator.construct(&(values[id]), Value());
       }								
@@ -239,5 +236,5 @@
       if (capacity != 0) {
 	for (KeyIt it(*graph); it != INVALID; ++it) {
-	  int id = IdMap(*graph)[it];
+	  int id = graph->id(it);;
 	  allocator.destroy(&(values[id]));
 	}								
@@ -303,5 +300,5 @@
       
     void allocate_memory() {
-      int max_id = IdMap(*graph).maxId();
+      int max_id = graph->maxId(_Item());
       if (max_id == -1) {
 	capacity = 0;
@@ -344,10 +341,8 @@
     typedef typename Parent::Node Node;
     typedef typename Parent::NodeIt NodeIt;
-    typedef typename Parent::NodeIdMap NodeIdMap;
     typedef typename Parent::NodeObserverRegistry NodeObserverRegistry;
 
     typedef typename Parent::Edge Edge;
     typedef typename Parent::EdgeIt EdgeIt;
-    typedef typename Parent::EdgeIdMap EdgeIdMap;
     typedef typename Parent::EdgeObserverRegistry EdgeObserverRegistry;
 
@@ -355,5 +350,5 @@
 
     template <typename _Value>
-    class NodeMap : public ArrayMap<Graph, Node, NodeIt, NodeIdMap, _Value> {
+    class NodeMap : public ArrayMap<Graph, Node, NodeIt, _Value> {
     public:
       typedef ArrayMappableGraphExtender<_Base> Graph;
@@ -361,7 +356,6 @@
       typedef typename Graph::Node Node;
       typedef typename Graph::NodeIt NodeIt;
-      typedef typename Graph::NodeIdMap NodeIdMap;
-
-      typedef ArrayMap<Graph, Node, NodeIt, NodeIdMap, _Value> Parent;
+
+      typedef ArrayMap<Graph, Node, NodeIt, _Value> Parent;
 
       //typedef typename Parent::Graph Graph;
@@ -369,12 +363,12 @@
 
       NodeMap(const Graph& g) 
-	: Parent(g, g.getNodeObserverRegistry()) {}
+	: Parent(g) {}
       NodeMap(const Graph& g, const Value& v) 
-	: Parent(g, g.getNodeObserverRegistry(), v) {}
+	: Parent(g, v) {}
 
     };
 
     template <typename _Value>
-    class EdgeMap : public ArrayMap<Graph, Edge, EdgeIt, EdgeIdMap, _Value> {
+    class EdgeMap : public ArrayMap<Graph, Edge, EdgeIt, _Value> {
     public:
       typedef ArrayMappableGraphExtender<_Base> Graph;
@@ -382,7 +376,6 @@
       typedef typename Graph::Edge Edge;
       typedef typename Graph::EdgeIt EdgeIt;
-      typedef typename Graph::EdgeIdMap EdgeIdMap;
-
-      typedef ArrayMap<Graph, Edge, EdgeIt, EdgeIdMap, _Value> Parent;
+
+      typedef ArrayMap<Graph, Edge, EdgeIt, _Value> Parent;
 
       //typedef typename Parent::Graph Graph;
@@ -390,7 +383,7 @@
 
       EdgeMap(const Graph& g) 
-	: Parent(g, g.getEdgeObserverRegistry()) {}
+	: Parent(g) {}
       EdgeMap(const Graph& g, const Value& v) 
-	: Parent(g, g.getEdgeObserverRegistry(), v) {}
+	: Parent(g, v) {}
 
     };
Index: src/lemon/clearable_graph_extender.h
===================================================================
--- src/lemon/clearable_graph_extender.h	(revision 946)
+++ src/lemon/clearable_graph_extender.h	(revision 980)
@@ -15,8 +15,10 @@
     typedef ClearableGraphExtender Graph;
     typedef _Base Parent;
+    typedef typename Parent::Node Node;
+    typedef typename Parent::Edge Edge;
 
     void clear() {
-      Parent::getNodeObserverRegistry().clear();
-      Parent::getEdgeObserverRegistry().clear();
+      Parent::getObserverRegistry(Node()).clear();
+      Parent::getObserverRegistry(Edge()).clear();
       Parent::clear();
     }
Index: src/lemon/concept/graph_component.h
===================================================================
--- src/lemon/concept/graph_component.h	(revision 964)
+++ src/lemon/concept/graph_component.h	(revision 980)
@@ -162,4 +162,8 @@
 
 
+	/// Assign operator for nodes.
+
+	/// The nodes are assignable. 
+	///
 	Node& operator=(const Node&) { return *this;}
 
@@ -211,5 +215,8 @@
 	Edge(Invalid) {}
 
-
+	/// Assign operator for edges.
+
+	/// The edges are assignable. 
+	///
 	Edge& operator=(const Edge&) { return *this;}
 
@@ -430,5 +437,5 @@
       /// Gives back an integer greater or equal to the maximum Node id. 
       ///
-      int maxEdgeId() const { return -1;}
+      int maxId(Node = INVALID) const { return -1;}
 
       /// Gives back an integer greater or equal to the maximum Edge id. 
@@ -436,5 +443,5 @@
       /// Gives back an integer greater or equal to the maximum Edge id. 
       ///
-      int maxNodeId() const { return -1;}
+      int maxId(Edge = INVALID) const { return -1;}
     };
 
@@ -448,7 +455,7 @@
       void constraints() {
 	function_requires< BaseGraphComponentConcept<Graph> >();
-	int nid = graph.maxEdgeId();
+	int nid = graph.maxId(typename Graph::Node());
 	ignore_unused_variable_warning(nid);
-	int eid = graph.maxNodeId();
+	int eid = graph.maxId(typename Graph::Edge());
 	ignore_unused_variable_warning(eid);
       }
@@ -663,50 +670,4 @@
 
 
-    class IdMappableGraphComponent : virtual public BaseGraphComponent {
-
-      typedef IdMappableGraphComponent Graph;
-
-    public:
-
-      typedef BaseGraphComponent::Node Node;
-      typedef BaseGraphComponent::Edge Edge;
-
-      class NodeIdMap : public ReadMap<Node, int> {
-      public:
-	NodeIdMap(const Graph&) {}
-	int maxId() const { return -1;}
-      };
-
-      class EdgeIdMap : public ReadMap<Edge, int> {
-      public:
-	EdgeIdMap(const Graph&) {}
-	int maxId() const { return -1;}
-      };
-
-    };
-    
-    template <typename Graph>
-    struct IdMappableGraphComponentConcept {
-      void constraints() {	
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	{
-	  typedef typename Graph::EdgeIdMap EdgeIdMap;
-	  function_requires<ReadMapConcept<EdgeIdMap> >();
-	  EdgeIdMap edge_map(graph);
-	  int n = edge_map.maxId();
-	  ignore_unused_variable_warning(n);
-	}
-	{
-	  typedef typename Graph::NodeIdMap NodeIdMap;
-	  function_requires<ReadMapConcept<NodeIdMap> >();
-	  NodeIdMap node_map(graph);
-	  int n = node_map.maxId();
-	  ignore_unused_variable_warning(n);
-	}
-      }
-      Graph& graph;
-    };
-
-
     class MappableGraphComponent : virtual public BaseGraphComponent {
     public:
Index: src/lemon/default_map.h
===================================================================
--- src/lemon/default_map.h	(revision 979)
+++ src/lemon/default_map.h	(revision 980)
@@ -43,65 +43,65 @@
 
 
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap, typename _Value>
+  template <typename _Graph, typename _Item, typename _ItemIt, typename _Value>
   struct DefaultMapSelector {
-    typedef ArrayMap<_Graph, _Item, _ItemIt, _IdMap, _Value> Map;
+    typedef ArrayMap<_Graph, _Item, _ItemIt, _Value> Map;
   };
 
   // bool
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, bool> {
-    typedef VectorMap<_Graph, _Item, _IdMap, bool> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, bool> {
+    typedef VectorMap<_Graph, _Item, bool> Map;
   };
 
   // char
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, char> {
-    typedef VectorMap<_Graph, _Item, _IdMap, char> Map;
-  };
-
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, signed char> {
-    typedef VectorMap<_Graph, _Item, _IdMap, signed char> Map;
-  };
-
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, unsigned char> {
-    typedef VectorMap<_Graph, _Item, _IdMap, unsigned char> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, char> {
+    typedef VectorMap<_Graph, _Item, char> Map;
+  };
+
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, signed char> {
+    typedef VectorMap<_Graph, _Item, signed char> Map;
+  };
+
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, unsigned char> {
+    typedef VectorMap<_Graph, _Item, unsigned char> Map;
   };
 
 
   // int
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, signed int> {
-    typedef VectorMap<_Graph, _Item, _IdMap, signed int> Map;
-  };
-
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, unsigned int> {
-    typedef VectorMap<_Graph, _Item, _IdMap, unsigned int> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, signed int> {
+    typedef VectorMap<_Graph, _Item, signed int> Map;
+  };
+
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, unsigned int> {
+    typedef VectorMap<_Graph, _Item, unsigned int> Map;
   };
 
 
   // short
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, signed short> {
-    typedef VectorMap<_Graph, _Item, _IdMap, signed short> Map;
-  };
-
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, unsigned short> {
-    typedef VectorMap<_Graph, _Item, _IdMap, unsigned short> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, signed short> {
+    typedef VectorMap<_Graph, _Item, signed short> Map;
+  };
+
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, unsigned short> {
+    typedef VectorMap<_Graph, _Item, unsigned short> Map;
   };
 
 
   // long
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, signed long> {
-    typedef VectorMap<_Graph, _Item, _IdMap, signed long> Map;
-  };
-
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, unsigned long> {
-    typedef VectorMap<_Graph, _Item, _IdMap, unsigned long> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, signed long> {
+    typedef VectorMap<_Graph, _Item, signed long> Map;
+  };
+
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, unsigned long> {
+    typedef VectorMap<_Graph, _Item, unsigned long> Map;
   };
 
@@ -110,28 +110,28 @@
 
   // float
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, float> {
-    typedef VectorMap<_Graph, _Item, _IdMap, float> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, float> {
+    typedef VectorMap<_Graph, _Item, float> Map;
   };
 
 
   // double
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, double> {
-    typedef VectorMap<_Graph, _Item, _IdMap,  double> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, double> {
+    typedef VectorMap<_Graph, _Item,  double> Map;
   };
 
 
   // long double
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, long double> {
-    typedef VectorMap<_Graph, _Item, _IdMap, long double> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, long double> {
+    typedef VectorMap<_Graph, _Item, long double> Map;
   };
 
 
   // pointer
-  template <typename _Graph, typename _Item, typename _ItemIt, typename _IdMap, typename _Ptr>
-  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, _Ptr*> {
-    typedef VectorMap<_Graph, _Item, _IdMap, _Ptr*> Map;
+  template <typename _Graph, typename _Item, typename _ItemIt, typename _Ptr>
+  struct DefaultMapSelector<_Graph, _Item, _ItemIt, _Ptr*> {
+    typedef VectorMap<_Graph, _Item, _Ptr*> Map;
   };
 
@@ -141,17 +141,15 @@
 	    typename _Item,
 	    typename _ItemIt,
-	    typename _IdMap,
 	    typename _Value>
-  class DefaultMap : public DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, _Value>::Map {
+  class DefaultMap : public DefaultMapSelector<_Graph, _Item, _ItemIt, _Value>::Map {
   public:
-    typedef typename DefaultMapSelector<_Graph, _Item, _ItemIt, _IdMap, _Value>::Map Parent;
-    typedef DefaultMap<_Graph, _Item, _ItemIt, _IdMap, bool> Map;
+    typedef typename DefaultMapSelector<_Graph, _Item, _ItemIt, _Value>::Map Parent;
+    typedef DefaultMap<_Graph, _Item, _ItemIt, _Value> Map;
     
     typedef typename Parent::Graph Graph;
-    typedef typename Parent::Registry Registry;
     typedef typename Parent::ValueType ValueType;
 
-    DefaultMap(const Graph& _g, Registry& _r) : Parent(_g, _r) {}
-    DefaultMap(const Graph& _g, Registry& _r, const ValueType& _v) : Parent(_g, _r, _v) {}
+    DefaultMap(const Graph& _g) : Parent(_g) {}
+    DefaultMap(const Graph& _g, const ValueType& _v) : Parent(_g, _v) {}
   };
 
@@ -167,16 +165,11 @@
     typedef typename Parent::Node Node;
     typedef typename Parent::NodeIt NodeIt;
-    typedef typename Parent::NodeIdMap NodeIdMap;
-    typedef typename Parent::NodeObserverRegistry NodeObserverRegistry;
 
     typedef typename Parent::Edge Edge;
     typedef typename Parent::EdgeIt EdgeIt;
-    typedef typename Parent::EdgeIdMap EdgeIdMap;
-    typedef typename Parent::EdgeObserverRegistry EdgeObserverRegistry;
 
     
-
     template <typename _Value>
-    class NodeMap : public DefaultMap<Graph, Node, NodeIt, NodeIdMap, _Value> {
+    class NodeMap : public DefaultMap<Graph, Node, NodeIt, _Value> {
     public:
       typedef DefaultMappableGraphExtender<_Base> Graph;
@@ -184,20 +177,19 @@
       typedef typename Graph::Node Node;
       typedef typename Graph::NodeIt NodeIt;
-      typedef typename Graph::NodeIdMap NodeIdMap;
-
-      typedef DefaultMap<Graph, Node, NodeIt, NodeIdMap, _Value> Parent;
+
+      typedef DefaultMap<Graph, Node, NodeIt, _Value> Parent;
 
       //typedef typename Parent::Graph Graph;
       typedef typename Parent::ValueType ValueType;
 
-      NodeMap(const Graph& g) 
-	: Parent(g, g.getNodeObserverRegistry()) {}
-      NodeMap(const Graph& g, const ValueType& v) 
-	: Parent(g, g.getNodeObserverRegistry(), v) {}
+      NodeMap(const Graph& _g) 
+	: Parent(_g) {}
+      NodeMap(const Graph& _g, const ValueType& _v) 
+	: Parent(_g, _v) {}
 
     };
 
     template <typename _Value>
-    class EdgeMap : public DefaultMap<Graph, Edge, EdgeIt, EdgeIdMap, _Value> {
+    class EdgeMap : public DefaultMap<Graph, Edge, EdgeIt, _Value> {
     public:
       typedef DefaultMappableGraphExtender<_Base> Graph;
@@ -205,15 +197,14 @@
       typedef typename Graph::Edge Edge;
       typedef typename Graph::EdgeIt EdgeIt;
-      typedef typename Graph::EdgeIdMap EdgeIdMap;
-
-      typedef DefaultMap<Graph, Edge, EdgeIt, EdgeIdMap, _Value> Parent;
+
+      typedef DefaultMap<Graph, Edge, EdgeIt, _Value> Parent;
 
       //typedef typename Parent::Graph Graph;
       typedef typename Parent::ValueType ValueType;
 
-      EdgeMap(const Graph& g) 
-	: Parent(g, g.getEdgeObserverRegistry()) {}
-      EdgeMap(const Graph& g, const ValueType& v) 
-	: Parent(g, g.getEdgeObserverRegistry(), v) {}
+      EdgeMap(const Graph& _g) 
+	: Parent(_g) {}
+      EdgeMap(const Graph& _g, const ValueType& _v) 
+	: Parent(_g, _v) {}
 
     };
Index: src/lemon/erasable_graph_extender.h
===================================================================
--- src/lemon/erasable_graph_extender.h	(revision 946)
+++ src/lemon/erasable_graph_extender.h	(revision 980)
@@ -33,10 +33,10 @@
       }
 
-      Parent::getNodeObserverRegistry().erase(node);
+      Parent::getObserverRegistry(Node()).erase(node);
       Parent::erase(node);
     }
     
     void erase(const Edge& edge) {
-      Parent::getEdgeObserverRegistry().erase(edge);
+      Parent::getObserverRegistry(Edge()).erase(edge);
       Parent::erase(edge);
     }
Index: src/lemon/extendable_graph_extender.h
===================================================================
--- src/lemon/extendable_graph_extender.h	(revision 946)
+++ src/lemon/extendable_graph_extender.h	(revision 980)
@@ -18,5 +18,5 @@
     Node addNode() {
       Node node = Parent::addNode();
-      Parent::getNodeObserverRegistry().add(node);
+      Parent::getObserverRegistry(Node()).add(node);
       return node;
     }
@@ -24,5 +24,5 @@
     Edge addEdge(const Node& from, const Node& to) {
       Edge edge = Parent::addEdge(from, to);
-      Parent::getEdgeObserverRegistry().add(edge);
+      Parent::getObserverRegistry(Edge()).add(edge);
       return edge;
     }
Index: src/lemon/full_graph.h
===================================================================
--- src/lemon/full_graph.h	(revision 977)
+++ src/lemon/full_graph.h	(revision 980)
@@ -19,5 +19,4 @@
 
 
-#include <lemon/idmappable_graph_extender.h>
 #include <lemon/iterable_graph_extender.h>
 #include <lemon/alteration_observer_registry.h>
@@ -71,10 +70,10 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxNodeId() const { return NodeNum-1; }
+    int maxId(Node = INVALID) const { return NodeNum-1; }
     /// Maximum edge ID.
     
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxEdgeId() const { return EdgeNum-1; }
+    int maxId(Edge = INVALID) const { return EdgeNum-1; }
 
     Node tail(Edge e) const { return e.id % NodeNum; }
@@ -189,6 +188,5 @@
   typedef AlterableGraphExtender<FullGraphBase> AlterableFullGraphBase;
   typedef IterableGraphExtender<AlterableFullGraphBase> IterableFullGraphBase;
-  typedef IdMappableGraphExtender<IterableFullGraphBase> IdMappableFullGraphBase;
-  typedef DefaultMappableGraphExtender<IdMappableFullGraphBase> MappableFullGraphBase;
+  typedef DefaultMappableGraphExtender<IterableFullGraphBase> MappableFullGraphBase;
 
   ///A full graph class.
Index: src/lemon/idmappable_graph_extender.h
===================================================================
--- src/lemon/idmappable_graph_extender.h	(revision 946)
+++ 	(revision )
@@ -1,52 +1,0 @@
-// -*- c++ -*-
-
-#ifndef LEMON_IDMAPPABLE_GRAPH_EXTENDER_H
-#define LEMON_IDMAPPABLE_GRAPH_EXTENDER_H
-
-
-namespace lemon {
-
-  template <typename Base> 
-  class IdMappableGraphExtender : public Base {
-  public:
-
-    typedef IdMappableGraphExtender Graph;
-    typedef Base Parent;
- 
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Edge Edge;
-
-
-  public:
-
-    class NodeIdMap {
-    private:
-      const Graph* graph;
-
-    public:
-      NodeIdMap(const Graph& g) : graph(&g) {}
-
-      int operator[](const Node& node) const { return graph->id(node); }
-
-      int maxId() const {return graph->maxNodeId(); }
-
-    };
-
-    class EdgeIdMap {
-    private:
-      const Graph* graph;
-
-    public:
-      EdgeIdMap(const Graph& g) : graph(&g) {}
-
-      int operator[](const Edge& edge) const { return graph->id(edge); }
-
-      int maxId() const {return graph->maxEdgeId(); }
-
-    };
-
-  };
-
-}
-
-#endif
Index: src/lemon/list_graph.h
===================================================================
--- src/lemon/list_graph.h	(revision 975)
+++ src/lemon/list_graph.h	(revision 980)
@@ -26,6 +26,4 @@
 #include <lemon/extendable_graph_extender.h>
 
-#include <lemon/idmappable_graph_extender.h>
-
 #include <lemon/iterable_graph_extender.h>
 
@@ -106,5 +104,5 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxNodeId() const { return nodes.size()-1; } 
+    int maxId(Node = INVALID) const { return nodes.size()-1; } 
 
     /// Maximum edge ID.
@@ -112,5 +110,5 @@
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxEdgeId() const { return edges.size()-1; }
+    int maxId(Edge = INVALID) const { return edges.size()-1; }
 
     Node tail(Edge e) const { return edges[e.id].tail; }
@@ -304,6 +302,5 @@
   typedef AlterableGraphExtender<ListGraphBase> AlterableListGraphBase;
   typedef IterableGraphExtender<AlterableListGraphBase> IterableListGraphBase;
-  typedef IdMappableGraphExtender<IterableListGraphBase> IdMappableListGraphBase;
-  typedef DefaultMappableGraphExtender<IdMappableListGraphBase> MappableListGraphBase;
+  typedef DefaultMappableGraphExtender<IterableListGraphBase> MappableListGraphBase;
   typedef ExtendableGraphExtender<MappableListGraphBase> ExtendableListGraphBase;
   typedef ClearableGraphExtender<ExtendableListGraphBase> ClearableListGraphBase;
Index: src/lemon/map_bits.h
===================================================================
--- src/lemon/map_bits.h	(revision 937)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/* -*- C++ -*-
- * src/lemon/map_bits.h - Part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Combinatorial Optimization Research Group, 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_MAP_BITS_H
-#define LEMON_MAP_BITS_H
-
-///\ingroup graphmaps
-///\file
-///\brief Some utils to help implement maps.
-
-namespace lemon {
-
-
-  /// \addtogroup graphmaps
-  /// @{
-
-  /// Helper class to get information about the key type.
-  template <typename Graph, typename KeyIt>
-  struct KeyInfo {};
-
-  template <typename Graph>
-  struct KeyInfo<Graph, typename Graph::NodeIt> {
-    static int maxId(const Graph& graph) {
-      return graph.maxNodeId();
-    }
-    static int id(const Graph& graph, const typename Graph::Node& node) {
-      return graph.id(node);
-    }
-  };
-
-  template <typename Graph>
-  struct KeyInfo<Graph, typename Graph::EdgeIt> {
-    static int maxId(const Graph& graph) {
-      return graph.maxEdgeId();
-    }
-    static int id(const Graph& graph, const typename Graph::Edge& edge) {
-      return graph.id(edge);
-    }
-  };
-
-  template <typename Graph>
-  struct KeyInfo<Graph, typename Graph::SymEdgeIt> {
-    static int maxId(const Graph& graph) {
-      return graph.maxSymEdgeId();
-    }
-    static int id(const Graph& graph, const typename Graph::SymEdge& edge) {
-      return graph.id(edge);
-    }
-  };
-
-  /// @}
-}
-
-#endif
Index: src/lemon/smart_graph.h
===================================================================
--- src/lemon/smart_graph.h	(revision 977)
+++ src/lemon/smart_graph.h	(revision 980)
@@ -28,5 +28,4 @@
 #include <lemon/clearable_graph_extender.h>
 #include <lemon/extendable_graph_extender.h>
-#include <lemon/idmappable_graph_extender.h>
 #include <lemon/iterable_graph_extender.h>
 #include <lemon/alteration_observer_registry.h>
@@ -92,10 +91,10 @@
     /// Maximum node ID.
     ///\sa id(Node)
-    int maxNodeId() const { return nodes.size()-1; }
+    int maxId(Node = INVALID) const { return nodes.size()-1; }
     /// Maximum edge ID.
     
     /// Maximum edge ID.
     ///\sa id(Edge)
-    int maxEdgeId() const { return edges.size()-1; }
+    int maxId(Edge = INVALID) const { return edges.size()-1; }
 
     Node tail(Edge e) const { return edges[e.n].tail; }
@@ -222,6 +221,5 @@
   typedef AlterableGraphExtender<SmartGraphBase> AlterableSmartGraphBase;
   typedef IterableGraphExtender<AlterableSmartGraphBase> IterableSmartGraphBase;
-  typedef IdMappableGraphExtender<IterableSmartGraphBase> IdMappableSmartGraphBase;
-  typedef DefaultMappableGraphExtender<IdMappableSmartGraphBase> MappableSmartGraphBase;
+  typedef DefaultMappableGraphExtender<IterableSmartGraphBase> MappableSmartGraphBase;
   typedef ExtendableGraphExtender<MappableSmartGraphBase> ExtendableSmartGraphBase;
   typedef ClearableGraphExtender<ExtendableSmartGraphBase> ClearableSmartGraphBase;
@@ -240,5 +238,5 @@
   ///
   ///\author Alpar Juttner
-  class SmartGraph :public ClearableSmartGraphBase {
+  class SmartGraph : public ClearableSmartGraphBase {
   public:
     /// Finds an edge between two nodes.
Index: src/lemon/vector_map.h
===================================================================
--- src/lemon/vector_map.h	(revision 979)
+++ src/lemon/vector_map.h	(revision 980)
@@ -47,5 +47,4 @@
   template <typename _Graph, 
 	    typename _Item,
-	    typename _IdMap,
 	    typename _Value>
   class VectorMap : public AlterationObserverRegistry<_Item>::ObserverBase {
@@ -57,6 +56,4 @@
     typedef _Item KeyType;
     /// The id map type of the map.
-    typedef _IdMap IdMap;
-    /// The registry type of the map.
     typedef AlterationObserverRegistry<_Item> Registry;
     /// The value type of the map.
@@ -94,6 +91,6 @@
     /// It adds all the items of the graph to the map.
      
-    VectorMap(const Graph& _g, Registry& _r) : graph(&_g) {
-      attach(_r);
+    VectorMap(const Graph& _g) : graph(&_g) {
+      attach(_g.getObserverRegistry(_Item()));
       build();
     }
@@ -104,13 +101,13 @@
     /// It adds all the items of the graph to the map.
      
-    VectorMap(const Graph& g, Registry& r, const Value& v) : graph(&g) { 
-      attach(r);
-      container.resize(IdMap(*graph).maxId() + 1, v);
-    }
-
-    VectorMap(const VectorMap& copy) : graph(copy.getGraph()) {
-      if (copy.attached()) {
-	attach(*copy.getRegistry());
-	container = copy.container;
+    VectorMap(const Graph& _g, const Value& _v) : graph(&_g) { 
+      attach(_g.getObserverRegistry(_Item()));
+      container.resize(graph->maxId(_Item()) + 1, _v);
+    }
+
+    VectorMap(const VectorMap& _copy) : graph(_copy.getGraph()) {
+      if (_copy.attached()) {
+	attach(*_copy.getRegistry());
+	container = _copy.container;
       }
     }
@@ -155,5 +152,5 @@
      
     ReferenceType operator[](const KeyType& key) {
-      return container[IdMap(*graph)[key]];
+      return container[graph->id(key)];
     } 
 		
@@ -164,5 +161,5 @@
      
     ConstReferenceType operator[](const KeyType& key) const {
-      return container[IdMap(*graph)[key]];
+      return container[graph->id(key)];
     }
 
@@ -183,5 +180,5 @@
      
     void add(const KeyType& key) {
-      int id = IdMap(*graph)[key];
+      int id = graph->id(key);
       if (id >= (int)container.size()) {
 	container.resize(id + 1);
@@ -201,5 +198,5 @@
 
     void build() { 
-      container.resize(IdMap(*graph).maxId() + 1);
+      container.resize(graph->maxId(_Item()) + 1);
     }
 
@@ -240,12 +237,11 @@
 
     template <typename _Value>
-    class NodeMap : public VectorMap<Graph, Node, NodeIdMap, _Value> {
+    class NodeMap : public VectorMap<Graph, Node, _Value> {
     public:
       typedef VectorMappableGraphExtender<_Base> Graph;
 
       typedef typename Graph::Node Node;
-      typedef typename Graph::NodeIdMap NodeIdMap;
-
-      typedef VectorMap<Graph, Node, NodeIdMap, _Value> Parent;
+
+      typedef VectorMap<Graph, Node, _Value> Parent;
 
       //typedef typename Parent::Graph Graph;
@@ -253,19 +249,18 @@
 
       NodeMap(const Graph& g) 
-	: Parent(g, g.getNodeObserverRegistry()) {}
+	: Parent(g) {}
       NodeMap(const Graph& g, const Value& v) 
-	: Parent(g, g.getNodeObserverRegistry(), v) {}
+	: Parent(g, v) {}
 
     };
 
     template <typename _Value>
-    class EdgeMap : public VectorMap<Graph, Edge, EdgeIdMap, _Value> {
+    class EdgeMap : public VectorMap<Graph, Edge, _Value> {
     public:
       typedef VectorMappableGraphExtender<_Base> Graph;
 
       typedef typename Graph::Edge Edge;
-      typedef typename Graph::EdgeIdMap EdgeIdMap;
-
-      typedef VectorMap<Graph, Edge, EdgeIdMap, _Value> Parent;
+
+      typedef VectorMap<Graph, Edge, _Value> Parent;
 
       //typedef typename Parent::Graph Graph;
@@ -273,7 +268,7 @@
 
       EdgeMap(const Graph& g) 
-	: Parent(g, g.getEdgeObserverRegistry()) {}
+	: Parent(g) {}
       EdgeMap(const Graph& g, const Value& v) 
-	: Parent(g, g.getEdgeObserverRegistry(), v) {}
+	: Parent(g, v) {}
 
     };
Index: src/test/graph_test.cc
===================================================================
--- src/test/graph_test.cc	(revision 959)
+++ src/test/graph_test.cc	(revision 980)
@@ -34,5 +34,4 @@
     function_requires<IterableGraphComponentConcept<IterableGraphComponent> >();
 
-    function_requires<IdMappableGraphComponentConcept<IdMappableGraphComponent> >();
     function_requires<MappableGraphComponentConcept<MappableGraphComponent> >();
 
