Index: src/lemon/concept/graph.h
===================================================================
--- src/lemon/concept/graph.h	(revision 987)
+++ src/lemon/concept/graph.h	(revision 989)
@@ -102,12 +102,4 @@
 // 	bool operator!=(Node) const { return true; }
 
-//  	///Comparison operator.
-
-// 	///This is a strict ordering between the nodes.
-// 	///
-// 	///This ordering can be different from the order in which NodeIt
-// 	///goes through the nodes.
-// 	///\todo Possibly we don't need it.
-// 	bool operator<(Node) const { return true; }
 //       };
     
@@ -189,12 +181,4 @@
 // 	///
 // 	bool operator!=(Edge) const { return true; }
-//  	///Comparison operator.
-
-// 	///This is a strict ordering between the nodes.
-// 	///
-// 	///This ordering can be different from the order in which NodeIt
-// 	///goes through the nodes.
-// 	///\todo Possibly we don't need it.
-//  	bool operator<(Edge) const { return true; }
 //       };
     
@@ -340,28 +324,4 @@
 // 	EdgeIt& operator++() { return *this; }
 //       };
-
-//       /// First node of the graph.
-
-//       /// \retval i the first node.
-//       /// \return the first node.
-//       ///
-//       NodeIt& first(NodeIt& i) const { return i; }
-
-//       /// The first incoming edge.
-
-//       /// The first incoming edge.
-//       ///
-//       InEdgeIt& first(InEdgeIt &i, Node) const { return i; }
-//       /// The first outgoing edge.
-
-//       /// The first outgoing edge.
-//       ///
-//       OutEdgeIt& first(OutEdgeIt& i, Node) const { return i; }
-//       /// The first edge of the Graph.
-
-//       /// The first edge of the Graph.
-//       ///
-//       EdgeIt& first(EdgeIt& i) const { return i; }
-
 //       ///Gives back the target node of an edge.
 
@@ -374,38 +334,13 @@
 //       ///
 //       Node source(Edge) const { return INVALID; }
-  
-//       ///Gives back the \e id of a node.
-
-//       ///\warning Not all graph structures provide this feature.
-//       ///
-//       ///\todo Should each graph provide \c id?
-//       int id(const Node&) const { return 0; }
-//       ///Gives back the \e id of an edge.
-
-//       ///\warning Not all graph structures provide this feature.
-//       ///
-//       ///\todo Should each graph provide \c id?
-//       int id(const Edge&) const { return 0; }
-
-//       ///\e
-      
-//       ///\todo Should it be in the concept?
-//       ///
-//       int nodeNum() const { return 0; }
-//       ///\e
-
-//       ///\todo Should it be in the concept?
-//       ///
-//       int edgeNum() const { return 0; }
-
-
-//       ///Reference map of the nodes to type \c T.
+//       /// Read write map of the nodes to type \c T.
 
 //       /// \ingroup concept
-//       ///Reference map of the nodes to type \c T.
+//       /// ReadWrite map of the nodes to type \c T.
 //       /// \sa Reference
 //       /// \warning Making maps that can handle bool type (NodeMap<bool>)
 //       /// needs some extra attention!
-//       template<class T> class NodeMap : public ReferenceMap< Node, T >
+//       template<class T> 
+//       class NodeMap : public ReadWriteMap< Node, T >
 //       {
 //       public:
@@ -417,11 +352,11 @@
 
 // 	///Copy constructor
-// 	template<typename TT> NodeMap(const NodeMap<TT>&) { }
+// 	NodeMap(const NodeMap&) { }
 // 	///Assignment operator
-// 	template<typename TT> NodeMap& operator=(const NodeMap<TT>&)
-// 	{ return *this; }
-//       };
-
-//       ///Reference map of the edges to type \c T.
+// 	NodeMap& operator=(const NodeMap&) { return *this; }
+// 	// \todo fix this concept
+//       };
+
+//       /// Read write map of the edges to type \c T.
 
 //       /// \ingroup concept
@@ -430,6 +365,6 @@
 //       /// \warning Making maps that can handle bool type (EdgeMap<bool>)
 //       /// needs some extra attention!
-//       template<class T> class EdgeMap
-// 	: public ReferenceMap<Edge,T>
+//       template<class T> 
+//       class EdgeMap : public ReadWriteMap<Edge,T>
 //       {
 //       public:
@@ -439,211 +374,12 @@
 // 	///\e
 // 	EdgeMap(const StaticGraph&, T) { }
-    
 // 	///Copy constructor
-// 	template<typename TT> EdgeMap(const EdgeMap<TT>&) { }
+// 	EdgeMap(const EdgeMap&) { }
 // 	///Assignment operator
-// 	template<typename TT> EdgeMap &operator=(const EdgeMap<TT>&)
-// 	{ return *this; }
+// 	EdgeMap& operator=(const EdgeMap&) { return *this; }
+// 	// \todo fix this concept    
 //       };
 //     };
 
-//     struct DummyType {
-//       int value;
-//       DummyType() {}
-//       DummyType(int p) : value(p) {}
-//       DummyType& operator=(int p) { value = p; return *this;}
-//     };
-    
-//     ///\brief Checks whether \c G meets the
-//     ///\ref lemon::concept::StaticGraph "StaticGraph" concept
-//     template<class Graph> void checkCompileStaticGraph(Graph &G) 
-//     {
-//       typedef typename Graph::Node Node;
-//       typedef typename Graph::NodeIt NodeIt;
-//       typedef typename Graph::Edge Edge;
-//       typedef typename Graph::EdgeIt EdgeIt;
-//       typedef typename Graph::InEdgeIt InEdgeIt;
-//       typedef typename Graph::OutEdgeIt OutEdgeIt;
-  
-//       {
-// 	Node i; Node j(i); Node k(INVALID);
-// 	i=j;
-// 	bool b; b=true;
-// 	b=(i==INVALID); b=(i!=INVALID);
-// 	b=(i==j); b=(i!=j); b=(i<j);
-//       }
-//       {
-// 	NodeIt i; NodeIt j(i); NodeIt k(INVALID); NodeIt l(G);
-// 	i=j;
-// 	j=G.first(i);
-// 	j=++i;
-// 	bool b; b=true;
-// 	b=(i==INVALID); b=(i!=INVALID);
-// 	Node n(i);
-// 	n=i;
-// 	b=(i==j); b=(i!=j); b=(i<j);
-// 	//Node ->NodeIt conversion
-// 	NodeIt ni(G,n);
-//       }
-//       {
-// 	Edge i; Edge j(i); Edge k(INVALID);
-// 	i=j;
-// 	bool b; b=true;
-// 	b=(i==INVALID); b=(i!=INVALID);
-// 	b=(i==j); b=(i!=j); b=(i<j);
-//       }
-//       {
-// 	EdgeIt i; EdgeIt j(i); EdgeIt k(INVALID); EdgeIt l(G);
-// 	i=j;
-// 	j=G.first(i);
-// 	j=++i;
-// 	bool b; b=true;
-// 	b=(i==INVALID); b=(i!=INVALID);
-// 	Edge e(i);
-// 	e=i;
-// 	b=(i==j); b=(i!=j); b=(i<j);
-// 	//Edge ->EdgeIt conversion
-// 	EdgeIt ei(G,e);
-//       }
-//       {
-// 	Node n;
-// 	InEdgeIt i; InEdgeIt j(i); InEdgeIt k(INVALID); InEdgeIt l(G,n);
-// 	i=j;
-// 	j=G.first(i,n);
-// 	j=++i;
-// 	bool b; b=true;
-// 	b=(i==INVALID); b=(i!=INVALID);
-// 	Edge e(i);
-// 	e=i;
-// 	b=(i==j); b=(i!=j); b=(i<j);
-// 	//Edge ->InEdgeIt conversion
-// 	InEdgeIt ei(G,e);
-//       }
-//       {
-// 	Node n;
-// 	OutEdgeIt i; OutEdgeIt j(i); OutEdgeIt k(INVALID); OutEdgeIt l(G,n);
-// 	i=j;
-// 	j=G.first(i,n);
-// 	j=++i;
-// 	bool b; b=true;
-// 	b=(i==INVALID); b=(i!=INVALID);
-// 	Edge e(i);
-// 	e=i;
-// 	b=(i==j); b=(i!=j); b=(i<j);
-// 	//Edge ->OutEdgeIt conversion
-// 	OutEdgeIt ei(G,e);
-//       }
-//       {
-// 	Node n,m;
-// 	n=m=INVALID;
-// 	Edge e;
-// 	e=INVALID;
-// 	n=G.source(e);
-// 	n=G.target(e);
-//       }
-//       // id tests
-//       { Node n; int i=G.id(n); i=i; }
-//       { Edge e; int i=G.id(e); i=i; }
-//       //NodeMap tests
-//       {
-// 	Node k;
-// 	typename Graph::template NodeMap<int> m(G);
-// 	//Const map
-// 	typename Graph::template NodeMap<int> const &cm = m;
-// 	//Inicialize with default value
-// 	typename Graph::template NodeMap<int> mdef(G,12);
-// 	//Copy
-// 	typename Graph::template NodeMap<int> mm(cm);
-// 	//Copy from another type
-// 	typename Graph::template NodeMap<double> dm(cm);
-// 	//Copy to more complex type
-// 	typename Graph::template NodeMap<DummyType> em(cm);
-// 	int v;
-// 	v=m[k]; m[k]=v; m.set(k,v);
-// 	v=cm[k];
-    
-// 	m=cm;  
-// 	dm=cm; //Copy from another type  
-// 	em=cm; //Copy to more complex type
-// 	{
-// 	  //Check the typedef's
-// 	  typename Graph::template NodeMap<int>::Value val;
-// 	  val=1;
-// 	  typename Graph::template NodeMap<int>::Key key;
-// 	  key = typename Graph::NodeIt(G);
-// 	}
-//       }  
-//       { //bool NodeMap
-// 	Node k;
-// 	typename Graph::template NodeMap<bool> m(G);
-// 	typename Graph::template NodeMap<bool> const &cm = m;  //Const map
-// 	//Inicialize with default value
-// 	typename Graph::template NodeMap<bool> mdef(G,12);
-// 	typename Graph::template NodeMap<bool> mm(cm);   //Copy
-// 	typename Graph::template NodeMap<int> dm(cm); //Copy from another type
-// 	bool v;
-// 	v=m[k]; m[k]=v; m.set(k,v);
-// 	v=cm[k];
-    
-// 	m=cm;  
-// 	dm=cm; //Copy from another type
-// 	m=dm; //Copy to another type
-
-// 	{
-// 	  //Check the typedef's
-// 	  typename Graph::template NodeMap<bool>::Value val;
-// 	  val=true;
-// 	  typename Graph::template NodeMap<bool>::Key key;
-// 	  key= typename Graph::NodeIt(G);
-// 	}
-//       }
-//       //EdgeMap tests
-//       {
-// 	Edge k;
-// 	typename Graph::template EdgeMap<int> m(G);
-// 	typename Graph::template EdgeMap<int> const &cm = m;  //Const map
-// 	//Inicialize with default value
-// 	typename Graph::template EdgeMap<int> mdef(G,12);
-// 	typename Graph::template EdgeMap<int> mm(cm);   //Copy
-// 	typename Graph::template EdgeMap<double> dm(cm);//Copy from another type
-// 	int v;
-// 	v=m[k]; m[k]=v; m.set(k,v);
-// 	v=cm[k];
-    
-// 	m=cm;  
-// 	dm=cm; //Copy from another type
-// 	{
-// 	  //Check the typedef's
-// 	  typename Graph::template EdgeMap<int>::Value val;
-// 	  val=1;
-// 	  typename Graph::template EdgeMap<int>::Key key;
-// 	  key= typename Graph::EdgeIt(G);
-// 	}
-//       }  
-//       { //bool EdgeMap
-// 	Edge k;
-// 	typename Graph::template EdgeMap<bool> m(G);
-// 	typename Graph::template EdgeMap<bool> const &cm = m;  //Const map
-// 	//Inicialize with default value
-// 	typename Graph::template EdgeMap<bool> mdef(G,12);
-// 	typename Graph::template EdgeMap<bool> mm(cm);   //Copy
-// 	typename Graph::template EdgeMap<int> dm(cm); //Copy from another type
-// 	bool v;
-// 	v=m[k]; m[k]=v; m.set(k,v);
-// 	v=cm[k];
-    
-// 	m=cm;  
-// 	dm=cm; //Copy from another type
-// 	m=dm; //Copy to another type
-// 	{
-// 	  //Check the typedef's
-// 	  typename Graph::template EdgeMap<bool>::Value val;
-// 	  val=true;
-// 	  typename Graph::template EdgeMap<bool>::Key key;
-// 	  key= typename Graph::EdgeIt(G);
-// 	}
-//       }
-//     }
-    
 //     /// An empty non-static graph class.
     
@@ -666,8 +402,8 @@
 //       ///Add a new edge to the graph.
 
-//       ///Add a new edge to the graph with source node \c t
-//       ///and target node \c h.
+//       ///Add a new edge to the graph with source node \c s
+//       ///and target node \c t.
 //       ///\return the new edge.
-//       Edge addEdge(Node h, Node t) { return INVALID; }
+//       Edge addEdge(Node s, Node t) { return INVALID; }
     
 //       /// Resets the graph.
@@ -678,28 +414,4 @@
 //       void clear() { }
 //     };
-
-    
-//     ///\brief Checks whether \c G meets the
-//     ///\ref lemon::concept::ExtendableGraph "ExtendableGraph" concept
-//     template<class Graph> void checkCompileExtendableGraph(Graph &G) 
-//     {
-//       checkCompileStaticGraph(G);
-
-//       typedef typename Graph::Node Node;
-//       typedef typename Graph::NodeIt NodeIt;
-//       typedef typename Graph::Edge Edge;
-//       typedef typename Graph::EdgeIt EdgeIt;
-//       typedef typename Graph::InEdgeIt InEdgeIt;
-//       typedef typename Graph::OutEdgeIt OutEdgeIt;
-  
-//       Node n,m;
-//       n=G.addNode();
-//       m=G.addNode();
-//       Edge e;
-//       e=G.addEdge(n,m); 
-  
-//       //  G.clear();
-//     }
-
 
 //     /// An empty erasable graph class.
@@ -726,41 +438,6 @@
 //       void erase(Edge e) { }
 //     };
-    
-//     template<class Graph> void checkCompileGraphEraseEdge(Graph &G) 
-//     {
-//       typename Graph::Edge e;
-//       G.erase(e);
-//     }
-
-//     template<class Graph> void checkCompileGraphEraseNode(Graph &G) 
-//     {
-//       typename Graph::Node n;
-//       G.erase(n);
-//     }
-
-//     ///\brief Checks whether \c G meets the
-//     ///\ref lemon::concept::EresableGraph "EresableGraph" concept
-//     template<class Graph> void checkCompileErasableGraph(Graph &G) 
-//     {
-//       checkCompileExtendableGraph(G);
-//       checkCompileGraphEraseNode(G);
-//       checkCompileGraphEraseEdge(G);
-//     }
-
-//     ///Checks whether a graph has findEdge() member function.
-    
-//     ///\todo findEdge() might be a global function.
-//     ///
-//     template<class Graph> void checkCompileGraphFindEdge(Graph &G) 
-//     {
-//       typedef typename Graph::NodeIt Node;
-//       typedef typename Graph::NodeIt NodeIt;
-
-//       G.findEdge(NodeIt(G),++NodeIt(G),G.findEdge(NodeIt(G),++NodeIt(G)));
-//       G.findEdge(Node(),Node(),G.findEdge(Node(),Node()));  
-//     }
-
-
-
+
+    
     /************* New GraphBase stuff **************/
 
@@ -816,8 +493,8 @@
 
       template<typename T>
-      class NodeMap : public GraphMap<Node, T, GraphBase> {};
+      class NodeMap : public GraphMap<GraphBase, Node, T> {};
 
       template<typename T>
-      class EdgeMap : public GraphMap<Edge, T, GraphBase> {};
+      class EdgeMap : public GraphMap<GraphBase, Node, T> {};
     };
 
@@ -834,12 +511,12 @@
       typedef BaseGraphComponent::Node Node;
       typedef BaseGraphComponent::Edge Edge;
-    };
-
-    template <typename Graph>
-    struct StaticGraphConcept {
-      void constraints() {
-	function_requires<IterableGraphComponentConcept<Graph> >();
-	function_requires<MappableGraphComponentConcept<Graph> >();
-      }
+
+      template <typename _Graph>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<IterableGraphComponent, _Graph>();
+	  checkConcept<MappableGraphComponent, _Graph>();
+	}
+      };
     };
 
@@ -850,13 +527,13 @@
       typedef BaseGraphComponent::Node Node;
       typedef BaseGraphComponent::Edge Edge;
-    };
-
-    template <typename Graph>
-    struct ExtendableGraphConcept {
-      void constraints() {
-	function_requires<StaticGraphConcept<Graph> >();
-	function_requires<ExtendableGraphComponentConcept<Graph> >();
-	function_requires<ClearableGraphComponentConcept<Graph> >();
-      }
+
+      template <typename _Graph>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<StaticGraph, _Graph >();
+	  checkConcept<ExtendableGraphComponent, _Graph >();
+	  checkConcept<ClearableGraphComponent, _Graph >();
+	}
+      };
     };
 
@@ -867,12 +544,12 @@
       typedef BaseGraphComponent::Node Node;
       typedef BaseGraphComponent::Edge Edge;
-    };
-
-    template <typename Graph>
-    struct ErasableGraphConcept {
-      void constraints() {
-	function_requires<ExtendableGraphConcept<Graph> >();
-	function_requires<ErasableGraphComponentConcept<Graph> >();
-      }
+
+      template <typename _Graph>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<ExtendableGraph, _Graph >();
+	  checkConcept<ErasableGraphComponent, _Graph >();
+	}
+      };
     };
 
Index: src/lemon/concept/graph_component.h
===================================================================
--- src/lemon/concept/graph_component.h	(revision 987)
+++ src/lemon/concept/graph_component.h	(revision 989)
@@ -38,87 +38,61 @@
     /// with character 'n' and for Edge with 'e'.
 
-    template<char Ch>
+    template<char _selector>
     class GraphItem {
     public:
+      /// Default constructor.
+      
+      /// @warning The default constructor sets the item
+      /// to an undefined value.
       GraphItem() {}
+      /// Copy constructor.
+      
+      /// Copy constructor.
+      ///
+      GraphItem(GraphItem const&) {}
+      /// Invalid constructor \& conversion.
+
+      /// This constructor initializes the item to be invalid.
+      /// \sa Invalid for more details.
       GraphItem(Invalid) {}
-
-      // We explicitely list these:
-      GraphItem(GraphItem const&) {}
+      /// Assign operator for nodes.
+
+      /// The nodes are assignable. 
+      ///
       GraphItem& operator=(GraphItem const&) { return *this; }
-
+      /// Equality operator.
+      
+      /// Two iterators are equal if and only if they represents the
+      /// same node in the graph or both are invalid.
       bool operator==(GraphItem) const { return false; }
+      /// Inequality operator.
+	
+      /// \sa operator==(const Node& n)
+      ///
       bool operator!=(GraphItem) const { return false; }
 
       // Technical requirement. Do we really need this?
-      bool operator<(GraphItem) const { return false; }
-    };
-
-
-    template<typename GI>
-    struct GraphItemConcept {
-      void constraints() {
-	GI i1;
-	GI i2 = i1;
-	GI i3 = INVALID;
-	
-	i1 = i2 = i3;
-
-	bool b;
-	b = (ia == ib) && (ia != ib) && (ia < ib);
-	b = (ia == INVALID) && (ib != INVALID);
-      }
-
-      const GI &ia;
-      const GI &ib;
-    };
-
-
-    template<typename Iter, typename Graph, typename BaseItem>
-    struct GraphIteratorConcept {
-      void constraints() {
-	function_requires< GraphItemConcept<Iter> >();
-	Iter it1(g);
-
-	/// \todo Do we need NodeIt(Node) kind of constructor?
-	//	Iter it2(bj);
-	Iter it2;
-
-	it2 = ++it1;
-	++it2 = it1;
-	++(++it1);
-	/// \bug This should be: is_base_and_derived<BaseItem, Iter>
-	BaseItem bi = it1;
-	bi = it2;
-      }
-
-      BaseItem bj;
-      Graph g;
-    };
-
-    template<typename Iter, typename Graph>
-    struct GraphIncIteratorConcept {
-      typedef typename Graph::Node Node;
-      typedef typename Graph::Edge Edge;
-      void constraints() {
-	function_requires< GraphItemConcept<Iter> >();
-	Iter it1(graph, node);
-	/// \todo Do we need OutEdgeIt(Edge) kind of constructor?
-	//	Iter it2(edge);
-	Iter it2;
-
-	it2 = ++it1;
-	++it2 = it1;
-	++(++it1);
-	Edge e = it1;
-	e = it2;
-      }
-
-      Edge edge;
-      Node node;
-      Graph graph;
-    };
-
-
+      //      bool operator<(GraphItem) const { return false; }
+
+
+      template<typename _GraphItem>
+      struct Constraints {
+	void constraints() {
+	  _GraphItem i1;
+	  _GraphItem i2 = i1;
+	  _GraphItem i3 = INVALID;
+	  
+	  i1 = i2 = i3;
+
+	  bool b;
+	  //	  b = (ia == ib) && (ia != ib) && (ia < ib);
+	  b = (ia == ib) && (ia != ib);
+	  b = (ia == INVALID) && (ib != INVALID);
+	}
+
+	const _GraphItem &ia;
+	const _GraphItem &ib;
+      };
+    };
 
     /// An empty base graph class.
@@ -140,53 +114,5 @@
       /// This class represents the Nodes of the graph. 
       ///
-      class Node {
-      public:
-
-	/// Default constructor.
-
-	/// @warning The default constructor sets the iterator
-	/// to an undefined value.
-
-	Node() {}
-	/// Copy constructor.
-
-	/// Copy constructor.
-	///
-	Node(const Node&) {}
-
-	/// Invalid constructor \& conversion.
-
-	/// This constructor initializes the iterator to be invalid.
-	/// \sa Invalid for more details.
-	Node(Invalid) {}
-
-
-	/// Assign operator for nodes.
-
-	/// The nodes are assignable. 
-	///
-	Node& operator=(const Node&) { return *this;}
-
-	/// Equality operator.
-
-	/// Two iterators are equal if and only if they represents the
-	/// same node in the graph or both are invalid.
-	bool operator==(const Node&) const { return true;}
-
-
-	/// Inequality operator.
-	
-	/// \sa operator==(const Node& n)
-	///
-	bool operator!=(const Node&) const { return true;}
-
- 	/// Comparison operator.
-
-	/// This is a strict ordering between the nodes.
-	///
-	/// This ordering can be different from the iterating order of nodes.
-	/// \todo Possibly we don't need it.
-	bool operator<(const Node&) const { return true;}
-      };
+      typedef GraphItem<'n'> Node;
 
       /// Edge class of the graph.
@@ -194,52 +120,5 @@
       /// This class represents the Edges of the graph. 
       ///
-      class Edge {
-      public:
-
-	/// Default constructor.
-
-	/// @warning The default constructor sets the iterator
-	/// to an undefined value.
-
-	Edge() {}
-	/// Copy constructor.
-
-	/// Copy constructor.
-	///
-	Edge(const Edge&) {}
-
-	/// Invalid constructor \& conversion.
-
-	/// This constructor initializes the iterator to be invalid.
-	/// \sa Invalid for more details.
-	Edge(Invalid) {}
-
-	/// Assign operator for edges.
-
-	/// The edges are assignable. 
-	///
-	Edge& operator=(const Edge&) { return *this;}
-
-	/// Equality operator.
-
-	/// Two iterators are equal if and only if they represents the
-	/// same edge in the graph or both are invalid.
-	bool operator==(const Edge&) const { return true;}
-
-
-	/// Inequality operator.
-	
-	/// \sa operator==(const Edge& n)
-	///
-	bool operator!=(const Edge&) const { return true;}
-
- 	/// Comparison operator.
-
-	/// This is a strict ordering between the edges.
-	///
-	/// This ordering can be different from the iterating order of edges.
-	/// \todo Possibly we don't need it.
-	bool operator<(const Edge&) const { return true;}
-      };
+      typedef GraphItem<'e'> Edge;
 
       ///Gives back the target node of an edge.
@@ -254,29 +133,24 @@
       ///
       Node source(const Edge&) const { return INVALID;}
-    };
-
-
-    /// Concept check structure for BaseGraph.
-
-    /// Concept check structure for BaseGraph.
-    ///
-
-    template <typename Graph>
-    struct BaseGraphComponentConcept {
-      typedef typename Graph::Node Node;
-      typedef typename Graph::Edge Edge;
-      
-      void constraints() {
-	function_requires< GraphItemConcept<Node> >();
-	function_requires< GraphItemConcept<Edge> >();
-	{
-	  Node n;
-	  Edge e;
-	  n = graph.source(e);
-	  n = graph.target(e);
-	}      
-      }
-      
-      const Graph& graph;
+
+
+      template <typename _Graph>
+      struct Constraints {
+	typedef typename _Graph::Node Node;
+	typedef typename _Graph::Edge Edge;
+      
+	void constraints() {
+	  checkConcept<GraphItem<'n'>, Node>();
+	  checkConcept<GraphItem<'e'>, Edge>();
+	  {
+	    Node n;
+	    Edge e;
+	    n = graph.source(e);
+	    n = graph.target(e);
+	  }      
+	}
+      
+	const _Graph& graph;
+      };
     };
 
@@ -341,37 +215,33 @@
       ///     
       void nextOut(Edge&) const {}
-    };
-
-
-    /// Concept check structure for IterableBaseGraph.
-
-    /// Concept check structure for IterableBaseGraph.
-    ///
-    template <typename Graph>
-    struct BaseIterableGraphComponentConcept {
-      
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	typename Graph::Node node;      
-	typename Graph::Edge edge;
-	{
-	  graph.first(node);
-	  graph.next(node);
-	}
-	{
-	  graph.first(edge);
-	  graph.next(edge);
-	}
-	{
-	  graph.firstIn(edge, node);
-	  graph.nextIn(edge);
-	}
-	{
-	  graph.firstOut(edge, node);
-	  graph.nextOut(edge);
-	}
-      }
-
-      const Graph& graph;
+
+
+      template <typename _Graph>
+      struct Constraints {
+      
+	void constraints() {
+	  checkConcept< BaseGraphComponent, _Graph >();
+	  typename _Graph::Node node;      
+	  typename _Graph::Edge edge;
+	  {
+	    graph.first(node);
+	    graph.next(node);
+	  }
+	  {
+	    graph.first(edge);
+	    graph.next(edge);
+	  }
+	  {
+	    graph.firstIn(edge, node);
+	    graph.nextIn(edge);
+	  }
+	  {
+	    graph.firstOut(edge, node);
+	    graph.nextOut(edge);
+	  }
+	}
+
+	const _Graph& graph;
+      };
     };
 
@@ -382,5 +252,4 @@
     /// The most of the base graphs should be conform to this concept.
     /// The id's are unique and immutable.
-
     class IDableGraphComponent : virtual public BaseGraphComponent {
     public:
@@ -400,25 +269,20 @@
       ///
       int id(const Edge&) const { return -1;}
-    };
-
-
-    /// Concept check structure for IdableBaseGraph.
-
-    /// Concept check structure for IdableBaseGraph.
-    ///
-    template <typename Graph>
-    struct IDableGraphComponentConcept {
-
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	typename Graph::Node node;
-	int nid = graph.id(node);
-	nid = graph.id(node);
-	typename Graph::Edge edge;
-	int eid = graph.id(edge);
-	eid = graph.id(edge);
-      }
-
-      const Graph& graph;
+
+      template <typename _Graph>
+      struct Constraints {
+
+	void constraints() {
+	  checkConcept< BaseGraphComponent, _Graph >();
+	  typename _Graph::Node node;
+	  int nid = graph.id(node);
+	  nid = graph.id(node);
+	  typename _Graph::Edge edge;
+	  int eid = graph.id(edge);
+	  eid = graph.id(edge);
+	}
+
+	const _Graph& graph;
+      };
     };
 
@@ -444,22 +308,18 @@
       ///
       int maxId(Edge = INVALID) const { return -1;}
-    };
-
-    /// Concept check structure for MaxIdableBaseGraph.
-
-    /// Concept check structure for MaxIdableBaseGraph.
-    ///
-    template <typename Graph>
-    struct MaxIDableGraphComponentConcept {
-
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	int nid = graph.maxId(typename Graph::Node());
-	ignore_unused_variable_warning(nid);
-	int eid = graph.maxId(typename Graph::Edge());
-	ignore_unused_variable_warning(eid);
-      }
-
-      const Graph& graph;
+
+      template <typename _Graph>
+      struct Constraints {
+
+	void constraints() {
+	  checkConcept<BaseGraphComponent, _Graph>();
+	  int nid = graph.maxId(typename _Graph::Node());
+	  ignore_unused_variable_warning(nid);
+	  int eid = graph.maxId(typename _Graph::Edge());
+	  ignore_unused_variable_warning(eid);
+	}
+      
+	const _Graph& graph;
+      };
     };
 
@@ -491,21 +351,16 @@
       }
 
-    };
-
-    /// Concept check structure for ExtendableBaseGraph.
-
-    /// Concept check structure for ExtendableBaseGraph.
-    ///
-    template <typename Graph>
-    struct BaseExtendableGraphComponentConcept {
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	typename Graph::Node node_a, node_b;
-	node_a = graph.addNode();
-	typename Graph::Edge edge;
-	edge = graph.addEdge(node_a, node_b);
-      }
-
-      Graph& graph;
+      template <typename _Graph>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<BaseGraphComponent, _Graph >();
+	  typename _Graph::Node node_a, node_b;
+	  node_a = graph.addNode();
+	  typename _Graph::Edge edge;
+	  edge = graph.addEdge(node_a, node_b);
+	}
+
+	_Graph& graph;
+      };
     };
 
@@ -533,21 +388,16 @@
       void erase(const Edge&) {}
 
-    };
-
-    /// Concept check structure for ErasableBaseGraph.
-
-    /// Concept check structure for ErasableBaseGraph.
-    ///
-    template <typename Graph>
-    struct BaseErasableGraphComponentConcept {
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	typename Graph::Node node;
-	graph.erase(node);
-	typename Graph::Edge edge;
-	graph.erase(edge);
-      }
-
-      Graph& graph;
+      template <typename _Graph>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<BaseGraphComponent, _Graph>();
+	  typename _Graph::Node node;
+	  graph.erase(node);
+	  typename _Graph::Edge edge;
+	  graph.erase(edge);
+	}
+
+	_Graph& graph;
+      };
     };
 
@@ -565,23 +415,170 @@
       ///
       void clear() {}    
-    };
-
-    /// Concept check function for ErasableBaseGraph.
-
-    /// Concept check function for ErasableBaseGraph.
+
+      template <typename _Graph>
+      struct Constraints {
+	void constraints() {
+	  checkConcept< BaseGraphComponent, _Graph>();
+	  graph.clear();
+	}
+
+	_Graph& graph;
+      };
+    };
+
+
+    /// Skeleton class for graph NodeIt and EdgeIt
+
+    /// Skeleton class for graph NodeIt and EdgeIt.
     ///
-    template <typename Graph>
-    struct BaseClearableGraphComponentConcept {
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	graph.clear();
-      }
-
-      Graph& graph;
-    };
-
-
-    class IterableGraphComponent :
-      virtual public BaseIterableGraphComponent {
+    template <typename _Graph, typename _Item>
+    class GraphIterator : public _Item {
+    public:
+      /// \todo Don't we need the Item type as typedef?
+
+      /// Default constructor.
+      
+      /// @warning The default constructor sets the iterator
+      /// to an undefined value.
+      GraphIterator() {}
+      /// Copy constructor.
+      
+      /// Copy constructor.
+      ///
+      GraphIterator(GraphIterator const&) {}
+      /// Sets the iterator to the first item.
+      
+      /// Sets the iterator to the first item of \c the graph.
+      ///
+      explicit GraphIterator(const _Graph&) {}
+      /// Invalid constructor \& conversion.
+
+      /// This constructor initializes the item to be invalid.
+      /// \sa Invalid for more details.
+      GraphIterator(Invalid) {}
+      /// Assign operator for items.
+
+      /// The items are assignable. 
+      ///
+      GraphIterator& operator=(GraphIterator const&) { return *this; }      
+      /// Next item.
+
+      /// Assign the iterator to the next item.
+      ///
+      GraphIterator& operator++() { return *this; }
+      //	Node operator*() const { return INVALID; }
+      /// Equality operator
+
+      /// Two iterators are equal if and only if they point to the
+      /// same object or both are invalid.
+      bool operator==(const GraphIterator&) const { return true;}
+      /// Inequality operator
+	
+      /// \sa operator==(Node n)
+      ///
+      bool operator!=(const GraphIterator&) const { return true;}
+      
+      template<typename _GraphIterator>
+      struct Constraints {
+	void constraints() {
+	  //	  checkConcept< Item, _GraphIterator >();
+	  _GraphIterator it1(g);
+	
+	  /// \todo Do we need NodeIt(Node) kind of constructor?
+	  //	_GraphIterator it2(bj);
+	  _GraphIterator it2;
+
+	  it2 = ++it1;
+	  ++it2 = it1;
+	  ++(++it1);
+	  /// \bug This should be: is_base_and_derived<BaseItem, _GraphIterator>
+	  _Item bi = it1;
+	  bi = it2;
+	}
+	_Graph& g;
+      };
+    };
+
+    /// Skeleton class for graph InEdgeIt and OutEdgeIt
+
+    /// \note Because InEdgeIt and OutEdgeIt may not inherit from the same
+    /// base class, the _selector is a additional template parameter. For 
+    /// InEdgeIt you should instantiate it with character 'i' and for 
+    /// OutEdgeIt with 'o'.
+    /// \todo check the name of the concept GraphIncEdgeIterator
+    template <typename _Graph, char _selector>
+    class GraphIncEdgeIterator : public _Graph::Edge {
+    public:
+      /// Default constructor.
+      
+      /// @warning The default constructor sets the iterator
+      /// to an undefined value.
+      GraphIncEdgeIterator() {}
+      /// Copy constructor.
+      
+      /// Copy constructor.
+      ///
+      GraphIncEdgeIterator(GraphIncEdgeIterator const&) {}
+      /// Sets the iterator to the first edge incoming into or outgoing from the node.
+      
+      /// Sets the iterator to the first edge incoming into or outgoing from the node.
+      ///
+      explicit GraphIncEdgeIterator(const _Graph&, const typename _Graph::Node&) {}
+      /// Invalid constructor \& conversion.
+
+      /// This constructor initializes the item to be invalid.
+      /// \sa Invalid for more details.
+      GraphIncEdgeIterator(Invalid) {}
+      /// Assign operator for nodes.
+
+      /// The nodes are assignable. 
+      ///
+      GraphIncEdgeIterator& operator=(GraphIncEdgeIterator const&) { return *this; }      
+      /// Next edge.
+
+      /// Assign the iterator to the next node.
+      ///
+      GraphIncEdgeIterator& operator++() { return *this; }
+      //	Node operator*() const { return INVALID; }
+      /// Equality operator
+
+      /// Two iterators are equal if and only if they point to the
+      /// same object or both are invalid.
+      bool operator==(const GraphIncEdgeIterator&) const { return true;}
+      /// Inequality operator
+	
+      /// \sa operator==(Node n)
+      ///
+      bool operator!=(const GraphIncEdgeIterator&) const { return true;}
+
+      template <typename _GraphIncEdgeIterator>
+      struct Constraints {
+	typedef typename _Graph::Node Node;
+	typedef typename _Graph::Edge Edge;
+	void constraints() {
+	  checkConcept<GraphItem<'e'>, _GraphIncEdgeIterator>();
+	  _GraphIncEdgeIterator it1(graph, node);
+	  /// \todo Do we need OutEdgeIt(Edge) kind of constructor?
+	  //	_GraphIncEdgeIterator it2(edge);
+	  _GraphIncEdgeIterator it2;
+
+	  it2 = ++it1;
+	  ++it2 = it1;
+	  ++(++it1);
+	  Edge e = it1;
+	  e = it2;
+	}
+
+	Edge& edge;
+	Node& node;
+	_Graph& graph;
+      };
+    };
+    /// An empty iterable base graph class.
+  
+    /// This class provides beside the core graph features
+    /// iterator based iterable interface for the graph structure.
+    /// This concept is part of the StaticGraphConcept.
+    class IterableGraphComponent : virtual public BaseGraphComponent {
 
     public:
@@ -592,82 +589,78 @@
       typedef BaseGraphComponent::Edge Edge;
 
-      class NodeIt : public Node {
-      public:
-	NodeIt() {}
-	NodeIt(Invalid) {}
-	// explicit NodeIt(Node) {}
-	explicit NodeIt(const Graph&) {}
-
-	NodeIt& operator++() { return *this; }
-	//	Node operator*() const { return INVALID; }
-
-	bool operator==(const NodeIt&) const { return true;}
-	bool operator!=(const NodeIt&) const { return true;}
-      };
-
-      class EdgeIt : public Edge {
-      public:
-	EdgeIt() {}
-	EdgeIt(Invalid) {}
-	// explicit EdgeIt(Edge) {}
-	explicit EdgeIt(const Graph&) {}
-
-	EdgeIt& operator++() { return *this; }
-	//	Edge operator*() const { return INVALID; }
-
-	bool operator==(const EdgeIt&) const { return true;}
-	bool operator!=(const EdgeIt&) const { return true;}
-      };
-
-      class InEdgeIt : public Edge {
-      public:
-	InEdgeIt() {}
-	InEdgeIt(Invalid) {}
-	// explicit InEdgeIt(Edge) {}
-	explicit InEdgeIt(const Graph&, const Node&) {}
-
-	InEdgeIt& operator++() { return *this; }
-	//	Edge operator*() const { return INVALID; }
-
-	bool operator==(const InEdgeIt&) const { return true;}
-	bool operator!=(const InEdgeIt&) const { return true;}
-      };
-
-      class OutEdgeIt : public Edge {
-      public:
-	OutEdgeIt() {}
-	OutEdgeIt(Invalid) {}
-	// explicit OutEdgeIt(Edge) {}
-	explicit OutEdgeIt(const Graph&, const Node&) {}
-
-	OutEdgeIt& operator++() { return *this; }
-	//	Edge operator*() const { return INVALID; }
-
-	bool operator==(const OutEdgeIt&) const { return true;}
-	bool operator!=(const OutEdgeIt&) const { return true;}
-      };
-
+      /// This iterator goes through each node.
+
+      /// This iterator goes through each node.
+      ///
+      typedef GraphIterator<Graph, Node> NodeIt;
+      /// This iterator goes through each node.
+
+      /// This iterator goes through each node.
+      ///
+      typedef GraphIterator<Graph, Edge> EdgeIt;
+      /// This iterator goes trough the incoming edges of a node.
+
+      /// This iterator goes trough the \e inccoming edges of a certain node
+      /// of a graph.
+      typedef GraphIncEdgeIterator<Graph, 'i'> InEdgeIt;
+      /// This iterator goes trough the outgoing edges of a node.
+
+      /// This iterator goes trough the \e outgoing edges of a certain node
+      /// of a graph.
+      typedef GraphIncEdgeIterator<Graph, 'o'> OutEdgeIt;
     };
     
-    template <typename Graph> 
-    struct IterableGraphComponentConcept {
+    template <typename _Graph> 
+    struct Constraints {
       void constraints() {
-  	function_requires< BaseIterableGraphComponentConcept<Graph> >();
-
-	typedef typename Graph::Node Node;
-	typedef typename Graph::NodeIt NodeIt;
-	typedef typename Graph::Edge Edge;
-	typedef typename Graph::EdgeIt EdgeIt;
-	typedef typename Graph::InEdgeIt InEdgeIt;
-	typedef typename Graph::OutEdgeIt OutEdgeIt;
+  	checkConcept< BaseGraphComponent, _Graph>();
+
+	checkConcept<GraphIterator<_Graph, typename _Graph::Edge>, typename _Graph::EdgeIt >();
+	checkConcept<GraphIterator<_Graph, typename _Graph::Node>, typename _Graph::NodeIt >();
+	checkConcept<GraphIncEdgeIterator<_Graph, 'i'>, typename _Graph::InEdgeIt >();
+	checkConcept<GraphIncEdgeIterator<_Graph, 'o'>, typename _Graph::OutEdgeIt >();
+      }
+    };
+
+
+    template <typename Graph, typename Item, typename _Value>
+    class GraphMap : public ReadWriteMap<Item, _Value> {
+    protected:      
+      GraphMap() {}
+    public:
+      explicit GraphMap(const Graph&) {}
+      GraphMap(const Graph&, const _Value&) {}
+      GraphMap(const GraphMap&) {}
+      
+      GraphMap& operator=(const GraphMap&) { return *this;}
+
+      template<typename _Map>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<ReadWriteMap<Item, _Value>, _Map >();
+	  // Construction with a graph parameter
+	  _Map a(g);
+	  // Constructor with a graph and a default value parameter
+	  _Map a2(g,t);
+	  // Copy constructor. Do we need it?
+	  _Map b=c;
+	  // Copy operator. Do we need it?
+	  a=b;
+
+	  ignore_unused_variable_warning(a2);
+	}
+
+	const _Map &c;
+	const Graph &g;
+	const typename GraphMap::Value &t;
+      };
+
+    };
+
+    /// An empty mappable base graph class.
   
-	function_requires< GraphIteratorConcept<NodeIt, Graph, Node> >();
-	function_requires< GraphIteratorConcept<EdgeIt, Graph, Edge> >();
-	function_requires< GraphIncIteratorConcept<OutEdgeIt, Graph> >();
-	function_requires< GraphIncIteratorConcept<InEdgeIt, Graph> >();
-      }
-    };
-
-
+    /// This class provides beside the core graph features
+    /// map interface for the graph structure.
+    /// This concept is part of the StaticGraphConcept.
     class MappableGraphComponent : virtual public BaseGraphComponent {
     public:
@@ -678,63 +671,76 @@
       typedef BaseGraphComponent::Edge Edge;
 
+      /// ReadWrite map of the nodes.
+    
+      /// ReadWrite map of the nodes.
+      ///
       template <typename _Value>
-      class NodeMap : public ReferenceMap<Node, _Value> {
+      class NodeMap : public GraphMap<Graph, Node, _Value> {
+      private:
+	NodeMap();
       public:
-	NodeMap(const Graph&) {}
+	// \todo call the right parent class constructor
+	explicit NodeMap(const Graph&) {}
 	NodeMap(const Graph&, const _Value&) {}
 	NodeMap(const NodeMap&) {}
 
 	NodeMap& operator=(const NodeMap&) { return *this;}
-	
-      };
-
+
+      };
+
+      /// ReadWrite map of the edges.
+    
+      /// ReadWrite map of the edges.
+      ///
       template <typename _Value>
-      class EdgeMap : public ReferenceMap<Edge, _Value> {
+      class EdgeMap : public GraphMap<Graph, Edge, _Value> {
+      private:
+	EdgeMap();
       public:
-	EdgeMap(const Graph&) {}
+	// \todo call the right parent class constructor
+	explicit EdgeMap(const Graph&) {}
 	EdgeMap(const Graph&, const _Value&) {}
 	EdgeMap(const EdgeMap&) {}
 
 	EdgeMap& operator=(const EdgeMap&) { return *this;}
-	
-      };
-
-    };
-
-    template <typename Graph>
-    struct MappableGraphComponentConcept {
-
-      struct Type {
-	int value;
-	Type() : value(0) {}
-	Type(int _v) : value(_v) {}
-      };
-
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	{ // int map test
-	  typedef typename Graph::template NodeMap<int> IntNodeMap;
-	  function_requires<GraphMapConcept<IntNodeMap,Graph> >();
-	} { // bool map test
-	  typedef typename Graph::template NodeMap<bool> BoolNodeMap;
-	  function_requires<GraphMapConcept<BoolNodeMap,Graph> >();
-	} { // Type map test
-	  typedef typename Graph::template NodeMap<Type> TypeNodeMap;
-	  function_requires<GraphMapConcept<TypeNodeMap,Graph> >();
-	} 
-
-	{ // int map test
-	  typedef typename Graph::template EdgeMap<int> IntEdgeMap;
-	  function_requires<GraphMapConcept<IntEdgeMap,Graph> >();
-	} { // bool map test
-	  typedef typename Graph::template EdgeMap<bool> BoolEdgeMap;
-	  function_requires<GraphMapConcept<BoolEdgeMap,Graph> >();
-	} { // Type map test
-	  typedef typename Graph::template EdgeMap<Type> TypeEdgeMap;
-	  function_requires<GraphMapConcept<TypeEdgeMap,Graph> >();
-	} 
-      }
-
-      Graph& graph;
+
+      };
+
+      template <typename _Graph>
+      struct Constraints {
+
+	struct Type {
+	  int value;
+	  Type() : value(0) {}
+	  Type(int _v) : value(_v) {}
+	};
+
+	void constraints() {
+	  checkConcept<BaseGraphComponent, _Graph>();
+	  { // int map test
+	    typedef typename _Graph::template NodeMap<int> IntNodeMap;
+	    checkConcept<GraphMap<_Graph, typename _Graph::Node, int>, IntNodeMap >();
+	  } { // bool map test
+	    typedef typename _Graph::template NodeMap<bool> BoolNodeMap;
+	    checkConcept<GraphMap<_Graph, typename _Graph::Node, bool>, BoolNodeMap >();
+	  } { // Type map test
+	    typedef typename _Graph::template NodeMap<Type> TypeNodeMap;
+	    checkConcept<GraphMap<_Graph, typename _Graph::Node, Type>, TypeNodeMap >();
+	  } 
+
+	  { // int map test
+	    typedef typename _Graph::template EdgeMap<int> IntEdgeMap;
+	    checkConcept<GraphMap<_Graph, typename _Graph::Edge, int>, IntEdgeMap >();
+	  } { // bool map test
+	    typedef typename _Graph::template EdgeMap<bool> BoolEdgeMap;
+	    checkConcept<GraphMap<_Graph, typename _Graph::Edge, bool>, BoolEdgeMap >();
+	  } { // Type map test
+	    typedef typename _Graph::template EdgeMap<Type> TypeEdgeMap;
+	    checkConcept<GraphMap<_Graph, typename _Graph::Edge, Type>, TypeEdgeMap >();
+	  } 
+	}
+
+	_Graph& graph;
+      };
     };
 
@@ -756,18 +762,16 @@
       }
 
-    };
-
-    template <typename Graph>
-    struct ExtendableGraphComponentConcept {
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	typename Graph::Node node_a, node_b;
-	node_a = graph.addNode();
-	typename Graph::Edge edge;
-	edge = graph.addEdge(node_a, node_b);      
-      }
-      Graph& graph;
-    };
-
+      template <typename _Graph>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<BaseGraphComponent, _Graph >();
+	  typename _Graph::Node node_a, node_b;
+	  node_a = graph.addNode();
+	  typename _Graph::Edge edge;
+	  edge = graph.addEdge(node_a, node_b);      
+	}
+	_Graph& graph;
+      };
+    };
     class ErasableGraphComponent : virtual public BaseGraphComponent {
     public:
@@ -781,17 +785,16 @@
       void erase(const Edge&) {}
 
-    };
-
-    template <typename Graph>
-    struct ErasableGraphComponentConcept {
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	typename Graph::Node node;
-	graph.erase(node);
-	typename Graph::Edge edge;
-	graph.erase(edge);      
-      }
-
-      Graph& graph;
+      template <typename _Graph>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<BaseGraphComponent, _Graph >();
+	  typename _Graph::Node node;
+	  graph.erase(node);
+	  typename _Graph::Edge edge;
+	  graph.erase(edge);      
+	}
+
+	_Graph& graph;
+      };
     };
 
@@ -806,13 +809,13 @@
       void clear() {}    
 
-    };
-
-    template <typename Graph>
-    struct ClearableGraphComponentConcept {
-      void constraints() {
-	function_requires< BaseGraphComponentConcept<Graph> >();
-	graph.clear();
-      }
-      Graph& graph;
+
+      template <typename _Graph>
+      struct ClearableGraphComponentConcept {
+	void constraints() {
+	  checkConcept< BaseGraphComponent, _Graph >();
+	  graph.clear();
+	}
+	_Graph& graph;
+      };
     };
 
Index: src/lemon/concept/maps.h
===================================================================
--- src/lemon/concept/maps.h	(revision 987)
+++ src/lemon/concept/maps.h	(revision 989)
@@ -41,9 +41,26 @@
       typedef T Value;
 
+      // \bug Value don't need to be default constructible.
       /// Returns the value associated with a key.
-      Value operator[](const Key &k) const {return Value();}
+      Value operator[](const Key &) const {return Value();}
 
-      ///Default constructor
-      ReadMap() {}
+      template<typename _ReadMap>
+      struct Constraints {
+
+	void constraints() {
+	  Value val = m[key];
+	  val = m[key];
+	  typename _ReadMap::Value own_val = m[own_key]; 
+	  own_val = m[own_key]; 
+
+	  ignore_unused_variable_warning(val);
+	  ignore_unused_variable_warning(own_val);
+	  ignore_unused_variable_warning(key);
+	}
+	Key& key;
+	typename _ReadMap::Key& own_key;
+	_ReadMap& m;
+      };
+      
     };
 
@@ -64,4 +81,24 @@
       ///Default constructor
       WriteMap() {}
+
+      template <typename _WriteMap>
+      struct Constraints {
+	void constraints() {
+	  // No constraints for constructor.
+	  m.set(key, val);
+	  m.set(own_key, own_val);
+	  ignore_unused_variable(key);
+	  ignore_unused_variable(val);
+	  ignore_unused_variable(own_key);
+	  ignore_unused_variable(own_val);
+	}
+
+	Value& val;
+	typename _WriteMap::Value own_val;
+	Key& key;
+	typename _WriteMap::Key& own_key;
+	WriteMap& m;
+
+      };
     };
 
@@ -82,11 +119,16 @@
       void set(const Key &k,const Value &t) {}
 
-      ///Default constructor
-      ReadWriteMap() {}
+      template<typename _ReadWriteMap>
+      struct Constraints {
+	void constraints() {
+	  checkConcept<ReadMap<K, T>, _ReadWriteMap >();
+	  checkConcept<ReadMap<K, T>, _ReadWriteMap >();
+	}
+      };
     };
   
   
     ///Dereferable map concept
-    template<typename K, typename T>
+    template<typename K, typename T, typename R, typename CR>
     class ReferenceMap : public ReadWriteMap<K,T>
     {
@@ -96,11 +138,12 @@
       /// Map's value type. (The type of objects associated with the keys).
       typedef T Value;
+      /// Map's reference type.
+      typedef R Reference;
+      /// Map's const reference type.
+      typedef CR ConstReference;
 
     protected:
       Value tmp;
     public:
-      typedef Value& Reference;
-      /// Map's const reference type.
-      typedef const Value& ConstReference;
 
       ///Returns a reference to the value associated to a key.
@@ -112,131 +155,29 @@
       void set(const Key &k,const Value &t) { operator[](k)=t; }
 
-      ///Default constructor
-      ReferenceMap() {}
+      // \todo rethink this concept
+      template<typename _ReferenceMap>
+      struct ReferenceMapConcept {
+
+	void constraints() {
+	  checkConcept<ReadWriteMap, _ReferenceMap >();
+	  m[key] = val;
+	  val  = m[key];
+	  m[key] = ref;
+	  ref = m[key];
+	  m[own_key] = own_val;
+	  own_val  = m[own_key];
+	  m[own_key] = own_ref;
+	  own_ref = m[own_key];	  	  
+	}
+
+	typename _ReferenceMap::Key& own_key;
+	typename _ReferenceMap::Value& own_val;
+	typename _ReferenceMap::Reference& own_ref;
+	Key& key;
+	Value& val;
+	Reference& ref;
+	ReferenceMap& m;
+      };
     };
-
-
-    template<typename Item, typename T, typename Graph>
-    class GraphMap : public ReadWriteMap<Item, T> {
-      // I really, really don't like the idea that every graph should have
-      // reference maps! --klao
-
-    private:
-      // We state explicitly that graph maps have no default constructor?
-      GraphMap();
-
-    public:
-      explicit GraphMap(Graph const&) {}
-      // value for initializing
-      GraphMap(Graph const&, T) {}
-
-      // this probably should be required:
-      GraphMap(GraphMap const&) {}
-      GraphMap& operator=(GraphMap const&) { return *this; }
-
-      // but this is a absolute no-op! We should provide a more generic
-      // graph-map-copy operation.
-      //
-      // template<typename TT>
-      // GraphMap(GraphMap<TT> const&);
-      //
-      // template<typename TT>
-      // GraphMap& operator=(const GraphMap<TT>&);
-    };
-
-
-    /****************  Concept-checking classes  ****************/
-
-    template<typename ReadMap>
-    struct ReadMapConcept {
-      typedef typename ReadMap::Key Key;
-      typedef typename ReadMap::Value Value;
-
-      void constraints() {
-	// No constraints for constructor.
-
-	// What are the requirement for the Value?
-	// CopyConstructible? Assignable? None of these?
-	Value v = m[k];
-	v = m[k];
-
-	// FIXME:
-	ignore_unused_variable_warning(v);
-      }
-
-      ReadMap m;
-      Key k;
-    };
-
-    template<typename WriteMap>
-    struct WriteMapConcept {
-      typedef typename WriteMap::Key Key;
-      typedef typename WriteMap::Value Value;
-
-      void constraints() {
-	// No constraints for constructor.
-
-	m.set(k, v);
-      }
-
-      WriteMap m;
-      Key k;
-      Value v;
-    };
-
-    template<typename ReadWriteMap>
-    struct ReadWriteMapConcept {
-      void constraints() {
-	function_requires< ReadMapConcept<ReadWriteMap> >();
-	function_requires< WriteMapConcept<ReadWriteMap> >();
-      }
-    };
-
-    template<typename ReferenceMap>
-    struct ReferenceMapConcept {
-      typedef typename ReferenceMap::Key Key;
-      typedef typename ReferenceMap::Value Value;
-      typedef typename ReferenceMap::Reference Reference;
-
-      // What for is this?
-      typedef typename ReferenceMap::ConstReference ConstReference;
-
-      void constraints() {
-	function_requires< ReadWriteMapConcept<ReferenceMap> >();
-
-	m[k] = v;
-	// Or should we require real reference?
-	// Like this:
-	// Value &vv = m[k];
-	// ignore_unused_variable_warning(vv);
-      }
-
-      ReferenceMap m;
-      Key k;
-      Value v;
-    };
-
-    /// \todo GraphMapConceptCheck
-
-    template<typename GraphMap, typename Graph>
-    struct GraphMapConcept {
-      void constraints() {
-	function_requires< ReadWriteMapConcept<GraphMap> >();
-	// Construction with a graph parameter
-	GraphMap a(g);
-	// Ctor with a graph and a default value parameter
-	GraphMap a2(g,t);
-	// Copy ctor. Do we need it?
-	GraphMap b=c;
-	// Copy operator. Do we need it?
-	a=b;
-
-	ignore_unused_variable_warning(a2);
-      }
-      const GraphMap &c;
-      const Graph &g;
-      const typename GraphMap::Value &t;
-    };
-    
 
     // @}
Index: src/lemon/concept/undir_graph.h
===================================================================
--- src/lemon/concept/undir_graph.h	(revision 986)
+++ src/lemon/concept/undir_graph.h	(revision 989)
@@ -39,7 +39,8 @@
       typedef typename Graph::Edge Edge;
       typedef typename Graph::Node Node;
+
       void constraints() {
-	function_requires< BaseIterableGraphComponentConcept<Graph> >();
-	function_requires< GraphItemConcept<UndirEdge> >();
+	checkConcept<BaseIterableGraphComponent, Graph>();
+	checkConcept<GraphItem<'u'>, UndirEdge >();
 
 	/// \bug this should be base_and_derived:
@@ -61,12 +62,12 @@
     struct IterableUndirGraphConcept {
       void constraints() {
-	function_requires< BaseIterableUndirGraphConcept<Graph> > ();
-	function_requires< IterableGraphComponentConcept<Graph> > ();
+	/// \todo we don't need the iterable component should base iterable	
+	//	checkConcept< BaseIterableUndirGraph, Graph > ();
+	checkConcept< IterableGraphComponent, Graph > ();
 
 	typedef typename Graph::UndirEdge UndirEdge;
 	typedef typename Graph::UndirEdgeIt UndirEdgeIt;
 
-	function_requires<
-	  GraphIteratorConcept<UndirEdgeIt, Graph, UndirEdge> >();
+	checkConcept< GraphIterator<Graph, UndirEdge>, UndirEdgeIt >();
       }
     };
