Index: src/hugo/array_map.h
===================================================================
--- src/hugo/array_map.h	(revision 844)
+++ src/hugo/array_map.h	(revision 891)
@@ -66,5 +66,5 @@
     /** Default constructor for the map.
      */
-    ArrayMap() : values(0), capacity(0) {}
+    ArrayMap() : capacity(0), values(0) {}
 			
     /** Graph and Registry initialized map constructor.
@@ -91,5 +91,5 @@
     /** Constructor to copy a map of the same map type.
      */
-    ArrayMap(const ArrayMap& copy) : MapBase(*copy.graph, *copy.registry) {
+    ArrayMap(const ArrayMap& copy) : MapBase(copy) {
       capacity = copy.capacity;
       if (capacity == 0) return;
@@ -103,11 +103,13 @@
     /** Constructor to copy a map of an other map type.
      */
-    template <typename CMap> ArrayMap(const CMap& copy) 
-      : MapBase(copy), capacity(0), values(0) {
-      if (MapBase::getGraph()) {
-	allocate_memory();
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  set(it, copy[it]);
-	}
+    template <typename TT>
+    ArrayMap(const ArrayMap<MapRegistry, TT>& copy) 
+      : MapBase(copy) {
+      capacity = copy.capacity;
+      if (capacity == 0) return;
+      values = allocator.allocate(capacity);
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
+	allocator.construct(&(values[id]), copy.values[id]);
       }
     }
@@ -117,32 +119,44 @@
     ArrayMap& operator=(const ArrayMap& copy) {
       if (&copy == this) return *this;
+
       if (capacity != 0) {
 	MapBase::destroy();
 	allocator.deallocate(values, capacity);
       }
+
+      MapBase::operator=(copy);
+
       capacity = copy.capacity;
       if (capacity == 0) return *this;
       values = allocator.allocate(capacity);
+
       for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
 	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
 	allocator.construct(&(values[id]), copy.values[id]);
       }
+
       return *this;
     }
 
-    /** Assign operator to copy a map an other map type.
-     */
-    template <typename CMap> ArrayMap& operator=(const CMap& copy) {
+    /** Assign operator to copy a map of an other map type.
+     */
+    template <typename TT>
+    ArrayMap& operator=(const ArrayMap<MapRegistry, TT>& copy) {
       if (capacity != 0) {
 	MapBase::destroy();
 	allocator.deallocate(values, capacity);
       }
+
       MapBase::operator=(copy);
-      if (MapBase::getGraph()) {
-	allocate_memory();
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  set(it, copy[it]);
-	}
-      }
+
+      capacity = copy.capacity;
+      if (capacity == 0) return *this;
+      values = allocator.allocate(capacity);
+
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
+	allocator.construct(&(values[id]), copy.values[id]);
+      }
+
       return *this;
     }
Index: src/hugo/default_map.h
===================================================================
--- src/hugo/default_map.h	(revision 822)
+++ src/hugo/default_map.h	(revision 891)
@@ -30,34 +30,46 @@
    */
 #define DEFAULT_MAP_BODY(DynMap, Value) \
-  { \
-    typedef DynMap<MapRegistry, Value> MapImpl; \
-  \
-  public: \
-  \
-    typedef typename MapRegistry::Graph Graph; \
-  \
-    DefaultMap() : MapImpl() {} \
-  \
-    DefaultMap(const Graph& g, MapRegistry& r) : MapImpl(g, r) {} \
-  \
-    DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
-      : MapImpl(g, r, v) {} \
-  \
-    DefaultMap(const DefaultMap& copy) \
-      : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-  \
-    template <typename CMap> DefaultMap(const CMap& copy) : MapImpl(copy) {} \
-  \
-    DefaultMap& operator=(const DefaultMap& copy) { \
-      MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-      return *this; \
+{ \
+\
+public: \
+\
+typedef DynMap<MapRegistry, Value> Parent; \
+\
+typedef typename MapRegistry::Graph Graph; \
+\
+DefaultMap() : Parent() {} \
+DefaultMap(const Graph& g, MapRegistry& r) : Parent(g, r) {} \
+DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
+  : Parent(g, r, v) {} \
+DefaultMap(const DefaultMap& copy) \
+  : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+DefaultMap(const DefaultMap<MapRegistry, TT>& copy) { \
+  Parent::MapBase::operator= \
+    (static_cast<const typename Parent::MapBase&>(copy)); \
+  if (Parent::getGraph()) { \
+    for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
+      Parent::add(it); \
+      Parent::operator[](it) = copy[it]; \
     } \
-  \
-    template <typename CMap> DefaultMap& operator=(const CMap& copy) { \
-      MapImpl::operator=(copy); \
-      return *this; \
+  } \
+} \
+DefaultMap& operator=(const DefaultMap& copy) { \
+  Parent::operator=(static_cast<const Parent&>(copy)); \
+  return *this; \
+} \
+template <typename TT> \
+DefaultMap& operator=(const DefaultMap<MapRegistry, TT>& copy) { \
+  Parent::clear(); \
+  Parent::MapBase::operator=(copy); \
+  if (Parent::getGraph()) { \
+    for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
+      Parent::add(it); \
+      Parent::operator[](it) = copy[it]; \
     } \
-  \
-  };
+  } \
+  return *this; \
+} \
+};
 
 
Index: src/hugo/graph_wrapper.h
===================================================================
--- src/hugo/graph_wrapper.h	(revision 888)
+++ src/hugo/graph_wrapper.h	(revision 891)
@@ -287,5 +287,5 @@
       return GraphWrapper<Graph>::tail(e); }
 
-    KEEP_MAPS(Parent, RevGraphWrapper);
+    //    KEEP_MAPS(Parent, RevGraphWrapper);
 
   };
@@ -494,5 +494,5 @@
     }
 
-    KEEP_MAPS(Parent, SubGraphWrapper);
+    //    KEEP_MAPS(Parent, SubGraphWrapper);
   };
 
@@ -559,5 +559,5 @@
 	return this->graph->tail(e); }
 
-    KEEP_MAPS(Parent, UndirGraphWrapper);
+    //    KEEP_MAPS(Parent, UndirGraphWrapper);
 
   };
@@ -566,5 +566,5 @@
   ///
   ///\warning Graph wrappers are in even more experimental state than the other
-  ///parts of the lib. Use them at you own risk.
+  ///parts of the lib. Use them at your own risk.
   ///
   /// An undirected graph template.
@@ -582,5 +582,5 @@
     }
 
-    KEEP_MAPS(Parent, UndirGraph);
+    //    KEEP_MAPS(Parent, UndirGraph);
   };
 
@@ -895,14 +895,29 @@
     /// one for the backward edges.
     class EdgeMap {
+      template <typename TT> friend class EdgeMap;
       typename Graph::template EdgeMap<T> forward_map, backward_map; 
     public:
       typedef T ValueType;
       typedef Edge KeyType;
+
       EdgeMap(const SubBidirGraphWrapper<Graph, 
 	      ForwardFilterMap, BackwardFilterMap>& g) : 
 	forward_map(*(g.graph)), backward_map(*(g.graph)) { }
+
       EdgeMap(const SubBidirGraphWrapper<Graph, 
 	      ForwardFilterMap, BackwardFilterMap>& g, T a) : 
 	forward_map(*(g.graph), a), backward_map(*(g.graph), a) { }
+
+      template <typename TT>
+      EdgeMap(const EdgeMap<TT>& copy) 
+	: forward_map(copy.forward_map), backward_map(copy.backward_map) {}
+
+      template <typename TT>
+      EdgeMap& operator=(const EdgeMap<TT>& copy) {
+	forward_map = copy.forward_map;
+	backward_map = copy.backward_map;
+	return *this;
+      }
+      
       void set(Edge e, T a) { 
 	if (!e.backward) 
@@ -911,5 +926,7 @@
 	  backward_map.set(e, a); 
       }
-      T operator[](Edge e) const { 
+
+      typename Graph::template EdgeMap<T>::ConstReferenceType 
+      operator[](Edge e) const { 
 	if (!e.backward) 
 	  return forward_map[e]; 
@@ -917,4 +934,13 @@
 	  return backward_map[e]; 
       }
+
+      typename Graph::template EdgeMap<T>::ReferenceType 
+      operator[](Edge e) { 
+	if (!e.backward) 
+	  return forward_map[e]; 
+	else 
+	  return backward_map[e]; 
+      }
+
       void update() { 
 	forward_map.update(); 
@@ -924,5 +950,5 @@
 
 
-    KEEP_NODE_MAP(Parent, SubBidirGraphWrapper);
+    //    KEEP_NODE_MAP(Parent, SubBidirGraphWrapper);
 
   };
@@ -966,5 +992,5 @@
       return 2*this->graph->edgeNum();
     }
-    KEEP_MAPS(Parent, BidirGraphWrapper);
+    //    KEEP_MAPS(Parent, BidirGraphWrapper);
   };
 
@@ -992,5 +1018,5 @@
       Parent::setGraph(gr); 
     }
-    KEEP_MAPS(Parent, BidirGraph);
+    //    KEEP_MAPS(Parent, BidirGraph);
   };
 
@@ -1107,5 +1133,5 @@
     };
 
-    KEEP_MAPS(Parent, ResGraphWrapper);
+    //    KEEP_MAPS(Parent, ResGraphWrapper);
   };
 
@@ -1169,5 +1195,5 @@
     }
 
-    KEEP_MAPS(Parent, ErasingFirstGraphWrapper);
+    //    KEEP_MAPS(Parent, ErasingFirstGraphWrapper);
   };
 
Index: src/hugo/list_graph.h
===================================================================
--- src/hugo/list_graph.h	(revision 880)
+++ src/hugo/list_graph.h	(revision 891)
@@ -443,7 +443,4 @@
     typedef SymListGraph Graph;
 
-    /// Importing maps from the base class ListGraph.
-    KEEP_MAPS(ListGraph, SymListGraph);
-
     /// Creating symmetric map registry.
     CREATE_SYM_EDGE_MAP_REGISTRY;
Index: src/hugo/map_defines.h
===================================================================
--- src/hugo/map_defines.h	(revision 877)
+++ src/hugo/map_defines.h	(revision 891)
@@ -39,19 +39,22 @@
 template <typename Value> \
 class NodeMap : public DynMap<NodeMapRegistry, Value> { \
-typedef DynMap<NodeMapRegistry, Value> MapImpl; \
-public: \
+public: \
+typedef DynMap<NodeMapRegistry, Value> Parent; \
 NodeMap() {} \
-NodeMap(const typename MapImpl::Graph& g) \
-  : MapImpl(g, g.node_maps) {} \
-NodeMap(const typename MapImpl::Graph& g, const Value& v) \
-  : MapImpl(g, g.node_maps, v) {} \
-NodeMap(const NodeMap& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-template <typename CMap> NodeMap(const CMap& copy) : MapImpl(copy) {} \
+NodeMap(const typename Parent::Graph& g) \
+  : Parent(g, g.node_maps) {} \
+NodeMap(const typename Parent::Graph& g, const Value& v) \
+  : Parent(g, g.node_maps, v) {} \
+NodeMap(const NodeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+NodeMap(const NodeMap<TT>& copy) \
+  : Parent(static_cast<const typename NodeMap<TT>::Parent&>(copy)) {} \
 NodeMap& operator=(const NodeMap& copy) { \
-  MapImpl::operator=(static_cast<const MapImpl&>(copy));\
-  return *this; \
-} \
-template <typename CMap> NodeMap& operator=(const CMap& copy) { \
-  MapImpl::operator=(copy);\
+  Parent::operator=(static_cast<const Parent&>(copy));\
+  return *this; \
+} \
+template <typename TT> \
+NodeMap& operator=(const NodeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename NodeMap<TT>::Parent&>(copy));\
   return *this; \
 } \
@@ -67,19 +70,23 @@
 template <typename Value> \
 class EdgeMap : public DynMap<EdgeMapRegistry, Value> { \
-typedef DynMap<EdgeMapRegistry, Value> MapImpl; \
-public: \
+public: \
+typedef DynMap<EdgeMapRegistry, Value> Parent; \
+\
 EdgeMap() {} \
-EdgeMap(const typename MapImpl::Graph& g) \
-  : MapImpl(g, g.edge_maps) {} \
-EdgeMap(const typename MapImpl::Graph& g, const Value& v) \
-  : MapImpl(g, g.edge_maps, v) {} \
-EdgeMap(const EdgeMap& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-template <typename CMap> EdgeMap(const CMap& copy) : MapImpl(copy) {} \
+EdgeMap(const typename Parent::Graph& g) \
+  : Parent(g, g.edge_maps) {} \
+EdgeMap(const typename Parent::Graph& g, const Value& v) \
+  : Parent(g, g.edge_maps, v) {} \
+EdgeMap(const EdgeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+EdgeMap(const EdgeMap<TT>& copy) \
+  : Parent(static_cast<const typename EdgeMap<TT>::Parent&>(copy)) {} \
 EdgeMap& operator=(const EdgeMap& copy) { \
-  MapImpl::operator=(static_cast<const MapImpl&>(copy));\
-  return *this; \
-} \
-template <typename CMap> EdgeMap& operator=(const CMap& copy) { \
-  MapImpl::operator=(copy);\
+  Parent::operator=(static_cast<const Parent&>(copy));\
+  return *this; \
+} \
+template <typename TT> \
+EdgeMap& operator=(const EdgeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename EdgeMap<TT>::Parent&>(copy));\
   return *this; \
 } \
@@ -109,30 +116,27 @@
 template <typename Value> \
 class SymEdgeMap : public SymMap<DynMap, SymEdgeMapRegistry, Value> { \
-  typedef SymMap<DynMap, SymEdgeMapRegistry, Value> MapImpl; \
- public: \
-\
-  SymEdgeMap() {} \
-\
-  SymEdgeMap(const typename MapImpl::Graph& g) \
-    : MapImpl(g, g.sym_edge_maps) {} \
-\
-  SymEdgeMap(const typename MapImpl::Graph& g, const Value& v) \
-    : MapImpl(g, g.sym_edge_maps, v) {} \
-\
-  SymEdgeMap(const SymEdgeMap& copy) \
-    : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-\
-  template <typename CMap> SymEdgeMap(const CMap& copy) : MapImpl(copy) {} \
-  SymEdgeMap& operator=(const SymEdgeMap& copy) { \
-    MapImpl::operator=(static_cast<const MapImpl&>(copy));\
-    return *this; \
-  } \
-\
-  template <typename CMap> SymEdgeMap& operator=(const CMap& copy) { \
-    MapImpl::operator=(copy);\
-    return *this; \
-  } \
-};
-
+public: \
+typedef SymMap<DynMap, SymEdgeMapRegistry, Value> Parent; \
+\
+SymEdgeMap() {} \
+SymEdgeMap(const typename Parent::Graph& g) \
+  : Parent(g, g.sym_edge_maps) {} \
+SymEdgeMap(const typename Parent::Graph& g, const Value& v) \
+  : Parent(g, g.sym_edge_maps, v) {} \
+SymEdgeMap(const SymEdgeMap& copy) \
+  : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+SymEdgeMap(const NodeMap<TT>& copy) \
+  : Parent(static_cast<const typename SymEdgeMap<TT>::Parent&>(copy)) {} \
+SymEdgeMap& operator=(const SymEdgeMap& copy) { \
+  Parent::operator=(static_cast<const Parent&>(copy));\
+  return *this; \
+} \
+template <typename TT> \
+SymEdgeMap& operator=(const SymEdgeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename SymEdgeMap<TT>::Parent&>(copy));\
+  return *this; \
+} \
+};
 
 /** This is a macro to import an node map into a graph class.
@@ -140,33 +144,28 @@
 #define IMPORT_NODE_MAP(From, from, To, to) \
 template <typename Value> \
-class NodeMap \
-  : public From::template NodeMap<Value> { \
-  typedef typename From::template NodeMap<Value> MapImpl; \
- public: \
-   NodeMap() : MapImpl() {} \
-\
-   NodeMap(const To& to) \
-     : MapImpl(static_cast<const From&>(from)) { } \
-\
-   NodeMap(const To& to, const Value& value) \
-     : MapImpl(static_cast<const From&>(from), value) { } \
-\
-   NodeMap(const NodeMap& copy) \
-     : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-\
-   template<typename CMap> \
-   NodeMap(const CMap& copy) \
-     : MapImpl(copy) {} \
-\
-   NodeMap& operator=(const NodeMap& copy) { \
-     MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-     return *this; \
-   } \
-\
-   template <typename CMap> \
-   NodeMap& operator=(const CMap& copy) { \
-     MapImpl::operator=(copy); \
-     return *this; \
-   } \
+class NodeMap : public From::template NodeMap<Value> { \
+\
+public: \
+typedef typename From::template NodeMap<Value> Parent; \
+\
+NodeMap() : Parent() {} \
+NodeMap(const To& to) \
+  : Parent(static_cast<const From&>(from)) { } \
+NodeMap(const To& to, const Value& value) \
+  : Parent(static_cast<const From&>(from), value) { } \
+NodeMap(const NodeMap& copy) \
+  : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+NodeMap(const NodeMap<TT>& copy) \
+  : Parent(static_cast<const typename NodeMap<TT>::Parent&>(copy)) {} \
+NodeMap& operator=(const NodeMap& copy) { \
+  Parent::operator=(static_cast<const Parent&>(copy)); \
+  return *this; \
+} \
+template <typename TT> \
+NodeMap& operator=(const NodeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename NodeMap<TT>::Parent&>(copy));\
+  return *this; \
+} \
 };
 
@@ -175,33 +174,28 @@
 #define IMPORT_EDGE_MAP(From, from, To, to) \
 template <typename Value> \
-class EdgeMap \
-  : public From::template EdgeMap<Value> { \
-  typedef typename From::template EdgeMap<Value> MapImpl; \
- public: \
-   EdgeMap() : MapImpl() {} \
-\
-   EdgeMap(const To& to) \
-     : MapImpl(static_cast<const From&>(from)) { } \
-\
-   EdgeMap(const To& to, const Value& value) \
-     : MapImpl(static_cast<const From&>(from), value) { } \
-\
-   EdgeMap(const EdgeMap& copy) \
-     : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-\
-   template<typename CMap> \
-   EdgeMap(const CMap& copy) \
-     : MapImpl(copy) {} \
-\
-   EdgeMap& operator=(const EdgeMap& copy) { \
-     MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-     return *this; \
-   } \
-\
-   template <typename CMap> \
-   EdgeMap& operator=(const CMap& copy) { \
-     MapImpl::operator=(copy); \
-     return *this; \
-   } \
+class EdgeMap : public From::template EdgeMap<Value> { \
+\
+public: \
+typedef typename From::template EdgeMap<Value> Parent; \
+\
+EdgeMap() : Parent() {} \
+EdgeMap(const To& to) \
+  : Parent(static_cast<const From&>(from)) { } \
+EdgeMap(const To& to, const Value& value) \
+  : Parent(static_cast<const From&>(from), value) { } \
+EdgeMap(const EdgeMap& copy) \
+  : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+EdgeMap(const EdgeMap<TT>& copy) \
+  : Parent(static_cast<const typename EdgeMap<TT>::Parent&>(copy)) {} \
+EdgeMap& operator=(const EdgeMap& copy) { \
+  Parent::operator=(static_cast<const Parent&>(copy)); \
+  return *this; \
+} \
+template <typename TT> \
+EdgeMap& operator=(const EdgeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename EdgeMap<TT>::Parent&>(copy));\
+  return *this; \
+} \
 };
 
Index: src/hugo/map_registry.h
===================================================================
--- src/hugo/map_registry.h	(revision 822)
+++ src/hugo/map_registry.h	(revision 891)
@@ -71,5 +71,4 @@
        * Assign operator.
       */	
-
       const MapBase& operator=(const MapBase& copy) {
 	if (registry) {
Index: src/hugo/smart_graph.h
===================================================================
--- src/hugo/smart_graph.h	(revision 880)
+++ src/hugo/smart_graph.h	(revision 891)
@@ -318,7 +318,4 @@
     typedef SymSmartGraph Graph;
 
-    /// Importing maps from the base class ListGraph.
-    KEEP_MAPS(SmartGraph, SymSmartGraph);
-
     /// Creating symmetric map registry.
     CREATE_SYM_EDGE_MAP_REGISTRY;
Index: src/hugo/sym_map.h
===================================================================
--- src/hugo/sym_map.h	(revision 844)
+++ src/hugo/sym_map.h	(revision 891)
@@ -104,9 +104,4 @@
       : MapImpl(static_cast<const MapImpl&>(copy)) {}
 
-    /** Constructor to copy a map of an other map type.
-     */
-    template <typename CMap> SymMap(const CMap& copy) 
-      : MapImpl(copy) {}
-
     /** Assign operator to copy a map of the same map type.
      */
@@ -116,11 +111,4 @@
     }
 
-    /** Assign operator to copy a map of an other map type.
-     */
-    template <typename CMap> SymMap& operator=(const CMap& copy) {
-      MapImpl::operator=(copy);
-      return *this;
-    }
-   
     /** Add a new key to the map. It called by the map registry.
      */
Index: src/hugo/vector_map.h
===================================================================
--- src/hugo/vector_map.h	(revision 844)
+++ src/hugo/vector_map.h	(revision 891)
@@ -33,4 +33,5 @@
   template <typename MapRegistry, typename Value>
   class VectorMap : public MapRegistry::MapBase {
+    template <typename MR, typename T> friend class VectorMap;
   public:
 		
@@ -83,34 +84,27 @@
       : MapBase(g, r), container(KeyInfo<Graph, KeyIt>::maxId(g)+1, v) {}
 
-    /** Constructor to copy a map of an other map type.
-     */
-    template <typename CMap> VectorMap(const CMap& copy) : MapBase(copy) {
-      if (MapBase::getGraph()) {
-	container.resize(KeyInfo<Graph, KeyIt>::maxId(*MapBase::getGraph())+1);
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  set(it, copy[it]);
-	}
+    /** Assign operator to copy a map of an other map type.
+     */
+    template <typename TT>
+    VectorMap(const VectorMap<MapRegistry, TT>& c) 
+      : MapBase(c), container(c.container.size()) {
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
+	container[id] = c.container[id];
       }
     }
 
-    /** Assign operator to copy a map an other map type.
-     */
-    template <typename CMap> VectorMap& operator=(const CMap& copy) {
-      container.clear();
-      this->MapBase::operator=(copy);
-      if (MapBase::getGraph()) {
-	container.resize(KeyInfo<Graph, KeyIt>::maxId(*MapBase::getGraph())+1);
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  set(it, copy[it]);
-	}
+    /** Assign operator to copy a map of an other map type.
+     */
+    template <typename TT>
+    VectorMap& operator=(const VectorMap<MapRegistry, TT>& c) {
+      container.resize(c.container.size());
+      MapBase::operator=(c);
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
+	container[id] = c.container[id];
       }
       return *this;
     }
-
-    /** The destructor of the map.
-     */
-    virtual ~VectorMap() {
-    }
-		
     /**
      * The subscript operator. The map can be subscripted by the
Index: src/test/graph_test.h
===================================================================
--- src/test/graph_test.h	(revision 856)
+++ src/test/graph_test.h	(revision 891)
@@ -1,2 +1,3 @@
+// -*- c++ -*-
 #ifndef HUGO_TEST_GRAPH_TEST_H
 #define HUGO_TEST_GRAPH_TEST_H
@@ -10,287 +11,297 @@
 namespace hugo {
 
-
-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;
+  struct DummyType {
+    int value;
+    DummyType() {}
+    DummyType(int p) : value(p) {}
+    DummyType& operator=(int p) { value = p; return *this;}
+  };
+
+
+  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.tail(e);
-    n=G.head(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);
-    int v;
-    v=m[k]; m[k]=v; m.set(k,v);
-    v=cm[k];
+      {
+	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.tail(e);
+	n=G.head(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
-    {
-      //Check the typedef's
-      typename Graph::template NodeMap<int>::ValueType val;
-      val=1;
-      typename Graph::template NodeMap<int>::KeyType 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  
+	em=cm; //Copy to more complex type
+	{
+	  //Check the typedef's
+	  typename Graph::template NodeMap<int>::ValueType val;
+	  val=1;
+	  typename Graph::template NodeMap<int>::KeyType 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>::ValueType val;
-      val=true;
-      typename Graph::template NodeMap<bool>::KeyType 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
+	m=dm; //Copy to another type
+
+	{
+	  //Check the typedef's
+	  typename Graph::template NodeMap<bool>::ValueType val;
+	  val=true;
+	  typename Graph::template NodeMap<bool>::KeyType 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>::ValueType val;
-      val=1;
-      typename Graph::template EdgeMap<int>::KeyType 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
+	{
+	  //Check the typedef's
+	  typename Graph::template EdgeMap<int>::ValueType val;
+	  val=1;
+	  typename Graph::template EdgeMap<int>::KeyType 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>::ValueType val;
-      val=true;
-      typename Graph::template EdgeMap<bool>::KeyType key;
-      key= typename Graph::EdgeIt(G);
-    }
-  }
-}
-
-template<class Graph> void checkCompileGraph(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;
+	m=cm;  
+	dm=cm; //Copy from another type
+	m=dm; //Copy to another type
+	{
+	  //Check the typedef's
+	  typename Graph::template EdgeMap<bool>::ValueType val;
+	  val=true;
+	  typename Graph::template EdgeMap<bool>::KeyType key;
+	  key= typename Graph::EdgeIt(G);
+	}
+      }
+    }
+
+  template<class Graph> void checkCompileGraph(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); 
+      Node n,m;
+      n=G.addNode();
+      m=G.addNode();
+      Edge e;
+      e=G.addEdge(n,m); 
   
-  //  G.clear();
-}
-
-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);
-}
-
-template<class Graph> void checkCompileErasableGraph(Graph &G) 
-{
-  checkCompileGraph(G);
-  checkCompileGraphEraseNode(G);
-  checkCompileGraphEraseEdge(G);
-}
-
-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()));  
-}
-
-template<class Graph> void checkGraphNodeList(Graph &G, int nn)
-{
-  typename Graph::NodeIt n(G);
-  for(int i=0;i<nn;i++) {
-    check(n!=INVALID,"Wrong Node list linking.");
-    ++n;
-  }
-  check(n==INVALID,"Wrong Node list linking.");
-}
-
-template<class Graph> void checkGraphEdgeList(Graph &G, int nn)
-{
-  typedef typename Graph::EdgeIt EdgeIt;
-
-  EdgeIt e(G);
-  for(int i=0;i<nn;i++) {
-    check(e!=INVALID,"Wrong Edge list linking.");
-    ++e;
-  }
-  check(e==INVALID,"Wrong Edge list linking.");
-}
-
-template<class Graph> void checkGraphOutEdgeList(Graph &G,
-						 typename Graph::Node n,
-						 int nn)
-{
-  typename Graph::OutEdgeIt e(G,n);
-  for(int i=0;i<nn;i++) {
-    check(e!=INVALID,"Wrong OutEdge list linking.");
-    ++e;
-  }
-  check(e==INVALID,"Wrong OutEdge list linking.");
-}
-
-template<class Graph> void checkGraphInEdgeList(Graph &G,
-						typename Graph::Node n,
-						int nn)
-{
-  typename Graph::InEdgeIt e(G,n);
-  for(int i=0;i<nn;i++) {
-    check(e!=INVALID,"Wrong InEdge list linking.");
-    ++e;
-  }
-  check(e==INVALID,"Wrong InEdge list linking.");
-}
-
-///\file
-///\todo Check head(), tail() as well;
+      //  G.clear();
+    }
+
+  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);
+    }
+
+  template<class Graph> void checkCompileErasableGraph(Graph &G) 
+    {
+      checkCompileGraph(G);
+      checkCompileGraphEraseNode(G);
+      checkCompileGraphEraseEdge(G);
+    }
+
+  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()));  
+    }
+
+  template<class Graph> void checkGraphNodeList(Graph &G, int nn)
+    {
+      typename Graph::NodeIt n(G);
+      for(int i=0;i<nn;i++) {
+	check(n!=INVALID,"Wrong Node list linking.");
+	++n;
+      }
+      check(n==INVALID,"Wrong Node list linking.");
+    }
+
+  template<class Graph> void checkGraphEdgeList(Graph &G, int nn)
+    {
+      typedef typename Graph::EdgeIt EdgeIt;
+
+      EdgeIt e(G);
+      for(int i=0;i<nn;i++) {
+	check(e!=INVALID,"Wrong Edge list linking.");
+	++e;
+      }
+      check(e==INVALID,"Wrong Edge list linking.");
+    }
+
+  template<class Graph> void checkGraphOutEdgeList(Graph &G,
+						   typename Graph::Node n,
+						   int nn)
+    {
+      typename Graph::OutEdgeIt e(G,n);
+      for(int i=0;i<nn;i++) {
+	check(e!=INVALID,"Wrong OutEdge list linking.");
+	++e;
+      }
+      check(e==INVALID,"Wrong OutEdge list linking.");
+    }
+
+  template<class Graph> void checkGraphInEdgeList(Graph &G,
+						  typename Graph::Node n,
+						  int nn)
+    {
+      typename Graph::InEdgeIt e(G,n);
+      for(int i=0;i<nn;i++) {
+	check(e!=INVALID,"Wrong InEdge list linking.");
+	++e;
+      }
+      check(e==INVALID,"Wrong InEdge list linking.");
+    }
+
+  ///\file
+  ///\todo Check head(), tail() as well;
 
   
Index: src/test/graph_wrapper_test.cc
===================================================================
--- src/test/graph_wrapper_test.cc	(revision 878)
+++ src/test/graph_wrapper_test.cc	(revision 891)
@@ -19,14 +19,49 @@
 
 
-//Compile SmartGraph
 typedef SmartGraph Graph;
+
+//Compile GraphWrapper
 typedef GraphWrapper<Graph> GW;
 template void checkCompileStaticGraph<GW>(GW &);
-//template void checkCompileGraphFindEdge<SmartGraph>(SmartGraph &);
 
-//Compile SymSmartGraph
+//Compile RevGraphWrapper
 typedef RevGraphWrapper<Graph> RevGW;
 template void checkCompileStaticGraph<RevGW>(RevGW &);
-//template void checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
+
+//Compile SubGraphWrapper
+typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>, 
+			Graph::EdgeMap<bool> > SubGW;
+template void checkCompileStaticGraph<SubGW>(SubGW &);
+
+//Compile UndirGraphWrapper
+/// \bug UndirGraphWrapper cannot pass the StaticGraph test
+//typedef UndirGraphWrapper<Graph> UndirGW;
+//template void checkCompileStaticGraph<UndirGW>(UndirGW &);
+
+//Compile UndirGraph
+//typedef UndirGraph<Graph> UndirG;
+//template void checkCompileStaticGraph<UndirG>(UndirG &);
+
+//typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>, 
+/// \bug SubBidirGraphWrapper cannot pass the StaticGraph test
+//			     Graph::EdgeMap<bool> > SubBDGW;
+//template void checkCompileStaticGraph<SubBDGW>(SubBDGW &);
+
+//Compile BidirGraphWrapper
+//typedef BidirGraphWrapper<Graph> BidirGW;
+//template void checkCompileStaticGraph<BidirGW>(BidirGW &);
+
+//Compile BidirGraph
+//typedef BidirGraph<Graph> BidirG;
+//template void checkCompileStaticGraph<BidirG>(BidirG &);
+
+//Compile ResGraphWrapper
+//typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>, 
+//			Graph::EdgeMap<int> > ResGW;
+//template void checkCompileStaticGraph<ResGW>(ResGW &);
+
+//Compile ErasingFirstGraphWrapper
+typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW;
+template void checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &);
 
 
