Index: src/benchmark/bfs-bench.cc
===================================================================
--- src/benchmark/bfs-bench.cc	(revision 921)
+++ src/benchmark/bfs-bench.cc	(revision 986)
@@ -47,5 +47,5 @@
     Q.pop();
     for(OutEdgeIt e(G,n);e!=INVALID;++e)
-      if(!visited[m=G.head(e)]) {
+      if(!visited[m=G.target(e)]) {
 	Q.push(m);
 	visited.set(m,true);
@@ -75,5 +75,5 @@
     Node n=Q[Qt++];
     for(OutEdgeIt e(G,n);e!=INVALID;++e)
-      if(!visited[m=G.head(e)]) {
+      if(!visited[m=G.target(e)]) {
 	Q[Qh++]=m;
 	visited.set(m,true);
Index: src/demo/dim_to_dot.cc
===================================================================
--- src/demo/dim_to_dot.cc	(revision 931)
+++ src/demo/dim_to_dot.cc	(revision 986)
@@ -52,5 +52,5 @@
   cout << "  edge [ shape=ellipse, fontname=Helvetica, fontsize=10 ];" << endl;
   for(EdgeIt e(g); e!=INVALID; ++e) {
-    cout << "  n" << g.id(g.tail(e)) << " -> " << " n" << g.id(g.head(e))
+    cout << "  n" << g.id(g.source(e)) << " -> " << " n" << g.id(g.target(e))
 	 << " [ label=\"" << g.id(e) 
 	 << ", length:" << length[e] << "\" ]; " << endl;
Index: src/demo/sub_graph_wrapper_demo.cc
===================================================================
--- src/demo/sub_graph_wrapper_demo.cc	(revision 932)
+++ src/demo/sub_graph_wrapper_demo.cc	(revision 986)
@@ -38,8 +38,8 @@
   readDimacs(std::cin, g, length, s, t);
 
-  cout << "edges with lengths (of form id, tail--length->head): " << endl;
+  cout << "edges with lengths (of form id, source--length->target): " << endl;
   for(EdgeIt e(g); e!=INVALID; ++e) 
-    cout << " " << g.id(e) << ", " << g.id(g.tail(e)) << "--" 
-	 << length[e] << "->" << g.id(g.head(e)) << endl;
+    cout << " " << g.id(e) << ", " << g.id(g.source(e)) << "--" 
+	 << length[e] << "->" << g.id(g.target(e)) << endl;
 
   cout << "s: " << g.id(s) << " t: " << g.id(t) << endl;
@@ -76,5 +76,5 @@
     if (flow[e])
       cout << " " << g.id(e) << ", "
-	   << g.id(g.tail(e)) << "--" 
-	   << length[e] << "->" << g.id(g.head(e)) << endl;
+	   << g.id(g.source(e)) << "--" 
+	   << length[e] << "->" << g.id(g.target(e)) << endl;
 }
Index: src/demo/tight_edge_filter_map.h
===================================================================
--- src/demo/tight_edge_filter_map.h	(revision 929)
+++ src/demo/tight_edge_filter_map.h	(revision 986)
@@ -32,6 +32,6 @@
   /// A node-map node_potential is said to be a potential w.r.t. 
   /// an edge-map edge_distance 
-  /// if and only if for each edge e, node_potential[g.head(e)] 
-  /// <= edge_distance[e]+node_potential[g.tail(e)] 
+  /// if and only if for each edge e, node_potential[g.target(e)] 
+  /// <= edge_distance[e]+node_potential[g.source(e)] 
   /// (or the reverse inequality holds for each edge).
   /// An edge is said to be tight if this inequality holds with equality, 
@@ -52,6 +52,6 @@
       edge_distance(&_edge_distance) { }
     bool operator[](const typename Graph::Edge& e) const {
-      return ((*node_potential)[g->head(e)] == 
-	      (*edge_distance)[e]+(*node_potential)[g->tail(e)]);
+      return ((*node_potential)[g->target(e)] == 
+	      (*edge_distance)[e]+(*node_potential)[g->source(e)]);
     }
   };
Index: src/lemon/bfs.h
===================================================================
--- src/lemon/bfs.h	(revision 977)
+++ src/lemon/bfs.h	(revision 986)
@@ -210,5 +210,5 @@
 	
 	for(OutEdgeIt e(*G,n);e!=INVALID;++e)
-	  if((m=G->head(e))!=s && (*predecessor)[m]==INVALID) {
+	  if((m=G->target(e))!=s && (*predecessor)[m]==INVALID) {
 	    Q[Qh++]=m;
 	    predecessor->set(m,e);
Index: src/lemon/concept/graph.h
===================================================================
--- src/lemon/concept/graph.h	(revision 961)
+++ src/lemon/concept/graph.h	(revision 986)
@@ -364,14 +364,14 @@
 //       EdgeIt& first(EdgeIt& i) const { return i; }
 
-//       ///Gives back the head node of an edge.
-
-//       ///Gives back the head node of an edge.
-//       ///
-//       Node head(Edge) const { return INVALID; }
-//       ///Gives back the tail node of an edge.
-
-//       ///Gives back the tail node of an edge.
-//       ///
-//       Node tail(Edge) const { return INVALID; }
+//       ///Gives back the target node of an edge.
+
+//       ///Gives back the target node of an edge.
+//       ///
+//       Node target(Edge) const { return INVALID; }
+//       ///Gives back the source node of an edge.
+
+//       ///Gives back the source node of an edge.
+//       ///
+//       Node source(Edge) const { return INVALID; }
   
 //       ///Gives back the \e id of a node.
@@ -539,6 +539,6 @@
 // 	Edge e;
 // 	e=INVALID;
-// 	n=G.tail(e);
-// 	n=G.head(e);
+// 	n=G.source(e);
+// 	n=G.target(e);
 //       }
 //       // id tests
@@ -666,6 +666,6 @@
 //       ///Add a new edge to the graph.
 
-//       ///Add a new edge to the graph with tail node \c t
-//       ///and head node \c h.
+//       ///Add a new edge to the graph with source node \c t
+//       ///and target node \c h.
 //       ///\return the new edge.
 //       Edge addEdge(Node h, Node t) { return INVALID; }
@@ -801,6 +801,6 @@
       void nextInEdge(Edge &e) const { }
 
-      Node head(Edge) const { return Node(); }
-      Node tail(Edge) const { return Node(); }
+      Node target(Edge) const { return Node(); }
+      Node source(Edge) const { return Node(); }
       
 
Index: src/lemon/concept/graph_component.h
===================================================================
--- src/lemon/concept/graph_component.h	(revision 980)
+++ src/lemon/concept/graph_component.h	(revision 986)
@@ -243,15 +243,15 @@
       };
 
-      ///Gives back the head node of an edge.
-
-      ///Gives back the head node of an edge.
-      ///
-      Node head(const Edge&) const { return INVALID;}
-
-      ///Gives back the tail node of an edge.
-
-      ///Gives back the tail node of an edge.
-      ///
-      Node tail(const Edge&) const { return INVALID;}
+      ///Gives back the target node of an edge.
+
+      ///Gives back the target node of an edge.
+      ///
+      Node target(const Edge&) const { return INVALID;}
+
+      ///Gives back the source node of an edge.
+
+      ///Gives back the source node of an edge.
+      ///
+      Node source(const Edge&) const { return INVALID;}
     };
 
@@ -273,6 +273,6 @@
 	  Node n;
 	  Edge e;
-	  n = graph.tail(e);
-	  n = graph.head(e);
+	  n = graph.source(e);
+	  n = graph.target(e);
 	}      
       }
Index: src/lemon/concept/path.h
===================================================================
--- src/lemon/concept/path.h	(revision 967)
+++ src/lemon/concept/path.h	(revision 986)
@@ -67,10 +67,10 @@
       /// Starting point of the path.
       /// Returns INVALID if the path is empty.
-      GraphNode/*It*/ head() const {return INVALID;}
+      GraphNode/*It*/ target() const {return INVALID;}
       /// \brief End point of the path.
       ///
       /// End point of the path.
       /// Returns INVALID if the path is empty.
-      GraphNode/*It*/ tail() const {return INVALID;}
+      GraphNode/*It*/ source() const {return INVALID;}
 
       /// \brief First NodeIt/EdgeIt.
@@ -81,15 +81,15 @@
       It& first(It &i) const { return i=It(*this); }
 
-      /// \brief The head of an edge.
-      ///
-      /// Returns node iterator pointing to the head node of the
+      /// \brief The target of an edge.
+      ///
+      /// Returns node iterator pointing to the target node of the
       /// given edge iterator.
-      NodeIt head(const EdgeIt& e) const {return INVALID;}
-
-      /// \brief The tail of an edge.
-      ///
-      /// Returns node iterator pointing to the tail node of the
+      NodeIt target(const EdgeIt& e) const {return INVALID;}
+
+      /// \brief The source of an edge.
+      ///
+      /// Returns node iterator pointing to the source node of the
       /// given edge iterator.
-      NodeIt tail(const EdgeIt& e) const {return INVALID;}
+      NodeIt source(const EdgeIt& e) const {return INVALID;}
 
 
Index: src/lemon/concept/sym_graph.h
===================================================================
--- src/lemon/concept/sym_graph.h	(revision 959)
+++ src/lemon/concept/sym_graph.h	(revision 986)
@@ -451,14 +451,14 @@
       SymEdgeIt& first(SymEdgeIt& i) const { return i; }
 
-      ///Gives back the head node of an edge.
-
-      ///Gives back the head node of an edge.
-      ///
-      Node head(Edge) const { return INVALID; }
-      ///Gives back the tail node of an edge.
-
-      ///Gives back the tail node of an edge.
-      ///
-      Node tail(Edge) const { return INVALID; }
+      ///Gives back the target node of an edge.
+
+      ///Gives back the target node of an edge.
+      ///
+      Node target(Edge) const { return INVALID; }
+      ///Gives back the source node of an edge.
+
+      ///Gives back the source node of an edge.
+      ///
+      Node source(Edge) const { return INVALID; }
   
       ///Gives back the first node of an symmetric edge.
@@ -466,10 +466,10 @@
       ///Gives back the first node of an symmetric edge.
       ///
-      Node head(SymEdge) const { return INVALID; }
+      Node target(SymEdge) const { return INVALID; }
       ///Gives back the second node of an symmetric edge.
 
       ///Gives back the second node of an symmetric edge.
       ///
-      Node tail(SymEdge) const { return INVALID; }
+      Node source(SymEdge) const { return INVALID; }
       ///Gives back the \e id of a node.
 
@@ -608,6 +608,6 @@
       ///Add a new edge to the graph.
 
-      ///Add a new symmetric edge to the graph with tail node \c t
-      ///and head node \c h.
+      ///Add a new symmetric edge to the graph with source node \c t
+      ///and target node \c h.
       ///\return the new edge.
       SymEdge addEdge(Node h, Node t) { return INVALID; }
Index: src/lemon/concept/undir_graph.h
===================================================================
--- src/lemon/concept/undir_graph.h	(revision 962)
+++ src/lemon/concept/undir_graph.h	(revision 986)
@@ -48,6 +48,6 @@
 
 	Node n;
-	n = graph.head(ue);
-	n = graph.tail(ue);
+	n = graph.target(ue);
+	n = graph.source(ue);
 
 	graph.first(ue);
Index: src/lemon/concept_check.h
===================================================================
--- src/lemon/concept_check.h	(revision 946)
+++ src/lemon/concept_check.h	(revision 986)
@@ -26,5 +26,5 @@
     "inline" is used for ignore_unused_variable_warning()
     and function_requires() to make sure there is no
-    overhead with g++.
+    overtarget with g++.
   */
 
Index: src/lemon/dfs.h
===================================================================
--- src/lemon/dfs.h	(revision 946)
+++ src/lemon/dfs.h	(revision 986)
@@ -207,5 +207,5 @@
       do {
 	if((e=Q[Qh])!=INVALID)
-	  if((m=G->head(e))!=s && (*predecessor)[m=G->head(e)]==INVALID) {
+	  if((m=G->target(e))!=s && (*predecessor)[m=G->target(e)]==INVALID) {
 	    predecessor->set(m,e);
 	    pred_node->set(m,n);
@@ -215,5 +215,5 @@
 	  }
 	  else ++Q[Qh];
-	else if(--Qh>=0) n=G->tail(Q[Qh]);
+	else if(--Qh>=0) n=G->source(Q[Qh]);
       } while(Qh>=0);
     }
Index: src/lemon/dijkstra.h
===================================================================
--- src/lemon/dijkstra.h	(revision 959)
+++ src/lemon/dijkstra.h	(revision 986)
@@ -255,5 +255,5 @@
 	
 	for(OutEdgeIt e(*G,v); e!=INVALID; ++e) {
-	  Node w=G->head(e); 
+	  Node w=G->target(e); 
 	  switch(heap.state(w)) {
 	  case HeapType::PRE_HEAP:
Index: src/lemon/dimacs.h
===================================================================
--- src/lemon/dimacs.h	(revision 964)
+++ src/lemon/dimacs.h	(revision 986)
@@ -209,5 +209,5 @@
 
     for(EdgeIt e(g); e!=INVALID; ++e) {
-      os << "a " << nodes[g.tail(e)] << " " << nodes[g.head(e)] << std::endl; 
+      os << "a " << nodes[g.source(e)] << " " << nodes[g.target(e)] << std::endl; 
     }
 
Index: src/lemon/full_graph.h
===================================================================
--- src/lemon/full_graph.h	(revision 985)
+++ src/lemon/full_graph.h	(revision 986)
@@ -79,6 +79,6 @@
     int maxId(Edge = INVALID) const { return EdgeNum-1; }
 
-    Node tail(Edge e) const { return e.id % NodeNum; }
-    Node head(Edge e) const { return e.id / NodeNum; }
+    Node source(Edge e) const { return e.id % NodeNum; }
+    Node target(Edge e) const { return e.id / NodeNum; }
 
 
@@ -137,10 +137,10 @@
       
     protected:
-      int id;  // NodeNum * head + tail;
+      int id;  // NodeNum * target + source;
 
       Edge(int _id) : id(_id) {}
 
-      Edge(const FullGraphBase& _graph, int tail, int head) 
-	: id(_graph.NodeNum * head+tail) {}
+      Edge(const FullGraphBase& _graph, int source, int target) 
+	: id(_graph.NodeNum * target+source) {}
     public:
       Edge() { }
@@ -251,12 +251,12 @@
     int maxId(Edge = INVALID) const { return EdgeNum-1; }
 
-    Node tail(Edge e) const { 
+    Node source(Edge e) const { 
       /// \todo we may do it faster
       return ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2; 
     }
 
-    Node head(Edge e) const { 
-      int tail = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;;
-      return e.id - (tail) * (tail - 1) / 2; 
+    Node target(Edge e) const { 
+      int source = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;;
+      return e.id - (source) * (source - 1) / 2; 
     }
 
@@ -316,10 +316,10 @@
       
     protected:
-      int id;  // NodeNum * head + tail;
+      int id;  // NodeNum * target + source;
 
       Edge(int _id) : id(_id) {}
 
-      Edge(const UndirFullGraphBase& _graph, int tail, int head) 
-	: id(_graph.NodeNum * head+tail) {}
+      Edge(const UndirFullGraphBase& _graph, int source, int target) 
+	: id(_graph.NodeNum * target+source) {}
     public:
       Edge() { }
@@ -352,8 +352,8 @@
     /// \todo with specialized iterators we can make faster iterating
     void nextOut(Edge& e) const {
-      int tail = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;;
-      int head = e.id - (tail) * (tail - 1) / 2; 
-      ++head;
-      e.id = head < tail ? tail * (tail - 1) / 2 + head : -1;
+      int source = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;;
+      int target = e.id - (source) * (source - 1) / 2; 
+      ++target;
+      e.id = target < source ? source * (source - 1) / 2 + target : -1;
     }
 
@@ -363,8 +363,8 @@
     
     void nextIn(Edge& e) const {
-      int tail = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;;
-      int head = e.id - (tail) * (tail - 1) / 2; ++head;
-      ++tail;
-      e.id = tail < NodeNum ? tail * (tail - 1) / 2 + head : -1;
+      int source = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;;
+      int target = e.id - (source) * (source - 1) / 2; ++target;
+      ++source;
+      e.id = source < NodeNum ? source * (source - 1) / 2 + target : -1;
     }
 
Index: src/lemon/graph_utils.h
===================================================================
--- src/lemon/graph_utils.h	(revision 977)
+++ src/lemon/graph_utils.h	(revision 986)
@@ -150,5 +150,5 @@
     if(prev==INVALID) g.first(e,u);
     else ++e;
-    while(e!=INVALID && g.tail(e)!=v) ++e;
+    while(e!=INVALID && g.source(e)!=v) ++e;
     return e;
   }
@@ -193,5 +193,5 @@
 		 const NodeBijection& _nb, EdgeBijection& _eb) {    
     for (typename SourceGraph::EdgeIt it(_s); it != INVALID; ++it) {
-      _eb[it] = _d.addEdge(_nb[_s.tail(it)], _nb[_s.head(it)]);
+      _eb[it] = _d.addEdge(_nb[_s.source(it)], _nb[_s.target(it)]);
     }
   }
Index: src/lemon/graph_wrapper.h
===================================================================
--- src/lemon/graph_wrapper.h	(revision 970)
+++ src/lemon/graph_wrapper.h	(revision 986)
@@ -151,10 +151,10 @@
     void nextOut(Edge& i) const { graph->nextOut(i); }
 
-    Node tail(const Edge& e) const { return graph->tail(e); }
-    Node head(const Edge& e) const { return graph->head(e); }
-//     Node tail(const Edge& e) const { 
-//       return Node(graph->tail(static_cast<typename Graph::Edge>(e))); }
-//     Node head(const Edge& e) const { 
-//       return Node(graph->head(static_cast<typename Graph::Edge>(e))); }
+    Node source(const Edge& e) const { return graph->source(e); }
+    Node target(const Edge& e) const { return graph->target(e); }
+//     Node source(const Edge& e) const { 
+//       return Node(graph->source(static_cast<typename Graph::Edge>(e))); }
+//     Node target(const Edge& e) const { 
+//       return Node(graph->target(static_cast<typename Graph::Edge>(e))); }
 
     int nodeNum() const { return graph->nodeNum(); }
@@ -162,6 +162,6 @@
   
     Node addNode() const { return Node(graph->addNode()); }
-    Edge addEdge(const Node& tail, const Node& head) const { 
-      return Edge(graph->addEdge(tail, head)); }
+    Edge addEdge(const Node& source, const Node& target) const { 
+      return Edge(graph->addEdge(source, target)); }
 
     void erase(const Node& i) const { graph->erase(i); }
@@ -291,8 +291,8 @@
     }
 
-    Node tail(const Edge& e) const { 
-      return GraphWrapper<Graph>::head(e); }
-    Node head(const Edge& e) const { 
-      return GraphWrapper<Graph>::tail(e); }
+    Node source(const Edge& e) const { 
+      return GraphWrapper<Graph>::target(e); }
+    Node target(const Edge& e) const { 
+      return GraphWrapper<Graph>::source(e); }
 
     //    KEEP_MAPS(Parent, RevGraphWrapper);
@@ -626,8 +626,8 @@
   readDimacs(std::cin, g, length, s, t);
 
-  cout << "edges with lengths (of form id, tail--length->head): " << endl;
+  cout << "edges with lengths (of form id, source--length->target): " << endl;
   for(EdgeIt e(g); e!=INVALID; ++e) 
-    cout << g.id(e) << ", " << g.id(g.tail(e)) << "--" 
-         << length[e] << "->" << g.id(g.head(e)) << endl;
+    cout << g.id(e) << ", " << g.id(g.source(e)) << "--" 
+         << length[e] << "->" << g.id(g.target(e)) << endl;
 
   cout << "s: " << g.id(s) << " t: " << g.id(t) << endl;
@@ -666,10 +666,10 @@
   for(EdgeIt e(g); e!=INVALID; ++e) 
     if (flow[e])
-      cout << " " << g.id(g.tail(e)) << "--" 
-	   << length[e] << "->" << g.id(g.head(e)) << endl;
+      cout << " " << g.id(g.source(e)) << "--" 
+	   << length[e] << "->" << g.id(g.target(e)) << endl;
   \endcode
   The program has the following (expected :-)) output:
   \code
-  edges with lengths (of form id, tail--length->head):
+  edges with lengths (of form id, source--length->target):
    9, 5--4->6
    8, 4--2->6
@@ -757,5 +757,5 @@
     OutEdgeIt& next(OutEdgeIt& e) const {
       if (e.out_or_in) {
-	typename Graph::Node n=this->graph->tail(e.out);
+	typename Graph::Node n=this->graph->source(e.out);
 	this->graph->next(e.out);
 	if (!this->graph->valid(e.out)) { 
@@ -768,9 +768,9 @@
 
     Node aNode(const OutEdgeIt& e) const { 
-      if (e.out_or_in) return this->graph->tail(e); else 
-	return this->graph->head(e); }
+      if (e.out_or_in) return this->graph->source(e); else 
+	return this->graph->target(e); }
     Node bNode(const OutEdgeIt& e) const { 
-      if (e.out_or_in) return this->graph->head(e); else 
-	return this->graph->tail(e); }
+      if (e.out_or_in) return this->graph->target(e); else 
+	return this->graph->source(e); }
 
     //    KEEP_MAPS(Parent, UndirGraphWrapper);
@@ -938,5 +938,5 @@
       OutEdgeIt& operator++() { 
 	if (!this->backward) {
-	  Node n=gw->tail(*this);
+	  Node n=gw->source(*this);
 	  *(static_cast<GraphEdge*>(this))=
 	    ++(typename Graph::OutEdgeIt(*(gw->graph), *this));
@@ -995,5 +995,5 @@
       InEdgeIt& operator++() { 
 	if (!this->backward) {
-	  Node n=gw->tail(*this);
+	  Node n=gw->source(*this);
 	  *(static_cast<GraphEdge*>(this))=
 	    ++(typename Graph::InEdgeIt(*(gw->graph), *this));
@@ -1090,8 +1090,8 @@
   
 
-    Node tail(Edge e) const { 
-      return ((!e.backward) ? this->graph->tail(e) : this->graph->head(e)); }
-    Node head(Edge e) const { 
-      return ((!e.backward) ? this->graph->head(e) : this->graph->tail(e)); }
+    Node source(Edge e) const { 
+      return ((!e.backward) ? this->graph->source(e) : this->graph->target(e)); }
+    Node target(Edge e) const { 
+      return ((!e.backward) ? this->graph->target(e) : this->graph->source(e)); }
 
     /// Gives back the opposite edge.
@@ -1414,5 +1414,5 @@
 //     }
     void erase(const Edge& e) const {
-      Node n=tail(e);
+      Node n=source(e);
       typename Graph::OutEdgeIt f(*Parent::graph, n);
       ++f;
Index: src/lemon/kruskal.h
===================================================================
--- src/lemon/kruskal.h	(revision 921)
+++ src/lemon/kruskal.h	(revision 986)
@@ -83,6 +83,6 @@
     for (typename IN::const_iterator p = in.begin(); 
 	 p!=in.end(); ++p ) {
-      if ( uf.join(G.head((*p).first),
-		   G.tail((*p).first)) ) {
+      if ( uf.join(G.target((*p).first),
+		   G.source((*p).first)) ) {
 	out.set((*p).first, true);
 	tot_cost += (*p).second;
Index: src/lemon/list_graph.h
===================================================================
--- src/lemon/list_graph.h	(revision 980)
+++ src/lemon/list_graph.h	(revision 986)
@@ -44,5 +44,5 @@
  
     struct EdgeT {
-      int head, tail;
+      int target, source;
       int prev_in, prev_out;
       int next_in, next_out;
@@ -112,6 +112,6 @@
     int maxId(Edge = INVALID) const { return edges.size()-1; }
 
-    Node tail(Edge e) const { return edges[e.id].tail; }
-    Node head(Edge e) const { return edges[e.id].head; }
+    Node source(Edge e) const { return edges[e.id].source; }
+    Node target(Edge e) const { return edges[e.id].target; }
 
 
@@ -138,5 +138,5 @@
       } else {
 	int n;
-	for(n = nodes[edges[edge.id].head].next;
+	for(n = nodes[edges[edge.id].target].next;
 	  n!=-1 && nodes[n].first_in == -1; 
 	  n = nodes[n].next);
@@ -199,6 +199,6 @@
       }
       
-      edges[n].tail = u.id; 
-      edges[n].head = v.id;
+      edges[n].source = u.id; 
+      edges[n].target = v.id;
 
       edges[n].next_out = nodes[u.id].first_out;
@@ -247,5 +247,5 @@
 	edges[edges[n].prev_in].next_in = edges[n].next_in;
       } else {
-	nodes[edges[n].head].first_in = edges[n].next_in;
+	nodes[edges[n].target].first_in = edges[n].next_in;
       }
 
@@ -258,5 +258,5 @@
 	edges[edges[n].prev_out].next_out = edges[n].next_out;
       } else {
-	nodes[edges[n].tail].first_out = edges[n].next_out;
+	nodes[edges[n].source].first_out = edges[n].next_out;
       }
       
@@ -273,5 +273,5 @@
 
   protected:
-    void _moveHead(Edge e, Node n) 
+    void _moveTarget(Edge e, Node n) 
     {
       if(edges[e.id].next_in != -1)
@@ -279,11 +279,11 @@
       if(edges[e.id].prev_in != -1)
 	edges[edges[e.id].prev_in].next_in = edges[e.id].next_in;
-      else nodes[edges[e.id].head].first_in = edges[e.id].next_in;
-      edges[e.id].head = n.id;
+      else nodes[edges[e.id].target].first_in = edges[e.id].next_in;
+      edges[e.id].target = n.id;
       edges[e.id].prev_in = -1;
       edges[e.id].next_in = nodes[n.id].first_in;
       nodes[n.id].first_in = e.id;
     }
-    void _moveTail(Edge e, Node n) 
+    void _moveSource(Edge e, Node n) 
     {
       if(edges[e.id].next_out != -1)
@@ -291,6 +291,6 @@
       if(edges[e.id].prev_out != -1)
 	edges[edges[e.id].prev_out].next_out = edges[e.id].next_out;
-      else nodes[edges[e.id].tail].first_out = edges[e.id].next_out;
-      edges[e.id].tail = n.id;
+      else nodes[edges[e.id].source].first_out = edges[e.id].next_out;
+      edges[e.id].source = n.id;
       edges[e.id].prev_out = -1;
       edges[e.id].next_out = nodes[n.id].first_out;
@@ -321,14 +321,14 @@
   {
   public:
-    /// Moves the head of \c e to \c n
-
-    /// Moves the head of \c e to \c n
+    /// Moves the target of \c e to \c n
+
+    /// Moves the target of \c e to \c n
     ///
-    void moveHead(Edge e, Node n) { _moveHead(e,n); }
-    /// Moves the tail of \c e to \c n
-
-    /// Moves the tail of \c e to \c n
+    void moveTarget(Edge e, Node n) { _moveTarget(e,n); }
+    /// Moves the source of \c e to \c n
+
+    /// Moves the source of \c e to \c n
     ///
-    void moveTail(Edge e, Node n) { _moveTail(e,n); }
+    void moveSource(Edge e, Node n) { _moveSource(e,n); }
 
     ///Using this it possible to avoid the superfluous memory allocation.
Index: src/lemon/min_cost_flow.h
===================================================================
--- src/lemon/min_cost_flow.h	(revision 941)
+++ src/lemon/min_cost_flow.h	(revision 986)
@@ -104,7 +104,7 @@
       ValueType operator[](typename ResGW::Edge e) const {     
 	if (g.forward(e))
-	  return  length[e]-(pot[g.head(e)]-pot[g.tail(e)]);   
+	  return  length[e]-(pot[g.target(e)]-pot[g.source(e)]);   
 	else
-	  return -length[e]-(pot[g.head(e)]-pot[g.tail(e)]);   
+	  return -length[e]-(pot[g.target(e)]-pot[g.source(e)]);   
       }     
 	
@@ -236,5 +236,5 @@
         for(typename Graph::EdgeIt e(g); e!=INVALID; ++e) {
 	//C^{\Pi}_{i,j}
-	mod_pot = length[e]-potential[g.head(e)]+potential[g.tail(e)];
+	mod_pot = length[e]-potential[g.target(e)]+potential[g.source(e)];
 	fl_e = flow[e];
 	if (0<fl_e && fl_e<capacity[e]) {
Index: src/lemon/path.h
===================================================================
--- src/lemon/path.h	(revision 959)
+++ src/lemon/path.h	(revision 986)
@@ -112,6 +112,6 @@
     /// Starting point of the path.
     /// Returns INVALID if the path is empty.
-    GraphNode tail() const {
-      return empty() ? INVALID : gr->tail(edges[0]);
+    GraphNode source() const {
+      return empty() ? INVALID : gr->source(edges[0]);
     }
     /// \brief End point of the path.
@@ -119,6 +119,6 @@
     /// End point of the path.
     /// Returns INVALID if the path is empty.
-    GraphNode head() const {
-      return empty() ? INVALID : gr->head(edges[length()-1]);
+    GraphNode target() const {
+      return empty() ? INVALID : gr->target(edges[length()-1]);
     }
 
@@ -140,13 +140,13 @@
     }
 
-    /// \brief Returns node iterator pointing to the head node of the
+    /// \brief Returns node iterator pointing to the target node of the
     /// given edge iterator.
-    NodeIt head(const EdgeIt& e) const {
+    NodeIt target(const EdgeIt& e) const {
       return NodeIt(*this, e.idx+1);
     }
 
-    /// \brief Returns node iterator pointing to the tail node of the
+    /// \brief Returns node iterator pointing to the source node of the
     /// given edge iterator.
-    NodeIt tail(const EdgeIt& e) const {
+    NodeIt source(const EdgeIt& e) const {
       return NodeIt(*this, e.idx);
     }
@@ -231,7 +231,7 @@
       operator const GraphNode& () const {
 	if(idx >= p->length())
-	  return p->head();
+	  return p->target();
 	else if(idx >= 0)
-	  return p->gr->tail(p->edges[idx]);
+	  return p->gr->source(p->edges[idx]);
 	else
 	  return INVALID;
@@ -336,21 +336,21 @@
       }
 
-      GraphNode tail() const {
+      GraphNode source() const {
 	if( ! front.empty() )
-	  return P.gr->tail(front[front.size()-1]);
+	  return P.gr->source(front[front.size()-1]);
 	else if( ! P.empty() )
-	  return P.gr->tail(P.edges[0]);
+	  return P.gr->source(P.edges[0]);
 	else if( ! back.empty() )
-	  return P.gr->tail(back[0]);
+	  return P.gr->source(back[0]);
 	else
 	  return INVALID;
       }
-      GraphNode head() const {
+      GraphNode target() const {
 	if( ! back.empty() )
-	  return P.gr->head(back[back.size()-1]);
+	  return P.gr->target(back[back.size()-1]);
 	else if( ! P.empty() )
-	  return P.gr->head(P.edges[P.length()-1]);
+	  return P.gr->target(P.edges[P.length()-1]);
 	else if( ! front.empty() )
-	  return P.gr->head(front[0]);
+	  return P.gr->target(front[0]);
 	else
 	  return INVALID;
@@ -438,6 +438,6 @@
     /// Starting point of the path.
     /// Returns INVALID if the path is empty.
-    GraphNode tail() const {
-      return empty() ? INVALID : gr->tail(edges[0]);
+    GraphNode source() const {
+      return empty() ? INVALID : gr->source(edges[0]);
     }
     /// \brief End point of the path.
@@ -445,6 +445,6 @@
     /// End point of the path.
     /// Returns INVALID if the path is empty.
-    GraphNode head() const {
-      return empty() ? INVALID : gr->head(edges[length()-1]);
+    GraphNode target() const {
+      return empty() ? INVALID : gr->target(edges[length()-1]);
     }
 
@@ -478,13 +478,13 @@
     }
 
-    /// \brief Returns node iterator pointing to the head node of the
+    /// \brief Returns node iterator pointing to the target node of the
     /// given edge iterator.
-    NodeIt head(const EdgeIt& e) const {
+    NodeIt target(const EdgeIt& e) const {
       return NodeIt(*this, e.idx+1);
     }
 
-    /// \brief Returns node iterator pointing to the tail node of the
+    /// \brief Returns node iterator pointing to the source node of the
     /// given edge iterator.
-    NodeIt tail(const EdgeIt& e) const {
+    NodeIt source(const EdgeIt& e) const {
       return NodeIt(*this, e.idx);
     }
@@ -571,7 +571,7 @@
       operator const GraphNode& () const {
 	if(idx >= p->length())
-	  return p->head();
+	  return p->target();
 	else if(idx >= 0)
-	  return p->gr->tail(p->edges[idx]);
+	  return p->gr->source(p->edges[idx]);
 	else
 	  return INVALID;
@@ -677,21 +677,21 @@
       }
 
-      GraphNode tail() const {
+      GraphNode source() const {
 	if( ! front.empty() )
-	  return P.gr->tail(front[front.size()-1]);
+	  return P.gr->source(front[front.size()-1]);
 	else if( ! P.empty() )
-	  return P.gr->tail(P.edges[0]);
+	  return P.gr->source(P.edges[0]);
 	else if( ! back.empty() )
-	  return P.gr->tail(back[0]);
+	  return P.gr->source(back[0]);
 	else
 	  return INVALID;
       }
-      GraphNode head() const {
+      GraphNode target() const {
 	if( ! back.empty() )
-	  return P.gr->head(back[back.size()-1]);
+	  return P.gr->target(back[back.size()-1]);
 	else if( ! P.empty() )
-	  return P.gr->head(P.edges[P.length()-1]);
+	  return P.gr->target(P.edges[P.length()-1]);
 	else if( ! front.empty() )
-	  return P.gr->head(front[0]);
+	  return P.gr->target(front[0]);
 	else
 	  return INVALID;
Index: src/lemon/preflow.h
===================================================================
--- src/lemon/preflow.h	(revision 977)
+++ src/lemon/preflow.h	(revision 986)
@@ -306,5 +306,5 @@
 	for(InEdgeIt e(*g,v); e!=INVALID; ++e) {
 	  if ( (*capacity)[e] <= (*flow)[e] ) continue;
-	  Node u=g->tail(e);
+	  Node u=g->source(e);
 	  if ( level[u] >= n ) {
 	    bfs_queue.push(u);
@@ -319,5 +319,5 @@
 	for(OutEdgeIt e(*g,v); e!=INVALID; ++e) {
 	  if ( 0 >= (*flow)[e] ) continue;
-	  Node u=g->head(e);
+	  Node u=g->target(e);
 	  if ( level[u] >= n ) {
 	    bfs_queue.push(u);
@@ -411,5 +411,5 @@
 	
 	for(OutEdgeIt e(*g,w) ; e!=INVALID; ++e) {
-	  Node v=g->head(e);
+	  Node v=g->target(e);
 	  if (!M[v] && (*flow)[e] < (*capacity)[e] ) {
 	    queue.push(v);
@@ -419,5 +419,5 @@
 	
 	for(InEdgeIt e(*g,w) ; e!=INVALID; ++e) {
-	  Node v=g->tail(e);
+	  Node v=g->source(e);
 	  if (!M[v] && (*flow)[e] > 0 ) {
 	    queue.push(v);
@@ -449,5 +449,5 @@
 
 	for(InEdgeIt e(*g,w) ; e!=INVALID; ++e) {
-	  Node v=g->tail(e);
+	  Node v=g->source(e);
 	  if (M[v] && (*flow)[e] < (*capacity)[e] ) {
 	    queue.push(v);
@@ -457,5 +457,5 @@
 
 	for(OutEdgeIt e(*g,w) ; e!=INVALID; ++e) {
-	  Node v=g->head(e);
+	  Node v=g->target(e);
 	  if (M[v] && (*flow)[e] > 0 ) {
 	    queue.push(v);
@@ -516,5 +516,5 @@
       for(OutEdgeIt e(*g,w) ; e!=INVALID; ++e) {
 	if ( (*flow)[e] >= (*capacity)[e] ) continue;
-	Node v=g->head(e);
+	Node v=g->target(e);
 
 	if( lev > level[v] ) { //Push is allowed now
@@ -548,5 +548,5 @@
 	  
 	  if( (*flow)[e] <= 0 ) continue;
-	  Node v=g->tail(e);
+	  Node v=g->source(e);
 
 	  if( lev > level[v] ) { //Push is allowed now
@@ -603,5 +603,5 @@
 	  for(InEdgeIt e(*g,v) ; e!=INVALID; ++e) {
 	    if ( (*capacity)[e] <= (*flow)[e] ) continue;
-	    Node w=g->tail(e);
+	    Node w=g->source(e);
 	    if ( level[w] == n && w != s ) {
 	      bfs_queue.push(w);
@@ -616,5 +616,5 @@
 	  for(OutEdgeIt e(*g,v) ; e!=INVALID; ++e) {
 	    if ( 0 >= (*flow)[e] ) continue;
-	    Node w=g->head(e);
+	    Node w=g->target(e);
 	    if ( level[w] == n && w != s ) {
 	      bfs_queue.push(w);
@@ -647,5 +647,5 @@
 	  
 	  for(InEdgeIt e(*g,v) ; e!=INVALID; ++e) {
-	    Node w=g->tail(e);
+	    Node w=g->source(e);
 	    if ( level[w] == n && w != s ) {
 	      bfs_queue.push(w);
@@ -663,5 +663,5 @@
 	  Num c=(*capacity)[e];
 	  if ( c <= 0 ) continue;
-	  Node w=g->head(e);
+	  Node w=g->target(e);
 	  if ( level[w] < n ) {
 	    if ( excess[w] <= 0 && w!=t ) { //putting into the stack
@@ -688,5 +688,5 @@
 	  Num rem=(*capacity)[e]-(*flow)[e];
 	  if ( rem <= 0 ) continue;
-	  Node w=g->head(e);
+	  Node w=g->target(e);
 	  if ( level[w] < n ) {
 	    if ( excess[w] <= 0 && w!=t ) { //putting into the stack
@@ -701,5 +701,5 @@
 	for(InEdgeIt e(*g,s); e!=INVALID; ++e) {
 	  if ( (*flow)[e] <= 0 ) continue;
-	  Node w=g->tail(e);
+	  Node w=g->source(e);
 	  if ( level[w] < n ) {
 	    if ( excess[w] <= 0 && w!=t ) {
@@ -718,5 +718,5 @@
 	  Num rem=(*capacity)[e]-(*flow)[e];
 	  if ( rem <= 0 ) continue;
-	  Node w=g->head(e);
+	  Node w=g->target(e);
 	  if ( level[w] < n ) flow->set(e, (*capacity)[e]);
 	}
@@ -724,5 +724,5 @@
 	for(InEdgeIt e(*g,s) ; e!=INVALID; ++e) {
 	  if ( (*flow)[e] <= 0 ) continue;
-	  Node w=g->tail(e);
+	  Node w=g->source(e);
 	  if ( level[w] < n ) flow->set(e, 0);
 	}
Index: src/lemon/smart_graph.h
===================================================================
--- src/lemon/smart_graph.h	(revision 980)
+++ src/lemon/smart_graph.h	(revision 986)
@@ -56,5 +56,5 @@
     struct EdgeT 
     {
-      int head, tail, next_in, next_out;      
+      int target, source, next_in, next_out;      
       //FIXME: is this necessary?
       EdgeT() : next_in(-1), next_out(-1) {}  
@@ -98,6 +98,6 @@
     int maxId(Edge = INVALID) const { return edges.size()-1; }
 
-    Node tail(Edge e) const { return edges[e.n].tail; }
-    Node head(Edge e) const { return edges[e.n].head; }
+    Node source(Edge e) const { return edges[e.n].source; }
+    Node target(Edge e) const { return edges[e.n].target; }
 
     /// Node ID.
@@ -128,5 +128,5 @@
     Edge addEdge(Node u, Node v) {
       Edge e; e.n=edges.size(); edges.push_back(EdgeT()); //FIXME: Hmmm...
-      edges[e.n].tail=u.n; edges[e.n].head=v.n;
+      edges[e.n].source=u.n; edges[e.n].target=v.n;
       edges[e.n].next_out=nodes[u.n].first_out;
       edges[e.n].next_in=nodes[v.n].first_in;
@@ -212,5 +212,5 @@
     {
       int e = (prev.n==-1)? nodes[u.n].first_out : edges[prev.n].next_out;
-      while(e!=-1 && edges[e].tail!=v.n) e = edges[e].next_out;
+      while(e!=-1 && edges[e].source!=v.n) e = edges[e].next_out;
       prev.n=e;
       return prev;
@@ -308,6 +308,6 @@
       while(s.edge_num>edges.size()) {
 	edge_observers.erase(Edge(edges.size()-1));
-	nodes[edges.back().head].first_in=edges.back().next_in;
-	nodes[edges.back().tail].first_out=edges.back().next_out;
+	nodes[edges.back().target].first_in=edges.back().next_in;
+	nodes[edges.back().source].first_out=edges.back().next_out;
 	edges.pop_back();
       }
Index: src/lemon/suurballe.h
===================================================================
--- src/lemon/suurballe.h	(revision 968)
+++ src/lemon/suurballe.h	(revision 986)
@@ -134,5 +134,5 @@
 	    ++e;
 	  }
-	  n = G.head(e);
+	  n = G.target(e);
 	  paths[j].push_back(e);
 	  //total_length += length[e];
Index: src/lemon/undir_graph_extender.h
===================================================================
--- src/lemon/undir_graph_extender.h	(revision 981)
+++ src/lemon/undir_graph_extender.h	(revision 986)
@@ -71,21 +71,21 @@
     }
 
-    /// Tail of the given Edge.
-    Node tail(const Edge &e) const {
-      return e.forward ? Parent::tail(e) : Parent::head(e);
+    /// Source of the given Edge.
+    Node source(const Edge &e) const {
+      return e.forward ? Parent::source(e) : Parent::target(e);
     }
 
-    /// \todo Shouldn't the "tail" of an undirected edge be called "aNode"
+    /// \todo Shouldn't the "source" of an undirected edge be called "aNode"
     /// or something???
-    using Parent::tail;
+    using Parent::source;
 
-    /// Head of the given Edge.
-    Node head(const Edge &e) const {
-      return e.forward ? Parent::head(e) : Parent::tail(e);
+    /// Target of the given Edge.
+    Node target(const Edge &e) const {
+      return e.forward ? Parent::target(e) : Parent::source(e);
     }
 
-    /// \todo Shouldn't the "head" of an undirected edge be called "bNode"
+    /// \todo Shouldn't the "target" of an undirected edge be called "bNode"
     /// or something???
-    using Parent::head;
+    using Parent::target;
 
     /// Returns whether the given directed edge is same orientation as the
@@ -97,8 +97,8 @@
 
     Node oppsiteNode(const Node &n, const Edge &e) const {
-      if( n == Parent::tail(e))
-	return Parent::head(e);
-      else if( n == Parent::head(e))
-	return Parent::tail(e);
+      if( n == Parent::source(e))
+	return Parent::target(e);
+      else if( n == Parent::target(e))
+	return Parent::source(e);
       else
 	return INVALID;
@@ -148,5 +148,5 @@
 	Parent::nextOut(e);
 	if( UndirEdge(e) == INVALID ) {
-	  Parent::firstIn(e, Parent::tail(e));
+	  Parent::firstIn(e, Parent::source(e));
 	  e.forward = false;
 	}
@@ -160,5 +160,5 @@
 	Parent::nextIn(e);
 	if( UndirEdge(e) == INVALID ) {
-	  Parent::firstOut(e, Parent::head(e));
+	  Parent::firstOut(e, Parent::target(e));
 	  e.forward = false;
 	}
Index: src/test/bfs_test.cc
===================================================================
--- src/test/bfs_test.cc	(revision 959)
+++ src/test/bfs_test.cc	(revision 986)
@@ -84,6 +84,6 @@
 
   for(EdgeIt e(G); e==INVALID; ++e) {
-    Node u=G.tail(e);
-    Node v=G.head(e);
+    Node u=G.source(e);
+    Node v=G.target(e);
     check( !bfs_test.reached(u) ||
 	   (bfs_test.dist(v) > bfs_test.dist(u)+1),
@@ -95,5 +95,5 @@
     if ( bfs_test.pred(v)!=INVALID ) {
       Edge e=bfs_test.pred(v);
-      Node u=G.tail(e);
+      Node u=G.source(e);
       check(u==bfs_test.predNode(v),"Wrong tree.");
       check(bfs_test.dist(v) - bfs_test.dist(u) == 1,
Index: src/test/dfs_test.cc
===================================================================
--- src/test/dfs_test.cc	(revision 959)
+++ src/test/dfs_test.cc	(revision 986)
@@ -84,5 +84,5 @@
     if ( dfs_test.pred(v)!=INVALID ) {
       Edge e=dfs_test.pred(v);
-      Node u=G.tail(e);
+      Node u=G.source(e);
       check(u==dfs_test.predNode(v),"Wrong tree.");
       check(dfs_test.dist(v) - dfs_test.dist(u) == 1,
Index: src/test/dijkstra_heap_test.cc
===================================================================
--- src/test/dijkstra_heap_test.cc	(revision 921)
+++ src/test/dijkstra_heap_test.cc	(revision 986)
@@ -74,9 +74,9 @@
   EdgeIt e;
   for(G.first(e); e!=INVALID; ++e) {
-    Node u=G.tail(e);
-    Node v=G.head(e);
+    Node u=G.source(e);
+    Node v=G.target(e);
     if ( dijkstra_test.dist(v) - dijkstra_test.dist(u) > cap[e] )
       if ( dijkstra_test.reached(u) ) {
-	std::cout<<"Error! dist(head)-dist(tail)- edge_length= " 
+	std::cout<<"Error! dist(target)-dist(source)- edge_length= " 
 		 <<dijkstra_test.dist(v) - dijkstra_test.dist(u) 
 	  - cap[e]<<std::endl;
@@ -89,5 +89,5 @@
     if ( dijkstra_test.reached(v) ) {
       Edge e=dijkstra_test.pred(v);
-      Node u=G.tail(e);
+      Node u=G.source(e);
       if ( dijkstra_test.dist(v) - dijkstra_test.dist(u) != cap[e] ) {
 	std::cout<<"Error in a shortest path tree edge! Difference: " 
@@ -123,9 +123,9 @@
 
   for(G.first(e); e!=INVALID; ++e) {
-    Node u=G.tail(e);
-    Node v=G.head(e);
+    Node u=G.source(e);
+    Node v=G.target(e);
     if ( dijkstra_test2.dist(v) - dijkstra_test2.dist(u) > cap[e] )
       if ( dijkstra_test2.reached(u) ) {
-	std::cout<<"Error! dist(head)-dist(tail)- edge_length= " 
+	std::cout<<"Error! dist(target)-dist(source)- edge_length= " 
 		 <<dijkstra_test2.dist(v) - dijkstra_test2.dist(u) 
 	  - cap[e]<<std::endl;
@@ -137,5 +137,5 @@
     if ( dijkstra_test2.reached(v) ) {
       Edge e=dijkstra_test2.pred(v);
-      Node u=G.tail(e);
+      Node u=G.source(e);
       if ( dijkstra_test2.dist(v) - dijkstra_test2.dist(u) != cap[e] ) {
 	std::cout<<"Error in a shortest path tree edge! Difference: " 
Index: src/test/dijkstra_test.cc
===================================================================
--- src/test/dijkstra_test.cc	(revision 959)
+++ src/test/dijkstra_test.cc	(revision 986)
@@ -94,9 +94,9 @@
 
   for(EdgeIt e(G); e!=INVALID; ++e) {
-    Node u=G.tail(e);
-    Node v=G.head(e);
+    Node u=G.source(e);
+    Node v=G.target(e);
     check( !dijkstra_test.reached(u) ||
 	   (dijkstra_test.dist(v) - dijkstra_test.dist(u) <= cap[e]),
-	   "dist(head)-dist(tail)- edge_length= " 
+	   "dist(target)-dist(source)- edge_length= " 
 	   << dijkstra_test.dist(v) - dijkstra_test.dist(u) 
 	   - cap[e]);
@@ -108,5 +108,5 @@
     if ( dijkstra_test.pred(v)!=INVALID ) {
       Edge e=dijkstra_test.pred(v);
-      Node u=G.tail(e);
+      Node u=G.source(e);
       check(u==dijkstra_test.predNode(v),"Wrong tree.");
       check(dijkstra_test.dist(v) - dijkstra_test.dist(u) == cap[e],
Index: src/test/graph_factory_test.cc
===================================================================
--- src/test/graph_factory_test.cc	(revision 959)
+++ src/test/graph_factory_test.cc	(revision 986)
@@ -29,5 +29,5 @@
 This test makes consistency checks of list graph structures.
 
-G.addNode(), G.addEdge(), G.tail(), G.head()
+G.addNode(), G.addEdge(), G.source(), G.target()
 
 \todo Checks for empty graphs and isolated points.
@@ -49,5 +49,5 @@
 
   for(typename std::vector<Edge>::iterator p=ee.begin();p!=ee.end();p++)
-    G.addEdge(G.head(*p),G.tail(*p));
+    G.addEdge(G.target(*p),G.source(*p));
 }
 
Index: src/test/graph_test.h
===================================================================
--- src/test/graph_test.h	(revision 946)
+++ src/test/graph_test.h	(revision 986)
@@ -54,5 +54,5 @@
     for(int i=0;i<nn;i++) {
       check(e!=INVALID,"Wrong OutEdge list linking.");
-      check(n==G.tail(e), "Wrong OutEdge list linking.");
+      check(n==G.source(e), "Wrong OutEdge list linking.");
       ++e;
     }
@@ -66,5 +66,5 @@
     for(int i=0;i<nn;i++) {
       check(e!=INVALID,"Wrong InEdge list linking.");
-      check(n==G.head(e), "Wrong InEdge list linking.");
+      check(n==G.target(e), "Wrong InEdge list linking.");
       ++e;
     }
@@ -82,5 +82,5 @@
 
   ///\file
-  ///\todo Check head(), tail() as well;
+  ///\todo Check target(), source() as well;
 
   
Index: src/test/path_test.cc
===================================================================
--- src/test/path_test.cc	(revision 959)
+++ src/test/path_test.cc	(revision 986)
@@ -48,11 +48,11 @@
   P.clear();                      //void clear() {}
 
-  gn=P.head();                    //GraphNode/*It*/ head() const {return INVALID;}
-  gn=P.tail();                    //GraphNode/*It*/ tail() const {return INVALID;}
+  gn=P.target();                    //GraphNode/*It*/ target() const {return INVALID;}
+  gn=P.source();                    //GraphNode/*It*/ source() const {return INVALID;}
 
   ei=P.first(ei);                 //It& first(It &i) const { return i=It(*this); }
 
-  ni=P.head(ei);                  //NodeIt head(const EdgeIt& e) const {}
-  ni=P.tail(ei);                  //NodeIt tail(const EdgeIt& e) const {}
+  ni=P.target(ei);                  //NodeIt target(const EdgeIt& e) const {}
+  ni=P.source(ei);                  //NodeIt source(const EdgeIt& e) const {}
 
 
Index: src/test/preflow_test.cc
===================================================================
--- src/test/preflow_test.cc	(revision 959)
+++ src/test/preflow_test.cc	(revision 986)
@@ -68,5 +68,5 @@
   int c=0;
   for(SmartGraph::EdgeIt e(g); e!=INVALID; ++e) {
-    if (cut[g.tail(e)] && !cut[g.head(e)]) c+=cap[e];
+    if (cut[g.source(e)] && !cut[g.target(e)]) c+=cap[e];
   }
   return c;
Index: src/test/sym_graph_test.cc
===================================================================
--- src/test/sym_graph_test.cc	(revision 959)
+++ src/test/sym_graph_test.cc	(revision 986)
@@ -31,5 +31,5 @@
 This test makes consistency checks of list graph structures.
 
-G.addNode(), G.addEdge(), G.tail(), G.head()
+G.addNode(), G.addEdge(), G.source(), G.target()
 
 \todo Checks for empty graphs and isolated points.
Index: src/test/sym_graph_test.h
===================================================================
--- src/test/sym_graph_test.h	(revision 959)
+++ src/test/sym_graph_test.h	(revision 986)
@@ -74,6 +74,6 @@
 	SymEdge se;
 	se=INVALID;
-	n=G.tail(se);
-	n=G.head(se);
+	n=G.source(se);
+	n=G.target(se);
       }
       // id tests
@@ -175,5 +175,5 @@
 
   ///\file
-  ///\todo Check head(), tail() as well;
+  ///\todo Check target(), source() as well;
 
   
Index: src/test/test_tools.h
===================================================================
--- src/test/test_tools.h	(revision 978)
+++ src/test/test_tools.h	(revision 986)
@@ -106,5 +106,5 @@
 
   for(typename std::vector<Edge>::iterator p=ee.begin();p!=ee.end();p++)
-    G.addEdge(G.head(*p),G.tail(*p));
+    G.addEdge(G.target(*p),G.source(*p));
 }
 
Index: src/work/alpar/bfs-named-param.cc
===================================================================
--- src/work/alpar/bfs-named-param.cc	(revision 945)
+++ src/work/alpar/bfs-named-param.cc	(revision 986)
@@ -11,32 +11,37 @@
 struct _BFS_CUSTOM_VIS {};
 
-template<class GT,class VT,class DVT,class PNT,class PET,class PT >
-class _BFS 
+
+class _Bfs_Traits 
+{
+  typedef ListGraph Graph;
+}
+
+template<class T>
+class _Bfs 
 {
  public:
-  typedef GT Graph;
-  typedef VT Visited;
-  typedef PNT PredNode;
-  typedef PET PredEdge;
-  typedef PT Priority;
-  //  typedef QDT QueueData;
+  typedef typename T::Graph Graph;
+  typedef typename T::Reached Reached;
+  typedef typename T::PredNode PredNode;
+  typedef typename T::PredEdge PredEdge;
+  typedef typename T::Priority Priority;
+  
+  typedef typename T::DefaultReachedTag DefaultReachedTag;
   
   typedef typename Graph::Node Node;
   typedef typename Graph::OutEdgeIt OutEdgeIt;
 
-  typedef DVT DefaultVisitedTag;
-  
   const Graph &_graph;
 
   Node _source;
   
-  Visited *_visited;
+  Reached *_visited;
   PredNode _predNode;
   PredEdge _predEdge;
   Priority _priority;
 
-  _BFS(const Graph &g,
+  _Bfs(const Graph &g,
        Node s,
-       Visited *v,
+       Reached *v,
        PredNode &pn,
        PredEdge &pe,
@@ -46,5 +51,5 @@
 
   
-  int run(const _BFS_CUSTOM_VIS &) 
+  int run(const _Bfs_CUSTOM_VIS &) 
   {
     using namespace std;
@@ -64,5 +69,5 @@
       Node n=Q[Qt++];
       for(OutEdgeIt e(_graph,n);e!=INVALID;++e)
-	if(!(*_visited)[m=_graph.head(e)]) {
+	if(!(*_visited)[m=_graph.target(e)]) {
 	  Q[Qh++]=m;
 	  _visited->set(m,true);
@@ -76,23 +81,23 @@
   int run(const _BFS_DEFAULT_VIS &) 
   {
-    _visited= new Visited(_graph);
+    _visited= new Reached(_graph);
     int r = run(_BFS_CUSTOM_VIS());
     delete _visited;
     return r;
   }
-  int run() { return run(DefaultVisitedTag());}
-
-  template<class T> _BFS<Graph,T,_BFS_CUSTOM_VIS,PredNode,PredEdge,Priority>
+  int run() { return run(DefaultReachedTag());}
+
+  template<class T> _Bfs<Graph,T,_BFS_CUSTOM_VIS,PredNode,PredEdge,Priority>
   setVisitMap(T &t)
   {
-    return _BFS<Graph,T,_BFS_CUSTOM_VIS,PredNode,PredEdge,Priority>
+    return _Bfs<Graph,T,_BFS_CUSTOM_VIS,PredNode,PredEdge,Priority>
       (_graph,_source,&t,_predNode,_predEdge,_priority);
   }
 
   template<class T>
-  _BFS<Graph,Visited,DefaultVisitedTag,T,PredEdge,Priority>
+  _Bfs<Graph,Reached,DefaultReachedTag,T,PredEdge,Priority>
   setPredNodeMap(T &t)
   {
-    return _BFS<Graph,Visited,DefaultVisitedTag,T,PredEdge,Priority>
+    return _BFS<Graph,Reached,DefaultReachedTag,T,PredEdge,Priority>
       (_graph,_source,
        _visited,
@@ -101,8 +106,8 @@
 
   template<class T>
-  _BFS<Graph,Visited,DefaultVisitedTag,PredNode,T,Priority>
+  _BFS<Graph,Reached,DefaultReachedTag,PredNode,T,Priority>
   setPredEdgeMap(T &t)
   {
-    return _BFS<Graph,Visited,DefaultVisitedTag,PredNode,T,Priority>
+    return _BFS<Graph,Reached,DefaultReachedTag,PredNode,T,Priority>
       (_graph,_source,
        _visited,
@@ -110,8 +115,8 @@
   }
 
-  _BFS<Graph,Visited,DefaultVisitedTag,PredNode,PredEdge,Priority>
+  _Bfs<Graph,Reached,DefaultReachedTag,PredNode,PredEdge,Priority>
   setNothing()
   {
-    return _BFS<Graph,Visited,DefaultVisitedTag,PredNode,PredEdge,Priority>
+    return _Bfs<Graph,Reached,DefaultReachedTag,PredNode,PredEdge,Priority>
       (_graph,_source,
        _visited,
@@ -122,5 +127,5 @@
 
 template<class G>
-_BFS<G,
+_Bfs<G,
      typename G::template NodeMap<bool>,
      _BFS_DEFAULT_VIS,
@@ -132,5 +137,5 @@
   //  typename G::template NodeMap<bool> v(g);
 
-  return _BFS < G,
+  return _Bfs < G,
     typename G::template NodeMap<bool>,
     _BFS_DEFAULT_VIS,
@@ -147,9 +152,9 @@
 
 
-class MyVisitedMap : public SmartGraph::NodeMap<bool>
+class MyReachedMap : public SmartGraph::NodeMap<bool>
 {
   const SmartGraph &_G;
 public:
-  MyVisitedMap(const SmartGraph &G) : SmartGraph::NodeMap<bool>(G), _G(G) {}
+  MyReachedMap(const SmartGraph &G) : SmartGraph::NodeMap<bool>(G), _G(G) {}
   void set(SmartGraph::Node n,bool b)
   {
@@ -181,5 +186,5 @@
   SmartGraph::NodeMap<SmartGraph::Edge> em(G);
 
-  MyVisitedMap vm(G);
+  MyReachedMap vm(G);
 
 
Index: src/work/alpar/boolmap_iter.cc
===================================================================
--- src/work/alpar/boolmap_iter.cc	(revision 921)
+++ src/work/alpar/boolmap_iter.cc	(revision 986)
@@ -120,12 +120,12 @@
 
   for(EdgeIt e(G);G.valid(e);G.next(e))
-    std::cout << G.id(G.tail(e)) << "->" << G.id(G.head(e))
+    std::cout << G.id(G.source(e)) << "->" << G.id(G.target(e))
       << ": " << map[e] << '\n';
   std::cout << "True Edges:\n";
   for(BoolIterEdgeMap<Graph>::TrueIterator i(map);i;++i)
-    std::cout << G.id(G.tail(i)) << "->" << G.id(G.head(i)) << '\n';
+    std::cout << G.id(G.source(i)) << "->" << G.id(G.target(i)) << '\n';
   std::cout << "False Edges:\n";
   for(BoolIterEdgeMap<Graph>::FalseIterator i(map);i;++i)
-    std::cout << G.id(G.tail(i)) << "->" << G.id(G.head(i)) << '\n';
+    std::cout << G.id(G.source(i)) << "->" << G.id(G.target(i)) << '\n';
 }
 
Index: src/work/alpar/dijkstra.h
===================================================================
--- src/work/alpar/dijkstra.h	(revision 967)
+++ src/work/alpar/dijkstra.h	(revision 986)
@@ -394,5 +394,5 @@
 	
 	for(OutEdgeIt e(*G,v); e!=INVALID; ++e) {
-	  Node w=G->head(e); 
+	  Node w=G->target(e); 
 	  switch(heap.state(w)) {
 	  case Heap::PRE_HEAP:
Index: src/work/alpar/f_ed_ka.h
===================================================================
--- src/work/alpar/f_ed_ka.h	(revision 921)
+++ src/work/alpar/f_ed_ka.h	(revision 986)
@@ -85,15 +85,15 @@
       c.get(tree.get(t))-f.get(tree.get(t)) : f.get(tree.get(t));
     //FIXME: I would need 'G.opposite(e,n)'
-    gn = visited.get(t)==1 ? G.tail(tree.get(t)) : G.head(tree.get(t));
+    gn = visited.get(t)==1 ? G.source(tree.get(t)) : G.target(tree.get(t));
     while(gn!=s) if(visited.get(gn)==1)
       {
 	//FIXME: nonstandard gcc extension!
 	aug_val <?= c.get(tree.get(gn))-f.get(tree.get(gn));
-	gn=G.tail(tree.get(gn));
+	gn=G.source(tree.get(gn));
       }
     else {
       //FIXME: nonstandard gcc extension!
       aug_val <?= f.get(tree.get(gn));
-      gn=G.head(tree.get(gn));
+      gn=G.target(tree.get(gn));
     }
 	
@@ -103,9 +103,9 @@
       {
 	f.set(tree.get(gn),f.get(tree.get(gn))+aug_val);
-	gn=G.tail(tree.get(gn));
+	gn=G.source(tree.get(gn));
       }
     else {
       f.set(tree.get(gn),f.get(tree.get(gn))-aug_val);
-      gn=G.head(tree.get(gn));
+      gn=G.target(tree.get(gn));
     }
 
Index: src/work/alpar/f_ed_ka_demo.cc
===================================================================
--- src/work/alpar/f_ed_ka_demo.cc	(revision 921)
+++ src/work/alpar/f_ed_ka_demo.cc	(revision 986)
@@ -42,5 +42,5 @@
   //std::cout << "maximum flow: "<< std::endl;
   //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) { 
-  //  std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+  //  std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
   //}
   //std::cout<<std::endl;
Index: src/work/alpar/graph.h
===================================================================
--- src/work/alpar/graph.h	(revision 253)
+++ src/work/alpar/graph.h	(revision 986)
@@ -107,8 +107,8 @@
       // Lehet, hogy ez a ketto nem kell!!!
       
-      NodeIterator tail() const {NodeIterator i;i.G=G;i.n=e->From();return i;}
-      NodeIterator head() const {NodeIterator i;i.G=G;i.n=e->To();return i;}
+      NodeIterator source() const {NodeIterator i;i.G=G;i.n=e->From();return i;}
+      NodeIterator target() const {NodeIterator i;i.G=G;i.n=e->To();return i;}
       NodeIterator opposite(const NodeIterator &n) const
-      {return n==tail()?head():tail();}
+      {return n==source()?target():source();}
       
       bool valid() {return e;}
@@ -191,6 +191,6 @@
       {OutEdgeIterator tmp(*this); goNext(); return tmp;}
       
-      NodeIterator aNode() const {return tail();}
-      NodeIterator bNode() const {return head();}
+      NodeIterator aNode() const {return source();}
+      NodeIterator bNode() const {return target();}
       
       operator const InEdgeIterator ()
@@ -219,5 +219,5 @@
       
       NodeIterator aNode() const {return n;}
-      NodeIterator bNode() const {return n.n==tail().n?head():tail();}
+      NodeIterator bNode() const {return n.n==source().n?target():source();}
       
       operator const InEdgeIterator ()
@@ -255,5 +255,5 @@
       
       NodeIterator aNode() const {return n;}
-      NodeIterator bNode() const {return n.n==tail().n?head():tail();}
+      NodeIterator bNode() const {return n.n==source().n?target():source();}
       
       operator const EdgeIterator ()
@@ -464,6 +464,6 @@
     {
       return n?
-	reversed[n-1]?path[n-1].tail():path[n-1].head():
-	reversed[0]?path[0].head():path[0].tail();
+	reversed[n-1]?path[n-1].source():path[n-1].target():
+	reversed[0]?path[0].target():path[0].source();
     }
     void setRevert(int n,bool r=true) {reversed[n]=r;}
@@ -471,5 +471,5 @@
     {
       path[n]=i;
-      reversed[n] = i.head()==i.aNode();
+      reversed[n] = i.target()==i.aNode();
     }
     void setEdge(int n,EdgeIterator i,bool r)
@@ -479,6 +479,6 @@
     }
 
-    NodeIterator tail() { return getNode(0); }
-    NodeIterator head() { return getNode(getLength()); }
+    NodeIterator source() { return getNode(0); }
+    NodeIterator target() { return getNode(getLength()); }
   };
   
Index: src/work/alpar/gwrapper.h
===================================================================
--- src/work/alpar/gwrapper.h	(revision 921)
+++ src/work/alpar/gwrapper.h	(revision 986)
@@ -28,8 +28,8 @@
   template<typename I> I &goNext(I &i); { return graph->goNext(i); }
 
-  NodeIt head(const EdgeIt &e);
-  { return graph->head(e); }
-  NodeIt tail(const EdgeIt &e);
-  { return graph->tail(e); }
+  NodeIt target(const EdgeIt &e);
+  { return graph->target(e); }
+  NodeIt source(const EdgeIt &e);
+  { return graph->source(e); }
   
   template<typename I> NodeIt aNode(const I e);
@@ -84,8 +84,8 @@
   template<typename I> I &goNext(I &i); { return graph->goNext(i); }
 
-  NodeIt head(const EdgeIt &e);
-  { return graph->tail(e); }
-  NodeIt tail(const EdgeIt &e);
-  { return graph->head(e); }
+  NodeIt target(const EdgeIt &e);
+  { return graph->source(e); }
+  NodeIt source(const EdgeIt &e);
+  { return graph->target(e); }
   
   template<typename I> NodeIt aNode(const I e);
@@ -138,8 +138,8 @@
 //   template<typename I> I &goNext(I &i); { return graph->goNext(i); }
 
-  NodeIt head(const EdgeIt &e);
-  { return G::tail(e); }
-  NodeIt tail(const EdgeIt &e);
-  { return G::head(e); }
+  NodeIt target(const EdgeIt &e);
+  { return G::source(e); }
+  NodeIt source(const EdgeIt &e);
+  { return G::target(e); }
   
 //   template<typename I> NodeIt aNode(const I e);
@@ -195,8 +195,8 @@
   template<typename I> I &goNext(I &i); { return graph->goNext(i); }
 
-  NodeIt head(const EdgeIt &e);
-  { return graph->head(e); }
-  NodeIt tail(const EdgeIt &e);
-  { return graph->tail(e); }
+  NodeIt target(const EdgeIt &e);
+  { return graph->target(e); }
+  NodeIt source(const EdgeIt &e);
+  { return graph->source(e); }
   
   template<typename I> NodeIt aNode(const I e);
@@ -344,8 +344,8 @@
   template<typename I> I next(const I i); { return graph->goNext(i); }
 
-  NodeIt head(const EdgeIt &e);
-  { return graph->head(e); }
-  NodeIt tail(const EdgeIt &e);
-  { return graph->tail(e); }
+  NodeIt target(const EdgeIt &e);
+  { return graph->target(e); }
+  NodeIt source(const EdgeIt &e);
+  { return graph->source(e); }
   
   template<typename I> NodeIt aNode(const I e);
Index: src/work/alpar/list_graph_demo.cc
===================================================================
--- src/work/alpar/list_graph_demo.cc	(revision 959)
+++ src/work/alpar/list_graph_demo.cc	(revision 986)
@@ -112,8 +112,8 @@
     for(EdgeIt e(G);G.valid(e);G.next(e)) em[e]=G.id(e);
     for(EdgeIt e(G);G.valid(e);G.next(e))
-      if(G.tail(e)<G.head(e)) sm[e]=G.id(e);
+      if(G.source(e)<G.target(e)) sm[e]=G.id(e);
     
     for(EdgeIt e(G);G.valid(e);G.next(e))
-      std::cout << G.id(G.tail(e)) << "->" << G.id(G.head(e))
+      std::cout << G.id(G.source(e)) << "->" << G.id(G.target(e))
 		<< ": id=" << G.id(e) << " oppid=" << G.id(G.opposite(e))
 		<< " em=" << em[e]
Index: src/work/alpar/rw_nonref_map.cc
===================================================================
--- src/work/alpar/rw_nonref_map.cc	(revision 921)
+++ src/work/alpar/rw_nonref_map.cc	(revision 986)
@@ -24,6 +24,6 @@
     {
       ValueType tmp;
-      std::cout << G.id(G.tail(e)) << "->"
-		<< G.id(G.head(e)) << ": ";
+      std::cout << G.id(G.source(e)) << "->"
+		<< G.id(G.target(e)) << ": ";
       std::cin  >> tmp;
       return tmp;
@@ -31,6 +31,6 @@
     ValueType operator = (ValueType v) const
     {
-      std::cout << G.id(G.tail(e)) << "->"
-		<< G.id(G.head(e)) << ": " << v << '\n';
+      std::cout << G.id(G.source(e)) << "->"
+		<< G.id(G.target(e)) << ": " << v << '\n';
       return v;
     }
Index: src/work/alpar/smart_graph_demo.cc
===================================================================
--- src/work/alpar/smart_graph_demo.cc	(revision 921)
+++ src/work/alpar/smart_graph_demo.cc	(revision 986)
@@ -112,8 +112,8 @@
     for(EdgeIt e(G);G.valid(e);G.next(e)) em[e]=G.id(e);
     for(EdgeIt e(G);G.valid(e);G.next(e))
-      if(G.tail(e)<G.head(e)) sm[e]=G.id(e);
+      if(G.source(e)<G.target(e)) sm[e]=G.id(e);
     
     for(EdgeIt e(G);G.valid(e);G.next(e))
-      std::cout << G.id(G.tail(e)) << "->" << G.id(G.head(e))
+      std::cout << G.id(G.source(e)) << "->" << G.id(G.target(e))
 		<< ": id=" << G.id(e) << " oppid=" << G.id(G.opposite(e))
 		<< " em=" << em[e]
Index: src/work/athos/bfs_test.cc
===================================================================
--- src/work/athos/bfs_test.cc	(revision 921)
+++ src/work/athos/bfs_test.cc	(revision 986)
@@ -42,5 +42,5 @@
       OutEdgeIt e;
       for(g.first(e,v); g.valid(e); g.next(e)) {
-	Node w=g.head(e);
+	Node w=g.target(e);
 	if (!reached[w]) {
 	  bfs_queue.push(w);
Index: src/work/athos/dijkstra_demo.cc
===================================================================
--- src/work/athos/dijkstra_demo.cc	(revision 921)
+++ src/work/athos/dijkstra_demo.cc	(revision 986)
@@ -130,8 +130,8 @@
     std::cout << "out edges: ";
     for(out_edge_iterator j=flow_test.first_out_edge(i); j.valid(); ++j) 
-      std::cout << node_name.get(flow_test.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flow_test.head(j)) << " ";
+      std::cout << node_name.get(flow_test.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flow_test.target(j)) << " ";
     std::cout << "in edges: ";
     for(in_edge_iterator j=flow_test.first_in_edge(i); j.valid(); ++j) 
-      std::cout << node_name.get(flow_test.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flow_test.head(j)) << " ";
+      std::cout << node_name.get(flow_test.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flow_test.target(j)) << " ";
     std::cout << std::endl;
   }
Index: src/work/athos/mincostflow.h
===================================================================
--- src/work/athos/mincostflow.h	(revision 921)
+++ src/work/athos/mincostflow.h	(revision 986)
@@ -74,7 +74,7 @@
       ValueType operator[](typename ResGraph::Edge e) const {     
 	if (res_graph.forward(e))
-	  return  ol[e]-(pot[res_graph.head(e)]-pot[res_graph.tail(e)]);   
+	  return  ol[e]-(pot[res_graph.target(e)]-pot[res_graph.source(e)]);   
 	else
-	  return -ol[e]-(pot[res_graph.head(e)]-pot[res_graph.tail(e)]);   
+	  return -ol[e]-(pot[res_graph.target(e)]-pot[res_graph.source(e)]);   
       }     
 	
@@ -259,6 +259,6 @@
 	  while ( i != nonabundant_arcs.end() ){
 	    if (flow[*i]>=buf){
-	      Node a = abundant_components.find(res_graph.head(*i));
-	      Node b = abundant_components.find(res_graph.tail(*i));
+	      Node a = abundant_components.find(res_graph.target(*i));
+	      Node b = abundant_components.find(res_graph.source(*i));
 	      //Merge
 	      if (a != b){
@@ -285,5 +285,5 @@
 		  while (n!=non_root){
 		    e = bfs_pred[n];
-		    n = res_graph.tail(e);
+		    n = res_graph.source(e);
 		    res_graph.augment(e,qty_to_augment);
 		  }
@@ -455,5 +455,5 @@
       FOR_EACH_LOC(typename Graph::EdgeIt, e, graph){
 	//C^{\Pi}_{i,j}
-	mod_pot = cost[e]-potential[graph.head(e)]+potential[graph.tail(e)];
+	mod_pot = cost[e]-potential[graph.target(e)]+potential[graph.source(e)];
 	fl_e = flow[e];
 	//	std::cout << fl_e << std::endl;
@@ -484,6 +484,6 @@
 	  return false;
 	}
-	supdem[graph.tail(e)] += flow[e];
-	supdem[graph.head(e)] -= flow[e];
+	supdem[graph.source(e)] += flow[e];
+	supdem[graph.target(e)] -= flow[e];
       }
       //write_property_vector(supdem, "supdem");
Index: src/work/athos/old/minlengthpaths.h
===================================================================
--- src/work/athos/old/minlengthpaths.h	(revision 921)
+++ src/work/athos/old/minlengthpaths.h	(revision 986)
@@ -54,8 +54,8 @@
 	
       ValueType operator[](typename ResGraphType::Edge e) const {     
-	//if ( (1-2*rev[e])*ol[e]-(pot[G.head(e)]-pot[G.tail(e)] ) <0 ){
+	//if ( (1-2*rev[e])*ol[e]-(pot[G.target(e)]-pot[G.source(e)] ) <0 ){
 	//  std::cout<<"Negative length!!"<<std::endl;
 	//}
-	return (1-2*rev[e])*ol[e]-(pot[G.head(e)]-pot[G.tail(e)]);   
+	return (1-2*rev[e])*ol[e]-(pot[G.target(e)]-pot[G.source(e)]);   
       }     
 	
@@ -162,5 +162,5 @@
 	    G.next(e);
 	  }
-	  n = G.head(e);
+	  n = G.target(e);
 	  paths[j].push_back(e);
 	  total_length += length[e];
Index: src/work/athos/preflow_push_wogw.h
===================================================================
--- src/work/athos/preflow_push_wogw.h	(revision 921)
+++ src/work/athos/preflow_push_wogw.h	(revision 986)
@@ -140,5 +140,5 @@
     //This private procedure is supposed to modify the preflow on edge j
     //by value v (which can be positive or negative as well) 
-    //and maintain the excess on the head and tail
+    //and maintain the excess on the target and source
     //Here we do not check whether this is possible or not
     void modify_preflow(Edge j, const T& v){
@@ -148,9 +148,9 @@
 
 
-      //Modifiyng the head
-      modify_excess(G.head(j),v);
-	
-      //Modifiyng the tail
-      modify_excess(G.tail(j),-v);
+      //Modifiyng the target
+      modify_excess(G.target(j),v);
+	
+      //Modifiyng the source
+      modify_excess(G.source(j),-v);
 
     }
@@ -273,5 +273,5 @@
 	InEdgeIt e;
 	for(G.first(e,v); G.valid(e); G.next(e)) {
-	  Node w=G.tail(e);
+	  Node w=G.source(e);
 	  if ( level[w] == number_of_nodes && w != s ) {
 	    bfs_queue.push(w);
@@ -311,6 +311,6 @@
       for(OutEdgeIt j=G.template first<OutEdgeIt>(s); G.valid(j); G.next(j)){ 
 	modify_preflow(j,capacity[j] );
-	make_active(G.head(j));
-	int lev=level[G.head(j)];
+	make_active(G.target(j));
+	int lev=level[G.target(j)];
 	if(highest_active<lev){
 	  highest_active=lev;
@@ -326,10 +326,10 @@
 
       if (capacity[j]>preflow[j]){
-	if(level[G.tail(j)]==level[G.head(j)]+1){
+	if(level[G.source(j)]==level[G.target(j)]+1){
 	  return true;
 	}
 	else{
-	  if (level[G.head(j)] < new_level)
-	    new_level=level[G.head(j)];
+	  if (level[G.target(j)] < new_level)
+	    new_level=level[G.target(j)];
 	}
       }
@@ -342,11 +342,11 @@
       
       if (0<preflow[j]){
-	if(level[G.tail(j)]==level[G.head(j)]-1){
+	if(level[G.source(j)]==level[G.target(j)]-1){
 	 
 	  return true;
 	}
 	else{
-	  if (level[G.tail(j)] < new_level)
-	    new_level=level[G.tail(j)];
+	  if (level[G.source(j)] < new_level)
+	    new_level=level[G.source(j)];
 	}
 	
@@ -389,6 +389,6 @@
 	      e -= v;
 	      //New node might become active
-	      if (excess[G.head(j)]==0){
-		make_active(G.head(j));
+	      if (excess[G.target(j)]==0){
+		make_active(G.target(j));
 	      }
 	      modify_preflow(j,v);
@@ -405,6 +405,6 @@
 	      e -= v;
 	      //New node might become active
-	      if (excess[G.tail(j)]==0){
-		make_active(G.tail(j));
+	      if (excess[G.source(j)]==0){
+		make_active(G.source(j));
 	      }
 	      modify_preflow(j,-v);
Index: src/work/deba/list_graph.h
===================================================================
--- src/work/deba/list_graph.h	(revision 921)
+++ src/work/deba/list_graph.h	(revision 986)
@@ -44,5 +44,5 @@
     struct EdgeT 
     {
-      int head, tail;
+      int target, source;
       int prev_in, prev_out;
       int next_in, next_out;
@@ -105,12 +105,12 @@
     int maxEdgeId() const { return edges.size(); }  //FIXME: What is this?
 
-    Node tail(Edge e) const { return edges[e.n].tail; }
-    Node head(Edge e) const { return edges[e.n].head; }
-
-    Node aNode(OutEdgeIt e) const { return edges[e.n].tail; }
-    Node aNode(InEdgeIt e) const { return edges[e.n].head; }
-
-    Node bNode(OutEdgeIt e) const { return edges[e.n].head; }
-    Node bNode(InEdgeIt e) const { return edges[e.n].tail; }
+    Node source(Edge e) const { return edges[e.n].source; }
+    Node target(Edge e) const { return edges[e.n].target; }
+
+    Node aNode(OutEdgeIt e) const { return edges[e.n].source; }
+    Node aNode(InEdgeIt e) const { return edges[e.n].target; }
+
+    Node bNode(OutEdgeIt e) const { return edges[e.n].target; }
+    Node bNode(InEdgeIt e) const { return edges[e.n].source; }
 
     NodeIt& first(NodeIt& v) const { 
@@ -152,5 +152,5 @@
       else {
 	int n;
-	for(n=nodes[edges[it.n].head].next;
+	for(n=nodes[edges[it.n].target].next;
 	    n!=-1 && nodes[n].first_in == -1;
 	    n = nodes[n].next) ;
@@ -208,5 +208,5 @@
       }
       
-      edges[n].tail = u.n; edges[n].head = v.n;
+      edges[n].source = u.n; edges[n].target = v.n;
 
       edges[n].next_out = nodes[u.n].first_out;
@@ -233,5 +233,5 @@
       if(edges[n].prev_in!=-1)
 	edges[edges[n].prev_in].next_in = edges[n].next_in;
-      else nodes[edges[n].head].first_in = edges[n].next_in;
+      else nodes[edges[n].target].first_in = edges[n].next_in;
       
       if(edges[n].next_out!=-1)
@@ -239,5 +239,5 @@
       if(edges[n].prev_out!=-1)
 	edges[edges[n].prev_out].next_out = edges[n].next_out;
-      else nodes[edges[n].tail].first_out = edges[n].next_out;
+      else nodes[edges[n].source].first_out = edges[n].next_out;
       
       edges[n].next_in = first_free_edge;
Index: src/work/jacint/max_flow.h
===================================================================
--- src/work/jacint/max_flow.h	(revision 921)
+++ src/work/jacint/max_flow.h	(revision 986)
@@ -327,5 +327,5 @@
 	OutEdgeIt e;
 	for(g->first(e,w) ; g->valid(e); g->next(e)) {
-	  Node v=g->head(e);
+	  Node v=g->target(e);
 	  if (!M[v] && (*flow)[e] < (*capacity)[e] ) {
 	    queue.push(v);
@@ -336,5 +336,5 @@
 	InEdgeIt f;
 	for(g->first(f,w) ; g->valid(f); g->next(f)) {
-	  Node v=g->tail(f);
+	  Node v=g->source(f);
 	  if (!M[v] && (*flow)[f] > 0 ) {
 	    queue.push(v);
@@ -371,5 +371,5 @@
 	InEdgeIt e;
 	for(g->first(e,w) ; g->valid(e); g->next(e)) {
-	  Node v=g->tail(e);
+	  Node v=g->source(e);
 	  if (M[v] && (*flow)[e] < (*capacity)[e] ) {
 	    queue.push(v);
@@ -380,5 +380,5 @@
 	OutEdgeIt f;
 	for(g->first(f,w) ; g->valid(f); g->next(f)) {
-	  Node v=g->head(f);
+	  Node v=g->target(f);
 	  if (M[v] && (*flow)[f] > 0 ) {
 	    queue.push(v);
@@ -434,5 +434,5 @@
 
 	if ( (*flow)[e] >= (*capacity)[e] ) continue;
-	Node v=g->head(e);
+	Node v=g->target(e);
 
 	if( lev > level[v] ) { //Push is allowed now
@@ -467,5 +467,5 @@
 
 	  if( (*flow)[e] <= 0 ) continue;
-	  Node v=g->tail(e);
+	  Node v=g->source(e);
 
 	  if( lev > level[v] ) { //Push is allowed now
@@ -522,5 +522,5 @@
 	    InEdgeIt e;
 	    for(g->first(e,v); g->valid(e); g->next(e)) {
-	      Node w=g->tail(e);
+	      Node w=g->source(e);
 	      if ( level[w] == n && w != s ) {
 		bfs_queue.push(w);
@@ -540,5 +540,5 @@
 	      Num c=(*capacity)[e];
 	      if ( c <= 0 ) continue;
-	      Node w=g->head(e);
+	      Node w=g->target(e);
 	      if ( level[w] < n ) {
 		if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w);
@@ -567,5 +567,5 @@
 	    for(g->first(e,v); g->valid(e); g->next(e)) {
 	      if ( (*capacity)[e] <= (*flow)[e] ) continue;
-	      Node w=g->tail(e);
+	      Node w=g->source(e);
 	      if ( level[w] == n && w != s ) {
 		bfs_queue.push(w);
@@ -581,5 +581,5 @@
 	    for(g->first(f,v); g->valid(f); g->next(f)) {
 	      if ( 0 >= (*flow)[f] ) continue;
-	      Node w=g->head(f);
+	      Node w=g->target(f);
 	      if ( level[w] == n && w != s ) {
 		bfs_queue.push(w);
@@ -600,5 +600,5 @@
 	      Num rem=(*capacity)[e]-(*flow)[e];
 	      if ( rem <= 0 ) continue;
-	      Node w=g->head(e);
+	      Node w=g->target(e);
 	      if ( level[w] < n ) {
 		if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w);
@@ -612,5 +612,5 @@
 	    {
 	      if ( (*flow)[f] <= 0 ) continue;
-	      Node w=g->tail(f);
+	      Node w=g->source(f);
 	      if ( level[w] < n ) {
 		if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w);
@@ -711,7 +711,7 @@
       // 	return dist[n]; }
       //       bool get(const typename MapGraphWrapper::Edge& e) const {
-      // 	return (dist.get(g->tail(e))<dist.get(g->head(e))); }
+      // 	return (dist.get(g->source(e))<dist.get(g->target(e))); }
       bool operator[](const typename MapGraphWrapper::Edge& e) const {
-	return (dist[g->tail(e)]<dist[g->head(e)]);
+	return (dist[g->source(e)]<dist[g->target(e)]);
       }
     };
@@ -861,5 +861,5 @@
       for(g->first(e,v); g->valid(e); g->next(e)) {
 	if ( (*capacity)[e] <= (*flow)[e] ) continue;
-	Node u=g->tail(e);
+	Node u=g->source(e);
 	if ( level[u] >= n ) {
 	  bfs_queue.push(u);
@@ -872,5 +872,5 @@
       for(g->first(f,v); g->valid(f); g->next(f)) {
 	if ( 0 >= (*flow)[f] ) continue;
-	Node u=g->head(f);
+	Node u=g->target(f);
 	if ( level[u] >= n ) {
 	  bfs_queue.push(u);
@@ -926,6 +926,6 @@
       ResGWOutEdgeIt e=bfs;
       if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	Node v=res_graph.tail(e);
-	Node w=res_graph.head(e);
+	Node v=res_graph.source(e);
+	Node w=res_graph.target(e);
 	pred.set(w, e);
 	if (res_graph.valid(pred[v])) {
@@ -934,5 +934,5 @@
 	  free.set(w, res_graph.resCap(e));
 	}
-	if (res_graph.head(e)==t) { _augment=true; break; }
+	if (res_graph.target(e)==t) { _augment=true; break; }
       }
 
@@ -946,5 +946,5 @@
 	ResGWEdge e=pred[n];
 	res_graph.augment(e, augment_value);
-	n=res_graph.tail(e);
+	n=res_graph.source(e);
       }
     }
@@ -984,6 +984,6 @@
       ResGWOutEdgeIt e=bfs;
       if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	Node v=res_graph.tail(e);
-	Node w=res_graph.head(e);
+	Node v=res_graph.source(e);
+	Node w=res_graph.target(e);
 	pred.set(w, e);
 	if (res_graph.valid(pred[v])) {
@@ -992,5 +992,5 @@
 	  free.set(w, res_graph.resCap(e));
 	}
-	if (res_graph.head(e)==t) { _augment=true; break; }
+	if (res_graph.target(e)==t) { _augment=true; break; }
       }
 
@@ -1004,5 +1004,5 @@
 	ResGWEdge e=pred[n];
 	res_graph.augment(e, augment_value);
-	n=res_graph.tail(e);
+	n=res_graph.source(e);
       }
     }
@@ -1051,7 +1051,7 @@
       if (res_graph.valid(e)) {
 	if (bfs.isBNodeNewlyReached()) {
-	  dist.set(res_graph.head(e), dist[res_graph.tail(e)]+1);
-	  typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)],
-					res_graph_to_F[res_graph.head(e)]);
+	  dist.set(res_graph.target(e), dist[res_graph.source(e)]+1);
+	  typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)],
+					res_graph_to_F[res_graph.target(e)]);
 	  original_edge.update();
 	  original_edge.set(f, e);
@@ -1059,7 +1059,7 @@
 	  residual_capacity.set(f, res_graph.resCap(e));
 	} else {
-	  if (dist[res_graph.head(e)]==(dist[res_graph.tail(e)]+1)) {
-	    typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)],
-					  res_graph_to_F[res_graph.head(e)]);
+	  if (dist[res_graph.target(e)]==(dist[res_graph.source(e)]+1)) {
+	    typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)],
+					  res_graph_to_F[res_graph.target(e)]);
 	    original_edge.update();
 	    original_edge.set(f, e);
@@ -1115,5 +1115,5 @@
 	  typename MG::Edge e=pred[n];
 	  res_graph.augment(original_edge[e], augment_value);
-	  n=F.tail(e);
+	  n=F.source(e);
 	  if (residual_capacity[e]==augment_value)
 	    F.erase(e);
@@ -1148,5 +1148,5 @@
       ResGWOutEdgeIt e=bfs;
       if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	dist.set(res_graph.head(e), dist[res_graph.tail(e)]+1);
+	dist.set(res_graph.target(e), dist[res_graph.source(e)]+1);
       }
       ++bfs;
@@ -1248,5 +1248,5 @@
 	  typename ErasingResGW::OutEdgeIt e=pred[n];
 	  res_graph.augment(e, augment_value);
-	  n=erasing_res_graph.tail(e);
+	  n=erasing_res_graph.source(e);
 	  if (res_graph.resCap(e)==0)
 	    erasing_res_graph.erase(e);
Index: src/work/jacint/max_flow_bug.cc
===================================================================
--- src/work/jacint/max_flow_bug.cc	(revision 921)
+++ src/work/jacint/max_flow_bug.cc	(revision 986)
@@ -43,5 +43,5 @@
   EdgeIt e;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut[G.tail(e)] && !mincut[G.head(e)]) min_min_cut_value+=cap[e];
+    if (mincut[G.source(e)] && !mincut[G.target(e)]) min_min_cut_value+=cap[e];
   }
 
@@ -50,5 +50,5 @@
   int min_cut_value=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut[G.tail(e)] && !cut[G.head(e)]) 
+    if (cut[G.source(e)] && !cut[G.target(e)]) 
       min_cut_value+=cap[e];
   }
@@ -58,5 +58,5 @@
   int max_min_cut_value=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut[G.tail(e)] && !maxcut[G.head(e)]) 
+    if (maxcut[G.source(e)] && !maxcut[G.target(e)]) 
       max_min_cut_value+=cap[e];
       }
@@ -89,5 +89,5 @@
   int min_min_cut_value2=0;
     for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut2[G.tail(e)] && !mincut2[G.head(e)]) min_min_cut_value2+=cap[e];
+    if (mincut2[G.source(e)] && !mincut2[G.target(e)]) min_min_cut_value2+=cap[e];
   }
 
@@ -96,5 +96,5 @@
   int min_cut_value2=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut2[G.tail(e)] && !cut2[G.head(e)]) 
+    if (cut2[G.source(e)] && !cut2[G.target(e)]) 
       min_cut_value2+=cap[e];
   }
@@ -104,5 +104,5 @@
   int max_min_cut_value2=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut2[G.tail(e)] && !maxcut2[G.head(e)]) 
+    if (maxcut2[G.source(e)] && !maxcut2[G.target(e)]) 
       max_min_cut_value2+=cap[e];
       }
@@ -128,5 +128,5 @@
   int min_min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut3[G.tail(e)] && !mincut3[G.head(e)]) min_min_cut_value3+=cap[e];
+    if (mincut3[G.source(e)] && !mincut3[G.target(e)]) min_min_cut_value3+=cap[e];
   }
 
@@ -135,5 +135,5 @@
   int min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut3[G.tail(e)] && !cut3[G.head(e)]) 
+    if (cut3[G.source(e)] && !cut3[G.target(e)]) 
       min_cut_value3+=cap[e];
   }
@@ -143,5 +143,5 @@
   int max_min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut3[G.tail(e)] && !maxcut3[G.head(e)]) 
+    if (maxcut3[G.source(e)] && !maxcut3[G.target(e)]) 
       max_min_cut_value3+=cap[e];
   }
Index: src/work/jacint/max_flow_test.cc
===================================================================
--- src/work/jacint/max_flow_test.cc	(revision 921)
+++ src/work/jacint/max_flow_test.cc	(revision 986)
@@ -46,5 +46,5 @@
   EdgeIt e;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut[G.tail(e)] && !mincut[G.head(e)]) min_min_cut_value+=cap[e];
+    if (mincut[G.source(e)] && !mincut[G.target(e)]) min_min_cut_value+=cap[e];
   }
 
@@ -53,5 +53,5 @@
   int min_cut_value=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut[G.tail(e)] && !cut[G.head(e)]) 
+    if (cut[G.source(e)] && !cut[G.target(e)]) 
       min_cut_value+=cap[e];
   }
@@ -61,5 +61,5 @@
   int max_min_cut_value=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut[G.tail(e)] && !maxcut[G.head(e)]) 
+    if (maxcut[G.source(e)] && !maxcut[G.target(e)]) 
       max_min_cut_value+=cap[e];
       }
@@ -92,5 +92,5 @@
   int min_min_cut_value2=0;
     for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut2[G.tail(e)] && !mincut2[G.head(e)]) min_min_cut_value2+=cap[e];
+    if (mincut2[G.source(e)] && !mincut2[G.target(e)]) min_min_cut_value2+=cap[e];
   }
 
@@ -99,5 +99,5 @@
   int min_cut_value2=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut2[G.tail(e)] && !cut2[G.head(e)]) 
+    if (cut2[G.source(e)] && !cut2[G.target(e)]) 
       min_cut_value2+=cap[e];
   }
@@ -107,5 +107,5 @@
   int max_min_cut_value2=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut2[G.tail(e)] && !maxcut2[G.head(e)]) 
+    if (maxcut2[G.source(e)] && !maxcut2[G.target(e)]) 
       max_min_cut_value2+=cap[e];
       }
@@ -131,5 +131,5 @@
   int min_min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut3[G.tail(e)] && !mincut3[G.head(e)]) min_min_cut_value3+=cap[e];
+    if (mincut3[G.source(e)] && !mincut3[G.target(e)]) min_min_cut_value3+=cap[e];
   }
 
@@ -138,5 +138,5 @@
   int min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut3[G.tail(e)] && !cut3[G.head(e)]) 
+    if (cut3[G.source(e)] && !cut3[G.target(e)]) 
       min_cut_value3+=cap[e];
   }
@@ -146,5 +146,5 @@
   int max_min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut3[G.tail(e)] && !maxcut3[G.head(e)]) 
+    if (maxcut3[G.source(e)] && !maxcut3[G.target(e)]) 
       max_min_cut_value3+=cap[e];
   }
Index: src/work/jacint/max_matching.cc
===================================================================
--- src/work/jacint/max_matching.cc	(revision 921)
+++ src/work/jacint/max_matching.cc	(revision 986)
@@ -191,6 +191,6 @@
   EdgeIt e;
   for(G.first(e); G.valid(e); G.next(e) ) {
-    if ( (pos[G.head(e)]==max_matching.C && pos[G.tail(e)]==max_matching.D) || 
-	 (pos[G.head(e)]==max_matching.D && pos[G.tail(e)]==max_matching.C) )
+    if ( (pos[G.target(e)]==max_matching.C && pos[G.source(e)]==max_matching.D) || 
+	 (pos[G.target(e)]==max_matching.D && pos[G.source(e)]==max_matching.C) )
       noedge=false; 
   }
Index: src/work/jacint/max_matching.h
===================================================================
--- src/work/jacint/max_matching.h	(revision 921)
+++ src/work/jacint/max_matching.h	(revision 986)
@@ -154,5 +154,5 @@
 	Edge e=map[v];
 	if ( G.valid(e) )
-	  G.tail(e) == v ? mate.set(v,G.head(e)) : mate.set(v,G.tail(e)); 
+	  G.source(e) == v ? mate.set(v,G.target(e)) : mate.set(v,G.source(e)); 
       } 
     } 
@@ -173,7 +173,7 @@
       NodeIt e;
       for( G.first(e); G.valid(e); G.next(e)) {
-	if ( todo[G.head(e)] && todo[G.tail(e)] ) {
-	  Node u=G.tail(e);
-	  Node v=G.head(e); 
+	if ( todo[G.target(e)] && todo[G.source(e)] ) {
+	  Node u=G.source(e);
+	  Node v=G.target(e); 
 	  if ( mate[u]=v && mate[v]=u ) {
 	    map.set(u,e);
@@ -197,6 +197,6 @@
       for( G.first(e); G.valid(e); G.next(e)) {
 	if ( G.valid(e) ) {
-	  Node u=G.tail(e);	  
-	  Node v=G.head(e);
+	  Node u=G.source(e);	  
+	  Node v=G.target(e);
 	  mate.set(u,v);
 	  mate.set(v,u);
@@ -223,7 +223,7 @@
       for( G.first(e); G.valid(e); G.next(e)) {
 	map.set(e,false);
-	if ( todo[G.head(e)] && todo[G.tail(e)] ) {
-	  Node u=G.tail(e);
-	  Node v=G.head(e); 
+	if ( todo[G.target(e)] && todo[G.source(e)] ) {
+	  Node u=G.source(e);
+	  Node v=G.target(e); 
 	  if ( mate[u]=v && mate[v]=u ) {
 	    map.set(e,true);
Index: src/work/jacint/max_save.h
===================================================================
--- src/work/jacint/max_save.h	(revision 921)
+++ src/work/jacint/max_save.h	(revision 986)
@@ -259,5 +259,5 @@
 	OutEdgeIt e;
 	for(g->first(e,w) ; g->valid(e); g->next(e)) {
-	  Node v=g->head(e);
+	  Node v=g->target(e);
 	  if (!M[v] && (*flow)[e] < (*capacity)[e] ) {
 	    queue.push(v);
@@ -268,5 +268,5 @@
 	InEdgeIt f;
 	for(g->first(f,w) ; g->valid(f); g->next(f)) {
-	  Node v=g->tail(f);
+	  Node v=g->source(f);
 	  if (!M[v] && (*flow)[f] > 0 ) {
 	    queue.push(v);
@@ -305,5 +305,5 @@
 	InEdgeIt e;
 	for(g->first(e,w) ; g->valid(e); g->next(e)) {
-	  Node v=g->tail(e);
+	  Node v=g->source(e);
 	  if (M[v] && (*flow)[e] < (*capacity)[e] ) {
 	    queue.push(v);
@@ -314,5 +314,5 @@
 	OutEdgeIt f;
 	for(g->first(f,w) ; g->valid(f); g->next(f)) {
-	  Node v=g->head(f);
+	  Node v=g->target(f);
 	  if (M[v] && (*flow)[f] > 0 ) {
 	    queue.push(v);
@@ -370,5 +370,5 @@
 	    
 	if ( (*flow)[e] >= (*capacity)[e] ) continue; 
-	Node v=g->head(e);            
+	Node v=g->target(e);            
 	    
 	if( lev > level[v] ) { //Push is allowed now
@@ -403,5 +403,5 @@
 	  
 	  if( (*flow)[e] <= 0 ) continue; 
-	  Node v=g->tail(e); 
+	  Node v=g->source(e); 
 	  
 	  if( lev > level[v] ) { //Push is allowed now
@@ -457,5 +457,5 @@
 				  InEdgeIt e;
 				  for(g->first(e,v); g->valid(e); g->next(e)) {
-				    Node w=g->tail(e);
+				    Node w=g->source(e);
 				    if ( level[w] == n && w != s ) {
 				      bfs_queue.push(w);
@@ -475,5 +475,5 @@
 				    Num c=(*capacity)[e];
 				    if ( c <= 0 ) continue;
-				    Node w=g->head(e);
+				    Node w=g->target(e);
 				    if ( level[w] < n ) {	  
 				      if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w);
@@ -502,5 +502,5 @@
 				  for(g->first(e,v); g->valid(e); g->next(e)) {
 				    if ( (*capacity)[e] <= (*flow)[e] ) continue;
-				    Node w=g->tail(e);
+				    Node w=g->source(e);
 				    if ( level[w] == n && w != s ) {
 				      bfs_queue.push(w);
@@ -516,5 +516,5 @@
 				  for(g->first(f,v); g->valid(f); g->next(f)) {
 				    if ( 0 >= (*flow)[f] ) continue;
-				    Node w=g->head(f);
+				    Node w=g->target(f);
 				    if ( level[w] == n && w != s ) {
 				      bfs_queue.push(w);
@@ -535,5 +535,5 @@
 				    Num rem=(*capacity)[e]-(*flow)[e];
 				    if ( rem <= 0 ) continue;
-				    Node w=g->head(e);
+				    Node w=g->target(e);
 				    if ( level[w] < n ) {	  
 				      if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w);
@@ -547,5 +547,5 @@
 				  {
 				    if ( (*flow)[f] <= 0 ) continue;
-				    Node w=g->tail(f);
+				    Node w=g->source(f);
 				    if ( level[w] < n ) {	  
 				      if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w);
@@ -645,7 +645,7 @@
       // 	return dist[n]; }
       //       bool get(const typename MapGraphWrapper::Edge& e) const { 
-      // 	return (dist.get(g->tail(e))<dist.get(g->head(e))); }
+      // 	return (dist.get(g->source(e))<dist.get(g->target(e))); }
       bool operator[](const typename MapGraphWrapper::Edge& e) const { 
-	return (dist[g->tail(e)]<dist[g->head(e)]); 
+	return (dist[g->source(e)]<dist[g->target(e)]); 
       }
     };
@@ -784,5 +784,5 @@
       for(g->first(e,v); g->valid(e); g->next(e)) {
 	if ( (*capacity)[e] <= (*flow)[e] ) continue;
-	Node u=g->tail(e);
+	Node u=g->source(e);
 	if ( level[u] >= n ) { 
 	  bfs_queue.push(u);
@@ -795,5 +795,5 @@
       for(g->first(f,v); g->valid(f); g->next(f)) {
 	if ( 0 >= (*flow)[f] ) continue;
-	Node u=g->head(f);
+	Node u=g->target(f);
 	if ( level[u] >= n ) { 
 	  bfs_queue.push(u);
@@ -847,6 +847,6 @@
       ResGWOutEdgeIt e=bfs;
       if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	Node v=res_graph.tail(e);
-	Node w=res_graph.head(e);
+	Node v=res_graph.source(e);
+	Node w=res_graph.target(e);
 	pred.set(w, e);
 	if (res_graph.valid(pred[v])) {
@@ -855,5 +855,5 @@
 	  free.set(w, res_graph.resCap(e)); 
 	}
-	if (res_graph.head(e)==t) { _augment=true; break; }
+	if (res_graph.target(e)==t) { _augment=true; break; }
       }
 	
@@ -867,5 +867,5 @@
 	ResGWEdge e=pred[n];
 	res_graph.augment(e, augment_value); 
-	n=res_graph.tail(e);
+	n=res_graph.source(e);
       }
     }
@@ -920,6 +920,6 @@
       if (res_graph.valid(e)) {
 	if (bfs.isBNodeNewlyReached()) {
-	  dist.set(res_graph.head(e), dist[res_graph.tail(e)]+1);
-	  typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)], res_graph_to_F[res_graph.head(e)]);
+	  dist.set(res_graph.target(e), dist[res_graph.source(e)]+1);
+	  typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)], res_graph_to_F[res_graph.target(e)]);
 	  original_edge.update();
 	  original_edge.set(f, e);
@@ -927,6 +927,6 @@
 	  residual_capacity.set(f, res_graph.resCap(e));
 	} else {
-	  if (dist[res_graph.head(e)]==(dist[res_graph.tail(e)]+1)) {
-	    typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)], res_graph_to_F[res_graph.head(e)]);
+	  if (dist[res_graph.target(e)]==(dist[res_graph.source(e)]+1)) {
+	    typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)], res_graph_to_F[res_graph.target(e)]);
 	    original_edge.update();
 	    original_edge.set(f, e);
@@ -982,5 +982,5 @@
 	  typename MG::Edge e=pred[n];
 	  res_graph.augment(original_edge[e], augment_value); 
-	  n=F.tail(e);
+	  n=F.source(e);
 	  if (residual_capacity[e]==augment_value) 
 	    F.erase(e); 
@@ -1016,5 +1016,5 @@
       ResGWOutEdgeIt e=bfs;
       if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	dist.set(res_graph.head(e), dist[res_graph.tail(e)]+1);
+	dist.set(res_graph.target(e), dist[res_graph.source(e)]+1);
       }
       ++bfs;
@@ -1113,5 +1113,5 @@
 	  typename ErasingResGW::OutEdgeIt e=pred[n];
 	  res_graph.augment(e, augment_value);
-	  n=erasing_res_graph.tail(e);
+	  n=erasing_res_graph.source(e);
 	  if (res_graph.resCap(e)==0)
 	    erasing_res_graph.erase(e);
Index: src/work/jacint/preflow.cc
===================================================================
--- src/work/jacint/preflow.cc	(revision 921)
+++ src/work/jacint/preflow.cc	(revision 986)
@@ -47,7 +47,7 @@
   for(G.first(e); G.valid(e); G.next(e)) {
     int c=cap[e];
-    if (mincut[G.tail(e)] && !mincut[G.head(e)]) min_min_cut_value+=c;
-    if (cut[G.tail(e)] && !cut[G.head(e)]) min_cut_value+=c; 
-    if (maxcut[G.tail(e)] && !maxcut[G.head(e)]) max_min_cut_value+=c;
+    if (mincut[G.source(e)] && !mincut[G.target(e)]) min_min_cut_value+=c;
+    if (cut[G.source(e)] && !cut[G.target(e)]) min_cut_value+=c; 
+    if (maxcut[G.source(e)] && !maxcut[G.target(e)]) max_min_cut_value+=c;
   }
 
@@ -87,7 +87,7 @@
   for(G.first(e); G.valid(e); G.next(e)) {
     int c=cap[e];
-    if (mincut2[G.tail(e)] && !mincut2[G.head(e)]) min_min_cut2_value+=c;
-    if (cut2[G.tail(e)] && !cut2[G.head(e)]) min_cut2_value+=c; 
-    if (maxcut2[G.tail(e)] && !maxcut2[G.head(e)]) max_min_cut2_value+=c;
+    if (mincut2[G.source(e)] && !mincut2[G.target(e)]) min_min_cut2_value+=c;
+    if (cut2[G.source(e)] && !cut2[G.target(e)]) min_cut2_value+=c; 
+    if (maxcut2[G.source(e)] && !maxcut2[G.target(e)]) max_min_cut2_value+=c;
   }
 
@@ -139,8 +139,8 @@
   for(G.first(e); G.valid(e); G.next(e)) {
     int c=cap[e];
-    if (mincut3[G.tail(e)] && !mincut3[G.head(e)]) min_min_cut3_value+=c;
-    if (cut3[G.tail(e)] && !cut3[G.head(e)]) min_cut3_value+=c; 
-    if (maxcut3[G.tail(e)] && !maxcut3[G.head(e)]) max_min_cut3_value+=c;
-    if (actcut3[G.tail(e)] && !actcut3[G.head(e)]) act_min_cut3_value+=c;
+    if (mincut3[G.source(e)] && !mincut3[G.target(e)]) min_min_cut3_value+=c;
+    if (cut3[G.source(e)] && !cut3[G.target(e)]) min_cut3_value+=c; 
+    if (maxcut3[G.source(e)] && !maxcut3[G.target(e)]) max_min_cut3_value+=c;
+    if (actcut3[G.source(e)] && !actcut3[G.target(e)]) act_min_cut3_value+=c;
   }
 
@@ -196,7 +196,7 @@
   for(G.first(e); G.valid(e); G.next(e)) {
     int c=cap[e];
-    if (mincut4[G.tail(e)] && !mincut4[G.head(e)]) min_min_cut4_value+=c;
-    if (cut4[G.tail(e)] && !cut4[G.head(e)]) min_cut4_value+=c; 
-    if (maxcut4[G.tail(e)] && !maxcut4[G.head(e)]) max_min_cut4_value+=c;
+    if (mincut4[G.source(e)] && !mincut4[G.target(e)]) min_min_cut4_value+=c;
+    if (cut4[G.source(e)] && !cut4[G.target(e)]) min_cut4_value+=c; 
+    if (maxcut4[G.source(e)] && !maxcut4[G.target(e)]) max_min_cut4_value+=c;
   }
 
@@ -239,7 +239,7 @@
   for(G.first(e); G.valid(e); G.next(e)) {
     int c=cap[e];
-    if (mincut5[G.tail(e)] && !mincut5[G.head(e)]) min_min_cut5_value+=c;
-    if (cut5[G.tail(e)] && !cut5[G.head(e)]) min_cut5_value+=c; 
-    if (maxcut5[G.tail(e)] && !maxcut5[G.head(e)]) max_min_cut5_value+=c;
+    if (mincut5[G.source(e)] && !mincut5[G.target(e)]) min_min_cut5_value+=c;
+    if (cut5[G.source(e)] && !cut5[G.target(e)]) min_cut5_value+=c; 
+    if (maxcut5[G.source(e)] && !maxcut5[G.target(e)]) max_min_cut5_value+=c;
   }
 
Index: src/work/jacint/preflow_excess.h
===================================================================
--- src/work/jacint/preflow_excess.h	(revision 921)
+++ src/work/jacint/preflow_excess.h	(revision 986)
@@ -137,5 +137,5 @@
 	  InEdgeIt e;
 	  for(G.first(e,v); G.valid(e); G.next(e)) {
-	    Node w=G.tail(e);
+	    Node w=G.source(e);
 	    if ( level[w] == n && w != s ) {
 	      bfs_queue.push(w);
@@ -155,5 +155,5 @@
 	  T c=capacity[e];
 	  if ( c == 0 ) continue;
-	  Node w=G.head(e);
+	  Node w=G.target(e);
 	  if ( level[w] < n ) {	  
 	    if ( excess[w] == 0 && w!=t ) active[level[w]].push(w);
@@ -183,5 +183,5 @@
 	  for(G.first(e,v); G.valid(e); G.next(e)) {
 	    if ( capacity[e] == flow[e] ) continue;
-	    Node w=G.tail(e);
+	    Node w=G.source(e);
 	    if ( level[w] == n && w != s ) {
 	      bfs_queue.push(w);
@@ -197,5 +197,5 @@
 	  for(G.first(f,v); G.valid(f); G.next(f)) {
 	    if ( 0 == flow[f] ) continue;
-	    Node w=G.head(f);
+	    Node w=G.target(f);
 	    if ( level[w] == n && w != s ) {
 	      bfs_queue.push(w);
@@ -248,5 +248,5 @@
 	  T rem=capacity[e]-flow[e];
 	  if ( rem == 0 ) continue;
-	  Node w=G.head(e);
+	  Node w=G.target(e);
 	  if ( level[w] < n ) {	  
 	    if ( excess[w] == 0 && w!=t ) active[level[w]].push(w);
@@ -260,5 +260,5 @@
 	{
 	  if ( flow[f] == 0 ) continue;
-	  Node w=G.tail(f);
+	  Node w=G.source(f);
 	  if ( level[w] < n ) {	  
 	    if ( excess[w] == 0 && w!=t ) active[level[w]].push(w);
@@ -304,5 +304,5 @@
 	      for(G.first(e,v); G.valid(e); G.next(e)) {
 		if ( capacity[e] == flow[e] ) continue;
-		Node u=G.tail(e);
+		Node u=G.source(e);
 		if ( level[u] >= n ) { 
 		  bfs_queue.push(u);
@@ -315,5 +315,5 @@
 	      for(G.first(f,v); G.valid(f); G.next(f)) {
 		if ( 0 == flow[f] ) continue;
-		Node u=G.head(f);
+		Node u=G.target(f);
 		if ( level[u] >= n ) { 
 		  bfs_queue.push(u);
@@ -344,5 +344,5 @@
 	    
 	    if ( flow[e] == capacity[e] ) continue; 
-	    Node v=G.head(e);            
+	    Node v=G.target(e);            
 	    //e=wv	    
 	    
@@ -386,5 +386,5 @@
 	    
 	    if( flow[e] == 0 ) continue; 
-	    Node v=G.tail(e);  
+	    Node v=G.source(e);  
 	    //e=vw
 	    
@@ -570,5 +570,5 @@
 	OutEdgeIt e;
 	for(G.first(e,w) ; G.valid(e); G.next(e)) {
-	  Node v=G.head(e);
+	  Node v=G.target(e);
 	  if (!M[v] && flow[e] < capacity[e] ) {
 	    queue.push(v);
@@ -579,5 +579,5 @@
 	InEdgeIt f;
 	for(G.first(f,w) ; G.valid(f); G.next(f)) {
-	  Node v=G.tail(f);
+	  Node v=G.source(f);
 	  if (!M[v] && flow[f] > 0 ) {
 	    queue.push(v);
@@ -610,5 +610,5 @@
 	InEdgeIt e;
 	for(G.first(e,w) ; G.valid(e); G.next(e)) {
-	  Node v=G.tail(e);
+	  Node v=G.source(e);
 	  if (!M[v] && flow[e] < capacity[e] ) {
 	    queue.push(v);
@@ -619,5 +619,5 @@
 	OutEdgeIt f;
 	for(G.first(f,w) ; G.valid(f); G.next(f)) {
-	  Node v=G.head(f);
+	  Node v=G.target(f);
 	  if (!M[v] && flow[f] > 0 ) {
 	    queue.push(v);
Index: src/work/jacint/preflow_excess_test.cc
===================================================================
--- src/work/jacint/preflow_excess_test.cc	(revision 921)
+++ src/work/jacint/preflow_excess_test.cc	(revision 986)
@@ -53,5 +53,5 @@
   EdgeIt e;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut[G.tail(e)] && !mincut[G.head(e)]) min_min_cut_value+=cap[e];
+    if (mincut[G.source(e)] && !mincut[G.target(e)]) min_min_cut_value+=cap[e];
   }
 
@@ -60,5 +60,5 @@
   int min_cut_value=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut[G.tail(e)] && !cut[G.head(e)]) 
+    if (cut[G.source(e)] && !cut[G.target(e)]) 
       min_cut_value+=cap[e];
   }
@@ -68,5 +68,5 @@
   int max_min_cut_value=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut[G.tail(e)] && !maxcut[G.head(e)]) 
+    if (maxcut[G.source(e)] && !maxcut[G.target(e)]) 
       max_min_cut_value+=cap[e];
       }
@@ -100,5 +100,5 @@
   int min_min_cut_value2=0;
     for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut2[G.tail(e)] && !mincut2[G.head(e)]) min_min_cut_value2+=cap[e];
+    if (mincut2[G.source(e)] && !mincut2[G.target(e)]) min_min_cut_value2+=cap[e];
   }
 
@@ -107,5 +107,5 @@
   int min_cut_value2=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut2[G.tail(e)] && !cut2[G.head(e)]) 
+    if (cut2[G.source(e)] && !cut2[G.target(e)]) 
       min_cut_value2+=cap[e];
   }
@@ -115,5 +115,5 @@
   int max_min_cut_value2=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut2[G.tail(e)] && !maxcut2[G.head(e)]) 
+    if (maxcut2[G.source(e)] && !maxcut2[G.target(e)]) 
       max_min_cut_value2+=cap[e];
       }
@@ -145,5 +145,5 @@
   int min_min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (mincut3[G.tail(e)] && !mincut3[G.head(e)]) min_min_cut_value3+=cap[e];
+    if (mincut3[G.source(e)] && !mincut3[G.target(e)]) min_min_cut_value3+=cap[e];
   }
 
@@ -152,5 +152,5 @@
   int min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (cut3[G.tail(e)] && !cut3[G.head(e)]) 
+    if (cut3[G.source(e)] && !cut3[G.target(e)]) 
       min_cut_value3+=cap[e];
   }
@@ -160,5 +160,5 @@
   int max_min_cut_value3=0;
   for(G.first(e); G.valid(e); G.next(e)) {
-    if (maxcut3[G.tail(e)] && !maxcut3[G.head(e)]) 
+    if (maxcut3[G.source(e)] && !maxcut3[G.target(e)]) 
       max_min_cut_value3+=cap[e];
       }
Index: src/work/jacint/preflow_res.h
===================================================================
--- src/work/jacint/preflow_res.h	(revision 921)
+++ src/work/jacint/preflow_res.h	(revision 986)
@@ -103,5 +103,5 @@
 	for(res_graph.first(e,v); res_graph.valid(e); 
 	    res_graph.next(e)) {
-	  Node w=res_graph.tail(e);
+	  Node w=res_graph.source(e);
 	  if ( level[w] == n && w != s ) {
 	    bfs_queue.push(w);
@@ -146,5 +146,5 @@
       for(res_graph.first(e,s); res_graph.valid(e); 
 	  res_graph.next(e)) {
-	  Node w=res_graph.head(e);
+	  Node w=res_graph.target(e);
 	  if ( level[w] < n ) {	  
 	    if ( excess[w] == 0 && w!=t ) {
@@ -191,5 +191,5 @@
 	      for(res_graph.first(e,v); 
 		  res_graph.valid(e); res_graph.next(e)) {
-		Node u=res_graph.tail(e);
+		Node u=res_graph.source(e);
 		if ( level[u] >= n ) { 
 		  bfs_queue.push(u);
@@ -222,5 +222,5 @@
 	  for(res_graph.first(e,w); res_graph.valid(e); res_graph.next(e)) {
 	    
-	    Node v=res_graph.head(e);            
+	    Node v=res_graph.target(e);            
 	    if( lev > level[v] ) {      
 	      /*Push is allowed now*/
@@ -401,5 +401,5 @@
 	OutEdgeIt e;
 	for(G.first(e,w) ; G.valid(e); G.next(e)) {
-	  Node v=G.head(e);
+	  Node v=G.target(e);
 	  if (!M[v] && flow[e] < capacity[e] ) {
 	    queue.push(v);
@@ -410,5 +410,5 @@
 	InEdgeIt f;
 	for(G.first(f,w) ; G.valid(f); G.next(f)) {
-	  Node v=G.tail(f);
+	  Node v=G.source(f);
 	  if (!M[v] && flow[f] > 0 ) {
 	    queue.push(v);
@@ -441,5 +441,5 @@
 	InEdgeIt e;
 	for(G.first(e,w) ; G.valid(e); G.next(e)) {
-	  Node v=G.tail(e);
+	  Node v=G.source(e);
 	  if (!M[v] && flow[e] < capacity[e] ) {
 	    queue.push(v);
@@ -450,5 +450,5 @@
 	OutEdgeIt f;
 	for(G.first(f,w) ; G.valid(f); G.next(f)) {
-	  Node v=G.head(f);
+	  Node v=G.target(f);
 	  if (!M[v] && flow[f] > 0 ) {
 	    queue.push(v);
Index: src/work/jacint/prim.h
===================================================================
--- src/work/jacint/prim.h	(revision 921)
+++ src/work/jacint/prim.h	(revision 986)
@@ -96,5 +96,5 @@
 	  OutEdgeIt e;
 	  for( G.first(e,v); G.valid(e); G.next(e)) {
-	    Node w=G.head(e); 
+	    Node w=G.target(e); 
 	    
 	    if ( !scanned[w] ) {
@@ -112,5 +112,5 @@
 	  InEdgeIt f;
 	  for( G.first(f,v); G.valid(f); G.next(f)) {
-	    Node w=G.tail(f); 
+	    Node w=G.source(f); 
 	    
 	    if ( !scanned[w] ) {
Index: src/work/johanna/ma_order.h
===================================================================
--- src/work/johanna/ma_order.h	(revision 921)
+++ src/work/johanna/ma_order.h	(revision 986)
@@ -58,5 +58,5 @@
 	  G.first(e,a);
 	  for (;G.valid(e);G.next(e)) {
-	    Node v = G.head(e); // hmm
+	    Node v = G.target(e); // hmm
 	    if (heap.state(v) == Heap::IN_HEAP ) {
 	      heap.decrease(v, heap[v]+1);
Index: src/work/marci/augmenting_flow.h
===================================================================
--- src/work/marci/augmenting_flow.h	(revision 970)
+++ src/work/marci/augmenting_flow.h	(revision 986)
@@ -211,5 +211,5 @@
 	OutEdgeIt e;
 	for(g->first(e,w) ; e!=INVALID; ++e) {
-	  Node v=g->head(e);
+	  Node v=g->target(e);
 	  if (!M[v] && (*flow)[e] < (*capacity)[e] ) {
 	    queue.push(v);
@@ -220,5 +220,5 @@
 	InEdgeIt f;
 	for(g->first(f,w) ; f!=INVALID; ++f) {
-	  Node v=g->tail(f);
+	  Node v=g->source(f);
 	  if (!M[v] && (*flow)[f] > 0 ) {
 	    queue.push(v);
@@ -271,6 +271,6 @@
       ResGWEdge e=bfs;
       if (e!=INVALID && bfs.isBNodeNewlyReached()) {
-	Node v=res_graph.tail(e);
-	Node w=res_graph.head(e);
+	Node v=res_graph.source(e);
+	Node w=res_graph.target(e);
 	pred.set(w, e);
 	if (pred[v]!=INVALID) {
@@ -279,5 +279,5 @@
 	  free.set(w, res_cap[e]);
 	}
-	if (res_graph.head(e)==t) { _augment=true; break; }
+	if (res_graph.target(e)==t) { _augment=true; break; }
       }
 
@@ -291,5 +291,5 @@
 	ResGWEdge e=pred[n];
 	res_graph.augment(e, augment_value);
-	n=res_graph.tail(e);
+	n=res_graph.source(e);
       }
     }
@@ -330,6 +330,6 @@
       ResGWEdge e=bfs;
       if (e!=INVALID && bfs.isBNodeNewlyReached()) {
-	Node v=res_graph.tail(e);
-	Node w=res_graph.head(e);
+	Node v=res_graph.source(e);
+	Node w=res_graph.target(e);
 	pred.set(w, e);
 	if (pred[v]!=INVALID) {
@@ -338,5 +338,5 @@
 	  free.set(w, res_cap[e]);
 	}
-	if (res_graph.head(e)==t) { _augment=true; break; }
+	if (res_graph.target(e)==t) { _augment=true; break; }
       }
 
@@ -350,5 +350,5 @@
 	ResGWEdge e=pred[n];
 	res_graph.augment(e, augment_value);
-	n=res_graph.tail(e);
+	n=res_graph.source(e);
       }
     }
@@ -396,7 +396,7 @@
       if (e!=INVALID) {
 	if (bfs.isBNodeNewlyReached()) {
-	  dist.set(res_graph.head(e), dist[res_graph.tail(e)]+1);
-	  typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)],
-					res_graph_to_F[res_graph.head(e)]);
+	  dist.set(res_graph.target(e), dist[res_graph.source(e)]+1);
+	  typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)],
+					res_graph_to_F[res_graph.target(e)]);
 	  //original_edge.update();
 	  original_edge.set(f, e);
@@ -404,7 +404,7 @@
 	  residual_capacity.set(f, res_cap[e]);
 	} else {
-	  if (dist[res_graph.head(e)]==(dist[res_graph.tail(e)]+1)) {
-	    typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)],
-					  res_graph_to_F[res_graph.head(e)]);
+	  if (dist[res_graph.target(e)]==(dist[res_graph.source(e)]+1)) {
+	    typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)],
+					  res_graph_to_F[res_graph.target(e)]);
 	    //original_edge.update();
 	    original_edge.set(f, e);
@@ -434,6 +434,6 @@
 	if (typename MG::Edge(dfs)!=INVALID) {
 	  if (dfs.isBNodeNewlyReached()) {
-	    typename MG::Node v=F.tail(dfs);
-	    typename MG::Node w=F.head(dfs);
+	    typename MG::Node v=F.source(dfs);
+	    typename MG::Node w=F.target(dfs);
 	    pred.set(w, dfs);
 	    if (pred[v]!=INVALID) {
@@ -460,5 +460,5 @@
 	  typename MG::Edge e=pred[n];
 	  res_graph.augment(original_edge[e], augment_value);
-	  n=F.tail(e);
+	  n=F.source(e);
 	  if (residual_capacity[e]==augment_value)
 	    F.erase(e);
@@ -499,5 +499,5 @@
       ResGWEdge e=bfs;
       if (e!=INVALID && bfs.isBNodeNewlyReached())
-	potential.set(res_graph.head(e), potential[res_graph.tail(e)]+1);
+	potential.set(res_graph.target(e), potential[res_graph.source(e)]+1);
       ++bfs;
     } 
@@ -554,6 +554,6 @@
 	  if (dfs.isBNodeNewlyReached()) {
 	    
-	    typename ErasingResGW::Node v=erasing_res_graph.tail(dfs);
-	    typename ErasingResGW::Node w=erasing_res_graph.head(dfs);
+	    typename ErasingResGW::Node v=erasing_res_graph.source(dfs);
+	    typename ErasingResGW::Node w=erasing_res_graph.target(dfs);
 
 	    pred.set(w, typename ErasingResGW::Edge(dfs));
@@ -586,5 +586,5 @@
 	  typename ErasingResGW::Edge e=pred[n];
 	  res_graph.augment(e, augment_value);
-	  n=erasing_res_graph.tail(e);
+	  n=erasing_res_graph.source(e);
 	  if (res_cap[e]==0)
 	    erasing_res_graph.erase(e);
Index: src/work/marci/bfs_dfs.h
===================================================================
--- src/work/marci/bfs_dfs.h	(revision 921)
+++ src/work/marci/bfs_dfs.h	(revision 986)
@@ -64,5 +64,5 @@
 	//graph->first(actual_edge, s);
 	if (actual_edge!=INVALID) { 
-	  Node w=graph->head(actual_edge);
+	  Node w=graph->target(actual_edge);
 	  if (!reached[w]) {
 	    bfs_queue.push(w);
@@ -86,5 +86,5 @@
 	//++actual_edge;
 	if (actual_edge!=INVALID) {
-	  Node w=graph->head(actual_edge);
+	  Node w=graph->target(actual_edge);
 	  if (!reached[w]) {
 	    bfs_queue.push(w);
@@ -101,5 +101,5 @@
 	  //graph->first(actual_edge, bfs_queue.front());
 	  if (actual_edge!=INVALID) {
-	    Node w=graph->head(actual_edge);
+	    Node w=graph->target(actual_edge);
 	    if (!reached[w]) {
 	      bfs_queue.push(w);
@@ -125,7 +125,7 @@
     bool isANodeExamined() const { return actual_edge==INVALID; }
     /// Returns a-node of the actual edge, so does if the edge is invalid.
-    Node tail() const { return bfs_queue.front(); }
+    Node source() const { return bfs_queue.front(); }
     /// \pre The actual edge have to be valid.
-    Node head() const { return graph->head(actual_edge); }
+    Node target() const { return graph->target(actual_edge); }
     /// Guess what?
     /// \deprecated 
@@ -187,6 +187,6 @@
       if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) 
       {
-	pred.set(this->head(), this->actual_edge);
-	dist.set(this->head(), dist[this->tail()]);
+	pred.set(this->target(), this->actual_edge);
+	dist.set(this->target(), dist[this->source()]);
       }
       return *this;
@@ -247,5 +247,5 @@
       actual_edge=dfs_stack.top();
       if (actual_edge!=INVALID/*.valid()*/) { 
-	Node w=graph->head(actual_edge);
+	Node w=graph->target(actual_edge);
 	actual_node=w;
 	if (!reached[w]) {
@@ -256,5 +256,5 @@
 	  b_node_newly_reached=true;
 	} else {
-	  actual_node=graph->tail(actual_edge);
+	  actual_node=graph->source(actual_edge);
 	  ++dfs_stack.top();
 	  b_node_newly_reached=false;
@@ -277,8 +277,8 @@
     bool isANodeExamined() const { return actual_edge==INVALID; }
     /// Returns a-node of the actual edge, so does if the edge is invalid.
-    Node tail() const { return actual_node; /*FIXME*/}
+    Node source() const { return actual_node; /*FIXME*/}
     /// Returns b-node of the actual edge. 
     /// \pre The actual edge have to be valid.
-    Node head() const { return graph->head(actual_edge); }
+    Node target() const { return graph->target(actual_edge); }
     /// Guess what?
     /// \deprecated
@@ -334,5 +334,5 @@
       if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) 
       {
-	pred.set(this->head(), this->actual_edge);
+	pred.set(this->target(), this->actual_edge);
       }
       return *this;
Index: src/work/marci/bfs_mm.h
===================================================================
--- src/work/marci/bfs_mm.h	(revision 944)
+++ src/work/marci/bfs_mm.h	(revision 986)
@@ -72,5 +72,5 @@
 	//graph->first(actual_edge, s);
 	if (actual_edge!=INVALID) { 
-	  Node w=graph->head(actual_edge);
+	  Node w=graph->target(actual_edge);
 	  if (!(*reached_map)[w]) {
 	    bfs_queue.push(w);
@@ -94,5 +94,5 @@
 	//++actual_edge;
 	if (actual_edge!=INVALID) {
-	  Node w=graph->head(actual_edge);
+	  Node w=graph->target(actual_edge);
 	  if (!(*reached_map)[w]) {
 	    bfs_queue.push(w);
@@ -109,5 +109,5 @@
 	  //graph->first(actual_edge, bfs_queue.front());
 	  if (actual_edge!=INVALID) {
-	    Node w=graph->head(actual_edge);
+	    Node w=graph->target(actual_edge);
 	    if (!(*reached_map)[w]) {
 	      bfs_queue.push(w);
@@ -133,7 +133,7 @@
     bool isANodeExamined() const { return actual_edge==INVALID; }
     /// Returns a-node of the actual edge, so does if the edge is invalid.
-    Node tail() const { return bfs_queue.front(); }
+    Node source() const { return bfs_queue.front(); }
     /// \pre The actual edge have to be valid.
-    Node head() const { return graph->head(actual_edge); }
+    Node target() const { return graph->target(actual_edge); }
     /// Guess what?
     /// \deprecated 
@@ -232,7 +232,7 @@
       if ((this->actual_edge)!=INVALID && this->b_node_newly_reached) 
       {
-	pred_map->set(this->head(), this->actual_edge);
-	pred_node_map->set(this->head(), this->tail());
-	dist_map->set(this->head(), (*dist_map)[this->tail()]);
+	pred_map->set(this->target(), this->actual_edge);
+	pred_node_map->set(this->target(), this->source());
+	dist_map->set(this->target(), (*dist_map)[this->source()]);
       }
       return *this;
@@ -458,5 +458,5 @@
       actual_edge=dfs_stack.top();
       if (actual_edge!=INVALID/*.valid()*/) { 
-	Node w=graph->head(actual_edge);
+	Node w=graph->target(actual_edge);
 	actual_node=w;
 	if (!reached[w]) {
@@ -467,5 +467,5 @@
 	  b_node_newly_reached=true;
 	} else {
-	  actual_node=graph->tail(actual_edge);
+	  actual_node=graph->source(actual_edge);
 	  ++dfs_stack.top();
 	  b_node_newly_reached=false;
@@ -488,8 +488,8 @@
     bool isANodeExamined() const { return actual_edge==INVALID; }
     /// Returns a-node of the actual edge, so does if the edge is invalid.
-    Node tail() const { return actual_node; /*FIXME*/}
+    Node source() const { return actual_node; /*FIXME*/}
     /// Returns b-node of the actual edge. 
     /// \pre The actual edge have to be valid.
-    Node head() const { return graph->head(actual_edge); }
+    Node target() const { return graph->target(actual_edge); }
     /// Guess what?
     /// \deprecated
@@ -545,5 +545,5 @@
       if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) 
       {
-	pred.set(this->head(), this->actual_edge);
+	pred.set(this->target(), this->actual_edge);
       }
       return *this;
Index: src/work/marci/bfs_mm_test.cc
===================================================================
--- src/work/marci/bfs_mm_test.cc	(revision 959)
+++ src/work/marci/bfs_mm_test.cc	(revision 986)
@@ -92,6 +92,6 @@
 
 //   for(EdgeIt e(G); e==INVALID; ++e) {
-//     Node u=G.tail(e);
-//     Node v=G.head(e);
+//     Node u=G.source(e);
+//     Node v=G.target(e);
 //     check( !bfs_test.reached(u) ||
 // 	   (bfs_test.dist(v) > bfs_test.dist(u)+1),
@@ -103,5 +103,5 @@
 //     if ( bfs_test.pred(v)!=INVALID ) {
 //       Edge e=bfs_test.pred(v);
-//       Node u=G.tail(e);
+//       Node u=G.source(e);
 //       check(u==bfs_test.predNode(v),"Wrong tree.");
 //       check(bfs_test.dist(v) - bfs_test.dist(u) == 1,
Index: src/work/marci/bfsit_vs_byhand.cc
===================================================================
--- src/work/marci/bfsit_vs_byhand.cc	(revision 944)
+++ src/work/marci/bfsit_vs_byhand.cc	(revision 986)
@@ -49,5 +49,5 @@
       bfs_queue.pop();
       for(OutEdgeIt e(g,v); e!=INVALID; ++e) {
-	Node w=g.head(e);
+	Node w=g.target(e);
 	if (!reached[w]) {
 	  bfs_queue.push(w);
@@ -71,5 +71,5 @@
       ++bfs; 
       if (Graph::Edge(bfs)!=INVALID && bfs.isBNodeNewlyReached()) 
-	pred.set(bfs.head(), Graph::Edge(bfs));
+	pred.set(bfs.target(), Graph::Edge(bfs));
     }
   }
Index: src/work/marci/bipartite_graph_wrapper.h
===================================================================
--- src/work/marci/bipartite_graph_wrapper.h	(revision 921)
+++ src/work/marci/bipartite_graph_wrapper.h	(revision 986)
@@ -168,15 +168,15 @@
 //     InEdgeIt& next(InEdgeIt& i) const { this->graph->next(i.e); return i; }
 
-//     Node tail(const Edge& e) { 
-//       if (!(*(this->s_false_t_true_map))[this->graph->tail(e)]) 
-// 	return Node(this->graph->tail(e));
+//     Node source(const Edge& e) { 
+//       if (!(*(this->s_false_t_true_map))[this->graph->source(e)]) 
+// 	return Node(this->graph->source(e));
 //       else
-// 	return Node(this->graph->head(e));	
-//     }
-//     Node head(const Edge& e) { 
-//       if (!(*(this->s_false_t_true_map))[this->graph->tail(e)]) 
-// 	return Node(this->graph->head(e));
+// 	return Node(this->graph->target(e));	
+//     }
+//     Node target(const Edge& e) { 
+//       if (!(*(this->s_false_t_true_map))[this->graph->source(e)]) 
+// 	return Node(this->graph->target(e));
 //       else
-// 	return Node(this->graph->tail(e));	
+// 	return Node(this->graph->source(e));	
 //     }
 
@@ -253,7 +253,7 @@
 
     /// A new edge is inserted.
-    ///\pre \c tail have to be in \c S_Class and \c head in \c T_Class.
-    Edge addEdge(const Node& tail, const Node& head) {
-      return Parent::graph->addEdge(tail, head);
+    ///\pre \c source have to be in \c S_Class and \c target in \c T_Class.
+    Edge addEdge(const Node& source, const Node& target) {
+      return Parent::graph->addEdge(source, target);
     }
 
@@ -696,8 +696,8 @@
     }    
 
-    Node tail(const Edge& e) const { 
+    Node source(const Edge& e) const { 
       switch (e.spec) {
       case 0: 
-	return Node(this->graph->tail(e));
+	return Node(this->graph->source(e));
 	break;
       case 1:
@@ -710,8 +710,8 @@
       }
     }
-    Node head(const Edge& e) const { 
+    Node target(const Edge& e) const { 
       switch (e.spec) {
       case 0: 
-	return Node(this->graph->head(e));
+	return Node(this->graph->target(e));
 	break;
       case 1:
@@ -733,8 +733,8 @@
     }
   
-    Node aNode(const OutEdgeIt& e) const { return tail(e); }
-    Node aNode(const InEdgeIt& e) const { return head(e); }
-    Node bNode(const OutEdgeIt& e) const { return head(e); }
-    Node bNode(const InEdgeIt& e) const { return tail(e); }
+    Node aNode(const OutEdgeIt& e) const { return source(e); }
+    Node aNode(const InEdgeIt& e) const { return target(e); }
+    Node bNode(const OutEdgeIt& e) const { return target(e); }
+    Node bNode(const InEdgeIt& e) const { return source(e); }
 
     void addNode() const { }
@@ -742,6 +742,6 @@
     
 //    Node addNode() const { return Node(this->graph->addNode()); }
-//    Edge addEdge(const Node& tail, const Node& head) const { 
-//      return Edge(this->graph->addEdge(tail, head)); }
+//    Edge addEdge(const Node& source, const Node& target) const { 
+//      return Edge(this->graph->addEdge(source, target)); }
 
 //    void erase(const Node& i) const { this->graph->erase(i); }
Index: src/work/marci/bipartite_graph_wrapper_test.cc
===================================================================
--- src/work/marci/bipartite_graph_wrapper_test.cc	(revision 921)
+++ src/work/marci/bipartite_graph_wrapper_test.cc	(revision 986)
@@ -88,5 +88,5 @@
   cout << "Edges of the bipartite graph:" << endl;
   for (BGW::EdgeIt e(bgw); e!=INVALID; ++e)
-    cout << g.id(bgw.tail(e)) << "->" << g.id(bgw.head(e)) << endl;
+    cout << g.id(bgw.source(e)) << "->" << g.id(bgw.target(e)) << endl;
 
   BGW::NodeMap<int> dbyj(bgw);
Index: src/work/marci/experiment/edmonds_karp.h
===================================================================
--- src/work/marci/experiment/edmonds_karp.h	(revision 921)
+++ src/work/marci/experiment/edmonds_karp.h	(revision 986)
@@ -41,5 +41,5 @@
       //Edge(const Edge& e) : resG(e.resG), sym(e.sym) { }
       Number free() const { 
-	if (resG->G.aNode(sym)==resG->G.tail(sym)) { 
+	if (resG->G.aNode(sym)==resG->G.source(sym)) { 
 	  return (resG->capacity.get(sym)-resG->flow.get(sym)); 
 	} else { 
@@ -49,5 +49,5 @@
       bool valid() const { return sym.valid(); }
       void augment(Number a) const {
-	if (resG->G.aNode(sym)==resG->G.tail(sym)) { 
+	if (resG->G.aNode(sym)==resG->G.source(sym)) { 
 	  resG->flow.set(sym, resG->flow.get(sym)+a);
 	  //resG->flow[sym]+=a;
@@ -97,6 +97,6 @@
     }
 
-    Node tail(Edge e) const { return G.aNode(e.sym); }
-    Node head(Edge e) const { return G.bNode(e.sym); }
+    Node source(Edge e) const { return G.aNode(e.sym); }
+    Node target(Edge e) const { return G.bNode(e.sym); }
 
     Node aNode(OutEdgeIt e) const { return G.aNode(e.sym); }
@@ -224,7 +224,7 @@
     }
 
-    Node tail(Edge e) const { 
+    Node source(Edge e) const { 
       return ((e.out_or_in) ? G.aNode(e.out) : G.aNode(e.in)); }
-    Node head(Edge e) const { 
+    Node target(Edge e) const { 
       return ((e.out_or_in) ? G.bNode(e.out) : G.bNode(e.in)); }
 
@@ -288,6 +288,6 @@
 	ResGWOutEdgeIt e=bfs;
 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	  Node v=res_graph.tail(e);
-	  Node w=res_graph.head(e);
+	  Node v=res_graph.source(e);
+	  Node w=res_graph.target(e);
 	  pred.set(w, e);
 	  if (res_graph.valid(pred.get(v))) {
@@ -296,5 +296,5 @@
 	    free.set(w, res_graph.resCap(e)); 
 	  }
-	  if (res_graph.head(e)==t) { _augment=true; break; }
+	  if (res_graph.target(e)==t) { _augment=true; break; }
 	}
 	
@@ -308,5 +308,5 @@
 	  ResGWEdge e=pred.get(n);
 	  res_graph.augment(e, augment_value); 
-	  n=res_graph.tail(e);
+	  n=res_graph.source(e);
 	}
       }
@@ -325,5 +325,5 @@
       int get(const typename MapGraphWrapper::Node& n) const { return dist[n]; }
       bool get(const typename MapGraphWrapper::Edge& e) const { 
-	return (dist.get(gw.tail(e))<dist.get(gw.head(e))); 
+	return (dist.get(gw.source(e))<dist.get(gw.target(e))); 
       }
     };
@@ -344,5 +344,5 @@
 	ResGWOutEdgeIt e=bfs;
 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 	}
 	++bfs;
@@ -370,6 +370,6 @@
 	typename FilterResGW::EdgeIt e;
 	for(filter_res_graph.first(e); filter_res_graph.valid(e); filter_res_graph.next(e)) {
-	  //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
-	  typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+	  //if (dist.get(res_graph.target(e))==dist.get(res_graph.source(e))+1) {
+	  typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 	  original_edge.update();
 	  original_edge.set(f, e);
@@ -424,5 +424,5 @@
 	    typename MG::Edge e=pred.get(n);
 	    res_graph.augment(original_edge.get(e), augment_value); 
-	    n=F.tail(e);
+	    n=F.source(e);
 	    if (residual_capacity.get(e)==augment_value) 
 	      F.erase(e); 
@@ -469,6 +469,6 @@
 	if (res_graph.valid(e)) {
 	  if (bfs.isBNodeNewlyReached()) {
-	    dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
-	    typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+	    dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
+	    typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 	    original_edge.update();
 	    original_edge.set(f, e);
@@ -476,6 +476,6 @@
 	    residual_capacity.set(f, res_graph.resCap(e));
 	  } else {
-	    if (dist.get(res_graph.head(e))==(dist.get(res_graph.tail(e))+1)) {
-	      typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+	    if (dist.get(res_graph.target(e))==(dist.get(res_graph.source(e))+1)) {
+	      typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 	      original_edge.update();
 	      original_edge.set(f, e);
@@ -532,5 +532,5 @@
 	    typename MG::Edge e=pred.get(n);
 	    res_graph.augment(original_edge.get(e), augment_value); 
-	    n=F.tail(e);
+	    n=F.source(e);
 	    if (residual_capacity.get(e)==augment_value) 
 	      F.erase(e); 
@@ -558,5 +558,5 @@
  	ResGWOutEdgeIt e=bfs;
  	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
- 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+ 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
  	}
 	++bfs;
@@ -634,5 +634,5 @@
  	    typename ErasingResGW::OutEdgeIt e=pred.get(n);
  	    res_graph.augment(e, augment_value);
- 	    n=erasing_res_graph.tail(e);
+ 	    n=erasing_res_graph.source(e);
  	    if (res_graph.resCap(e)==0)
  	      erasing_res_graph.erase(e);
@@ -669,5 +669,5 @@
 // 	typename ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt e=bfs;
 // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+// 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 // 	}
 // 	++bfs;	
@@ -723,5 +723,5 @@
 // 	    EAugEdge e=pred.get(n);
 // 	    res_graph.augment(e, augment_value);
-// 	    n=res_graph.tail(e);
+// 	    n=res_graph.source(e);
 // 	    if (res_graph.free(e)==0)
 // 	      res_graph.erase(e);
@@ -818,6 +818,6 @@
 // 	AugOutEdgeIt e=bfs;
 // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// 	  Node v=res_graph.tail(e);
-// 	  Node w=res_graph.head(e);
+// 	  Node v=res_graph.source(e);
+// 	  Node w=res_graph.target(e);
 // 	  pred.set(w, e);
 // 	  if (res_graph.valid(pred.get(v))) {
@@ -826,5 +826,5 @@
 // 	    free.set(w, res_graph.free(e)); 
 // 	  }
-// 	  n=res_graph.head(e);
+// 	  n=res_graph.target(e);
 // 	  if (T->get(n) && (used.get(n)<1) ) { 
 // 	    //Number u=0;
@@ -848,5 +848,5 @@
 // 	  AugEdge e=pred.get(n);
 // 	  res_graph.augment(e, augment_value); 
-// 	  n=res_graph.tail(e);
+// 	  n=res_graph.source(e);
 // 	}
 // 	used.set(n, 1); //mind2 vegen jav
@@ -889,5 +889,5 @@
 // // 	AugOutEdgeIt e=bfs;
 // // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// // 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+// // 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 // // 	}
 	
@@ -911,6 +911,6 @@
 // //       //which are in some shortest paths
 // //       for(typename AugGraph::EdgeIt e=res_graph.template first<typename AugGraph::EdgeIt>(); res_graph.valid(e); res_graph.next(e)) {
-// // 	if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
-// // 	  typename MutableGraph::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+// // 	if (dist.get(res_graph.target(e))==dist.get(res_graph.source(e))+1) {
+// // 	  typename MutableGraph::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 // // 	  original_edge.update();
 // // 	  original_edge.set(f, e);
@@ -964,5 +964,5 @@
 // // 	    typename MutableGraph::Edge e=pred.get(n);
 // // 	    res_graph.augment(original_edge.get(e), augment_value); 
-// // 	    n=F.tail(e);
+// // 	    n=F.source(e);
 // // 	    if (residual_capacity.get(e)==augment_value) 
 // // 	      F.erase(e); 
@@ -1015,5 +1015,5 @@
 // 	typename ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt e=bfs;
 // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+// 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 // 	}
 // 	++bfs;	
@@ -1092,5 +1092,5 @@
 // 	    EAugEdge e=pred.get(n);
 // 	    res_graph.augment(e, augment_value);
-// 	    n=res_graph.tail(e);
+// 	    n=res_graph.source(e);
 // 	    if (res_graph.free(e)==0)
 // 	      res_graph.erase(e);
@@ -1185,6 +1185,6 @@
 // // 	AugOutEdgeIt e=/*AugOutEdgeIt*/(bfs);
 // // 	if (e.valid() && bfs.isBNodeNewlyReached()) {
-// // 	  Node v=res_graph.tail(e);
-// // 	  Node w=res_graph.head(e);
+// // 	  Node v=res_graph.source(e);
+// // 	  Node w=res_graph.target(e);
 // // 	  pred.set(w, e);
 // // 	  if (pred.get(v).valid()) {
@@ -1193,7 +1193,7 @@
 // // 	    free.set(w, e.free()); 
 // // 	  }
-// // 	  if (TMap.get(res_graph.head(e))) { 
+// // 	  if (TMap.get(res_graph.target(e))) { 
 // // 	    _augment=true; 
-// // 	    reached_t_node=res_graph.head(e);
+// // 	    reached_t_node=res_graph.target(e);
 // // 	    break; 
 // // 	  }
@@ -1209,5 +1209,5 @@
 // // 	  AugEdge e=pred.get(n);
 // // 	  e.augment(augment_value); 
-// // 	  n=res_graph.tail(e);
+// // 	  n=res_graph.source(e);
 // // 	}
 // //       }
Index: src/work/marci/experiment/edmonds_karp_1.h
===================================================================
--- src/work/marci/experiment/edmonds_karp_1.h	(revision 921)
+++ src/work/marci/experiment/edmonds_karp_1.h	(revision 986)
@@ -42,5 +42,5 @@
       //Edge(const Edge& e) : resG(e.resG), sym(e.sym) { }
       Number free() const { 
-	if (resG->G.aNode(sym)==resG->G.tail(sym)) { 
+	if (resG->G.aNode(sym)==resG->G.source(sym)) { 
 	  return (resG->capacity.get(sym)-resG->flow.get(sym)); 
 	} else { 
@@ -50,5 +50,5 @@
       bool valid() const { return sym.valid(); }
       void augment(Number a) const {
-	if (resG->G.aNode(sym)==resG->G.tail(sym)) { 
+	if (resG->G.aNode(sym)==resG->G.source(sym)) { 
 	  resG->flow.set(sym, resG->flow.get(sym)+a);
 	  //resG->flow[sym]+=a;
@@ -98,6 +98,6 @@
     }
 
-    Node tail(Edge e) const { return G.aNode(e.sym); }
-    Node head(Edge e) const { return G.bNode(e.sym); }
+    Node source(Edge e) const { return G.aNode(e.sym); }
+    Node target(Edge e) const { return G.bNode(e.sym); }
 
     Node aNode(OutEdgeIt e) const { return G.aNode(e.sym); }
@@ -225,7 +225,7 @@
     }
 
-    Node tail(Edge e) const { 
+    Node source(Edge e) const { 
       return ((e.out_or_in) ? G.aNode(e.out) : G.aNode(e.in)); }
-    Node head(Edge e) const { 
+    Node target(Edge e) const { 
       return ((e.out_or_in) ? G.bNode(e.out) : G.bNode(e.in)); }
 
@@ -287,6 +287,6 @@
 	ResGWOutEdgeIt e=bfs;
 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	  Node v=res_graph.tail(e);
-	  Node w=res_graph.head(e);
+	  Node v=res_graph.source(e);
+	  Node w=res_graph.target(e);
 	  pred.set(w, e);
 	  if (res_graph.valid(pred.get(v))) {
@@ -295,5 +295,5 @@
 	    free.set(w, res_graph.resCap(e)); 
 	  }
-	  if (res_graph.head(e)==t) { _augment=true; break; }
+	  if (res_graph.target(e)==t) { _augment=true; break; }
 	}
 	
@@ -307,5 +307,5 @@
 	  ResGWEdge e=pred.get(n);
 	  res_graph.augment(e, augment_value); 
-	  n=res_graph.tail(e);
+	  n=res_graph.source(e);
 	}
       }
@@ -324,5 +324,5 @@
       int get(const typename MapGraphWrapper::Node& n) const { return dist[n]; }
       bool get(const typename MapGraphWrapper::Edge& e) const { 
-	return (dist.get(g->tail(e))<dist.get(g->head(e))); 
+	return (dist.get(g->source(e))<dist.get(g->target(e))); 
       }
     };
@@ -343,5 +343,5 @@
 	ResGWOutEdgeIt e=bfs;
 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 	}
 	++bfs;
@@ -369,6 +369,6 @@
 	typename FilterResGW::EdgeIt e;
 	for(filter_res_graph.first(e); filter_res_graph.valid(e); filter_res_graph.next(e)) {
-	  //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
-	  typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+	  //if (dist.get(res_graph.target(e))==dist.get(res_graph.source(e))+1) {
+	  typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 	  original_edge.update();
 	  original_edge.set(f, e);
@@ -423,5 +423,5 @@
 	    typename MG::Edge e=pred.get(n);
 	    res_graph.augment(original_edge.get(e), augment_value); 
-	    n=F.tail(e);
+	    n=F.source(e);
 	    if (residual_capacity.get(e)==augment_value) 
 	      F.erase(e); 
@@ -468,6 +468,6 @@
 	if (res_graph.valid(e)) {
 	  if (bfs.isBNodeNewlyReached()) {
-	    dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
-	    typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+	    dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
+	    typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 	    original_edge.update();
 	    original_edge.set(f, e);
@@ -475,6 +475,6 @@
 	    residual_capacity.set(f, res_graph.resCap(e));
 	  } else {
-	    if (dist.get(res_graph.head(e))==(dist.get(res_graph.tail(e))+1)) {
-	      typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+	    if (dist.get(res_graph.target(e))==(dist.get(res_graph.source(e))+1)) {
+	      typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 	      original_edge.update();
 	      original_edge.set(f, e);
@@ -531,5 +531,5 @@
 	    typename MG::Edge e=pred.get(n);
 	    res_graph.augment(original_edge.get(e), augment_value); 
-	    n=F.tail(e);
+	    n=F.source(e);
 	    if (residual_capacity.get(e)==augment_value) 
 	      F.erase(e); 
@@ -557,5 +557,5 @@
  	ResGWOutEdgeIt e=bfs;
  	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
- 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+ 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
  	}
 	++bfs;
@@ -633,5 +633,5 @@
  	    typename ErasingResGW::OutEdgeIt e=pred.get(n);
  	    res_graph.augment(e, augment_value);
- 	    n=erasing_res_graph.tail(e);
+ 	    n=erasing_res_graph.source(e);
  	    if (res_graph.resCap(e)==0)
  	      erasing_res_graph.erase(e);
@@ -728,6 +728,6 @@
 // 	AugOutEdgeIt e=bfs;
 // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// 	  Node v=res_graph.tail(e);
-// 	  Node w=res_graph.head(e);
+// 	  Node v=res_graph.source(e);
+// 	  Node w=res_graph.target(e);
 // 	  pred.set(w, e);
 // 	  if (res_graph.valid(pred.get(v))) {
@@ -736,5 +736,5 @@
 // 	    free.set(w, res_graph.free(e)); 
 // 	  }
-// 	  n=res_graph.head(e);
+// 	  n=res_graph.target(e);
 // 	  if (T->get(n) && (used.get(n)<1) ) { 
 // 	    //Number u=0;
@@ -758,5 +758,5 @@
 // 	  AugEdge e=pred.get(n);
 // 	  res_graph.augment(e, augment_value); 
-// 	  n=res_graph.tail(e);
+// 	  n=res_graph.source(e);
 // 	}
 // 	used.set(n, 1); //mind2 vegen jav
@@ -799,5 +799,5 @@
 // // 	AugOutEdgeIt e=bfs;
 // // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// // 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+// // 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 // // 	}
 	
@@ -821,6 +821,6 @@
 // //       //which are in some shortest paths
 // //       for(typename AugGraph::EdgeIt e=res_graph.template first<typename AugGraph::EdgeIt>(); res_graph.valid(e); res_graph.next(e)) {
-// // 	if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
-// // 	  typename MutableGraph::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+// // 	if (dist.get(res_graph.target(e))==dist.get(res_graph.source(e))+1) {
+// // 	  typename MutableGraph::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 // // 	  original_edge.update();
 // // 	  original_edge.set(f, e);
@@ -874,5 +874,5 @@
 // // 	    typename MutableGraph::Edge e=pred.get(n);
 // // 	    res_graph.augment(original_edge.get(e), augment_value); 
-// // 	    n=F.tail(e);
+// // 	    n=F.source(e);
 // // 	    if (residual_capacity.get(e)==augment_value) 
 // // 	      F.erase(e); 
@@ -925,5 +925,5 @@
 // 	typename ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt e=bfs;
 // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+// 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 // 	}
 // 	++bfs;	
@@ -1002,5 +1002,5 @@
 // 	    EAugEdge e=pred.get(n);
 // 	    res_graph.augment(e, augment_value);
-// 	    n=res_graph.tail(e);
+// 	    n=res_graph.source(e);
 // 	    if (res_graph.free(e)==0)
 // 	      res_graph.erase(e);
@@ -1095,6 +1095,6 @@
 // // 	AugOutEdgeIt e=/*AugOutEdgeIt*/(bfs);
 // // 	if (e.valid() && bfs.isBNodeNewlyReached()) {
-// // 	  Node v=res_graph.tail(e);
-// // 	  Node w=res_graph.head(e);
+// // 	  Node v=res_graph.source(e);
+// // 	  Node w=res_graph.target(e);
 // // 	  pred.set(w, e);
 // // 	  if (pred.get(v).valid()) {
@@ -1103,7 +1103,7 @@
 // // 	    free.set(w, e.free()); 
 // // 	  }
-// // 	  if (TMap.get(res_graph.head(e))) { 
+// // 	  if (TMap.get(res_graph.target(e))) { 
 // // 	    _augment=true; 
-// // 	    reached_t_node=res_graph.head(e);
+// // 	    reached_t_node=res_graph.target(e);
 // // 	    break; 
 // // 	  }
@@ -1119,5 +1119,5 @@
 // // 	  AugEdge e=pred.get(n);
 // // 	  e.augment(augment_value); 
-// // 	  n=res_graph.tail(e);
+// // 	  n=res_graph.source(e);
 // // 	}
 // //       }
Index: src/work/marci/experiment/edmonds_karp_demo.cc
===================================================================
--- src/work/marci/experiment/edmonds_karp_demo.cc	(revision 921)
+++ src/work/marci/experiment/edmonds_karp_demo.cc	(revision 986)
@@ -105,13 +105,13 @@
     while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
-//     }
-//     std::cout<<std::endl;
-      ++i; 
-    }
-
-//   std::cout << "maximum flow: "<< std::endl;
-//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
+//     }
+//     std::cout<<std::endl;
+      ++i; 
+    }
+
+//   std::cout << "maximum flow: "<< std::endl;
+//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
@@ -136,13 +136,13 @@
     while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
-//     }
-//     std::cout<<std::endl;
-      ++i; 
-    }
-
-//   std::cout << "maximum flow: "<< std::endl;
-//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
+//     }
+//     std::cout<<std::endl;
+      ++i; 
+    }
+
+//   std::cout << "maximum flow: "<< std::endl;
+//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
@@ -167,13 +167,13 @@
     while (max_flow_test.augmentOnBlockingFlow2()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
-//     }
-//     std::cout<<std::endl;
-      ++i; 
-    }
-
-//   std::cout << "maximum flow: "<< std::endl;
-//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
+//     }
+//     std::cout<<std::endl;
+      ++i; 
+    }
+
+//   std::cout << "maximum flow: "<< std::endl;
+//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
@@ -198,13 +198,13 @@
     while (max_flow_test.augmentOnShortestPath()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
-//     }
-//     std::cout<<std::endl;
-      ++i; 
-    }
-
-//   std::cout << "maximum flow: "<< std::endl;
-//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
+//     }
+//     std::cout<<std::endl;
+      ++i; 
+    }
+
+//   std::cout << "maximum flow: "<< std::endl;
+//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
Index: src/work/marci/experiment/edmonds_karp_demo_1.cc
===================================================================
--- src/work/marci/experiment/edmonds_karp_demo_1.cc	(revision 921)
+++ src/work/marci/experiment/edmonds_karp_demo_1.cc	(revision 986)
@@ -105,13 +105,13 @@
     while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
-//     }
-//     std::cout<<std::endl;
-      ++i; 
-    }
-
-//   std::cout << "maximum flow: "<< std::endl;
-//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
+//     }
+//     std::cout<<std::endl;
+      ++i; 
+    }
+
+//   std::cout << "maximum flow: "<< std::endl;
+//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
@@ -136,13 +136,13 @@
     while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
-//     }
-//     std::cout<<std::endl;
-      ++i; 
-    }
-
-//   std::cout << "maximum flow: "<< std::endl;
-//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
+//     }
+//     std::cout<<std::endl;
+      ++i; 
+    }
+
+//   std::cout << "maximum flow: "<< std::endl;
+//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
@@ -167,13 +167,13 @@
     while (max_flow_test.augmentOnBlockingFlow2()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
-//     }
-//     std::cout<<std::endl;
-      ++i; 
-    }
-
-//   std::cout << "maximum flow: "<< std::endl;
-//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
+//     }
+//     std::cout<<std::endl;
+      ++i; 
+    }
+
+//   std::cout << "maximum flow: "<< std::endl;
+//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
@@ -198,13 +198,13 @@
     while (max_flow_test.augmentOnShortestPath()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
-//     }
-//     std::cout<<std::endl;
-      ++i; 
-    }
-
-//   std::cout << "maximum flow: "<< std::endl;
-//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
+//     }
+//     std::cout<<std::endl;
+      ++i; 
+    }
+
+//   std::cout << "maximum flow: "<< std::endl;
+//   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
Index: src/work/marci/experiment/graph_wrapper.h
===================================================================
--- src/work/marci/experiment/graph_wrapper.h	(revision 921)
+++ src/work/marci/experiment/graph_wrapper.h	(revision 986)
@@ -97,6 +97,6 @@
       It e; first(e, v); return e; }
 
-    Node head(const Edge& e) const { return graph->head(e); }
-    Node tail(const Edge& e) const { return graph->tail(e); }
+    Node target(const Edge& e) const { return graph->target(e); }
+    Node source(const Edge& e) const { return graph->source(e); }
 
     template<typename I> bool valid(const I& i) const 
@@ -115,6 +115,6 @@
   
     Node addNode() const { return graph->addNode(); }
-    Edge addEdge(const Node& tail, const Node& head) const { 
-      return graph->addEdge(tail, head); }
+    Edge addEdge(const Node& source, const Node& target) const { 
+      return graph->addEdge(source, target); }
   
     template<typename I> void erase(const I& i) const { graph->erase(i); }
@@ -246,6 +246,6 @@
       It e; this->first(e, v); return e; }
 
-    Node head(const Edge& e) const { return gw.head(e); }
-    Node tail(const Edge& e) const { return gw.tail(e); }
+    Node target(const Edge& e) const { return gw.target(e); }
+    Node source(const Edge& e) const { return gw.source(e); }
 
     template<typename I> bool valid(const I& i) const { return gw.valid(i); }
@@ -261,6 +261,6 @@
   
     Node addNode() const { return gw.addNode(); }
-    Edge addEdge(const Node& tail, const Node& head) const { 
-      return gw.addEdge(tail, head); }
+    Edge addEdge(const Node& source, const Node& target) const { 
+      return gw.addEdge(source, target); }
   
     template<typename I> void erase(const I& i) const { gw.erase(i); }
@@ -323,6 +323,6 @@
 //       It e; first(e, v); return e; }
 
-//     Node head(const Edge& e) const { return graph->tail(e); }
-//     Node tail(const Edge& e) const { return graph->head(e); }
+//     Node target(const Edge& e) const { return graph->source(e); }
+//     Node source(const Edge& e) const { return graph->target(e); }
   
 //     template<typename I> bool valid(const I& i) const 
@@ -338,6 +338,6 @@
 
 //     Node addNode() const { return graph->addNode(); }
-//     Edge addEdge(const Node& tail, const Node& head) const { 
-//       return graph->addEdge(tail, head); }
+//     Edge addEdge(const Node& source, const Node& target) const { 
+//       return graph->addEdge(source, target); }
   
 //     int nodeNum() const { return graph->nodeNum(); }
@@ -404,6 +404,6 @@
 //     //  It e; first(e, v); return e; }
 
-//     //Node head(const Edge& e) const { return graph->tail(e); }
-//     //Node tail(const Edge& e) const { return graph->head(e); }
+//     //Node target(const Edge& e) const { return graph->source(e); }
+//     //Node source(const Edge& e) const { return graph->target(e); }
   
 //     //template<typename I> bool valid(const I& i) const 
@@ -419,6 +419,6 @@
 
 //     //Node addNode() const { return graph->addNode(); }
-//     //Edge addEdge(const Node& tail, const Node& head) const { 
-//     //  return graph->addEdge(tail, head); }
+//     //Edge addEdge(const Node& source, const Node& target) const { 
+//     //  return graph->addEdge(source, target); }
   
 //     //int nodeNum() const { return graph->nodeNum(); }
@@ -468,8 +468,8 @@
       GraphWrapper<GraphWrapper>(_gw) { }  
 
-    Node head(const Edge& e) const 
-      { return GraphWrapper<GraphWrapper>::tail(e); }
-    Node tail(const Edge& e) const 
-      { return GraphWrapper<GraphWrapper>::head(e); }
+    Node target(const Edge& e) const 
+      { return GraphWrapper<GraphWrapper>::source(e); }
+    Node source(const Edge& e) const 
+      { return GraphWrapper<GraphWrapper>::target(e); }
   };
 
@@ -600,5 +600,5 @@
 //     OutEdgeIt& next(OutEdgeIt& e) const {
 //       if (e.out_or_in) {
-// 	Node n=gw.tail(e.out);
+// 	Node n=gw.source(e.out);
 // 	gw.next(e.out);
 // 	if (!gw.valid(e.out)) {
@@ -613,7 +613,7 @@
 
 //     Node aNode(const OutEdgeIt& e) const { 
-//       if (e.out_or_in) return gw.tail(e); else return gw.head(e); }
+//       if (e.out_or_in) return gw.source(e); else return gw.target(e); }
 //     Node bNode(const OutEdgeIt& e) const { 
-//       if (e.out_or_in) return gw.head(e); else return gw.tail(e); }
+//       if (e.out_or_in) return gw.target(e); else return gw.source(e); }
 
 //     typedef OutEdgeIt InEdgeIt; 
@@ -633,6 +633,6 @@
 //       It e; first(e, v); return e; }
 
-//     Node head(const Edge& e) const { return gw.head(e); }
-//     Node tail(const Edge& e) const { return gw.tail(e); }
+//     Node target(const Edge& e) const { return gw.target(e); }
+//     Node source(const Edge& e) const { return gw.source(e); }
 
 //     template<typename I> bool valid(const I& i) const 
@@ -652,6 +652,6 @@
 //     Node addNode() const { return gw.addNode(); }
 // // FIXME: ez igy nem jo, mert nem
-// //    Edge addEdge(const Node& tail, const Node& head) const { 
-// //      return graph->addEdge(tail, head); }
+// //    Edge addEdge(const Node& source, const Node& target) const { 
+// //      return graph->addEdge(source, target); }
   
 //     template<typename I> void erase(const I& i) const { gw.erase(i); }
@@ -799,5 +799,5 @@
     OutEdgeIt& next(OutEdgeIt& e) const {
       if (e.out_or_in) {
-	Node n=gw.tail(e.out);
+	Node n=gw.source(e.out);
 	gw.next(e.out);
 	if (!gw.valid(e.out)) { e.out_or_in=false; gw.first(e.in, n); }
@@ -809,5 +809,5 @@
 
     EdgeIt& next(EdgeIt& e) const {
-      //NodeIt v=tail(e);
+      //NodeIt v=source(e);
       gw.next(e.out);
       while (valid(e.v) && !gw.valid(e.out)) { 
@@ -827,6 +827,6 @@
       It e; first(e, v); return e; }
 
-//    Node head(const Edge& e) const { return gw.head(e); }
-//    Node tail(const Edge& e) const { return gw.tail(e); }
+//    Node target(const Edge& e) const { return gw.target(e); }
+//    Node source(const Edge& e) const { return gw.source(e); }
 
 //    template<typename I> bool valid(const I& i) const 
@@ -842,13 +842,13 @@
 
     Node aNode(const OutEdgeIt& e) const { 
-      if (e.out_or_in) return gw.tail(e); else return gw.head(e); }
+      if (e.out_or_in) return gw.source(e); else return gw.target(e); }
     Node bNode(const OutEdgeIt& e) const { 
-      if (e.out_or_in) return gw.head(e); else return gw.tail(e); }
+      if (e.out_or_in) return gw.target(e); else return gw.source(e); }
   
 //    Node addNode() const { return gw.addNode(); }
 
 // FIXME: ez igy nem jo, mert nem
-//    Edge addEdge(const Node& tail, const Node& head) const { 
-//      return graph->addEdge(tail, head); }
+//    Edge addEdge(const Node& source, const Node& target) const { 
+//      return graph->addEdge(source, target); }
   
 //    template<typename I> void erase(const I& i) const { gw.erase(i); }
@@ -914,6 +914,6 @@
 //       It e; first(e, v); return e; }
 
-//     Node head(const Edge& e) const { return graph->head(e); }
-//     Node tail(const Edge& e) const { return graph->tail(e); }
+//     Node target(const Edge& e) const { return graph->target(e); }
+//     Node source(const Edge& e) const { return graph->source(e); }
   
 //     template<typename I> Node aNode(const I& e) const { 
@@ -929,6 +929,6 @@
   
 //     Node addNode() { return graph->addNode(); }
-//     Edge addEdge(const Node& tail, const Node& head) { 
-//       return graph->addEdge(tail, head); }
+//     Edge addEdge(const Node& source, const Node& target) { 
+//       return graph->addEdge(source, target); }
   
 //     template<typename I> void erase(const I& i) { graph->erase(i); }
@@ -1181,7 +1181,7 @@
     }
 
-    Node tail(Edge e) const { 
+    Node source(Edge e) const { 
       return ((e.out_or_in) ? gw.aNode(e.out) : gw.aNode(e.in)); }
-    Node head(Edge e) const { 
+    Node target(Edge e) const { 
       return ((e.out_or_in) ? gw.bNode(e.out) : gw.bNode(e.in)); }
 
@@ -1312,5 +1312,5 @@
       OutEdgeIt f=e;
       this->next(f);
-      first_out_edges->set(this->tail(e), f);
+      first_out_edges->set(this->source(e), f);
     }
   };
@@ -1382,6 +1382,6 @@
 //       It e; first(e, v); return e; }
 
-//     //Node head(const Edge& e) const { return gw.head(e); }
-//     //Node tail(const Edge& e) const { return gw.tail(e); }
+//     //Node target(const Edge& e) const { return gw.target(e); }
+//     //Node source(const Edge& e) const { return gw.source(e); }
 
 //     //template<typename I> bool valid(const I& i) const 
@@ -1397,14 +1397,14 @@
   
 //     //Node addNode() const { return gw.addNode(); }
-//     //Edge addEdge(const Node& tail, const Node& head) const { 
-//     //  return gw.addEdge(tail, head); }
+//     //Edge addEdge(const Node& source, const Node& target) const { 
+//     //  return gw.addEdge(source, target); }
   
 //     //void erase(const OutEdgeIt& e) {
-//     //  first_out_edge(this->tail(e))=e;
+//     //  first_out_edge(this->source(e))=e;
 //     //}
 //     void erase(const Edge& e) {
 //       OutEdgeIt f(e);
 //       next(f);
-//       first_out_edges.set(this->tail(e), f);
+//       first_out_edges.set(this->source(e), f);
 //     }
 //     //template<typename I> void erase(const I& i) const { gw.erase(i); }
@@ -1460,5 +1460,5 @@
 //     OutEdgeIt& first(OutEdgeIt& e, const Node& n) const {
 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::first(e, n);
-//       while (valid(e) && (dist.get(tail(e))/*+1!=*/>=dist.get(head(e)))) 
+//       while (valid(e) && (dist.get(source(e))/*+1!=*/>=dist.get(target(e)))) 
 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
 //       return e;
@@ -1471,5 +1471,5 @@
 //     OutEdgeIt& next(OutEdgeIt& e) const {
 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
-//       while (valid(e) && (dist.get(tail(e))/*+1!*/>=dist.get(head(e)))) 
+//       while (valid(e) && (dist.get(source(e))/*+1!*/>=dist.get(target(e)))) 
 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
 //       return e;
@@ -1483,7 +1483,7 @@
 //       OutEdgeIt f(e);
 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f);
-//       while (valid(f) && (dist.get(tail(f))/*+1!=*/>=dist.get(head(f)))) 
+//       while (valid(f) && (dist.get(source(f))/*+1!=*/>=dist.get(target(f)))) 
 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f);
-//       first_out_edges.set(this->tail(e), f);
+//       first_out_edges.set(this->source(e), f);
 //     }
 
@@ -1508,6 +1508,6 @@
 //       It e; first(e, v); return e; }
 
-//     //Node head(const Edge& e) const { return gw.head(e); }
-//     //Node tail(const Edge& e) const { return gw.tail(e); }
+//     //Node target(const Edge& e) const { return gw.target(e); }
+//     //Node source(const Edge& e) const { return gw.source(e); }
 
 //     //template<typename I> bool valid(const I& i) const 
@@ -1526,6 +1526,6 @@
   
 //     //Node addNode() const { return gw.addNode(); }
-//     //Edge addEdge(const Node& tail, const Node& head) const { 
-//     //  return gw.addEdge(tail, head); }
+//     //Edge addEdge(const Node& source, const Node& target) const { 
+//     //  return gw.addEdge(source, target); }
   
 //     //template<typename I> void erase(const I& i) const { gw.erase(i); }
@@ -1670,6 +1670,6 @@
 //       It e; first(e, v); return e; }
 
-//     Node head(const Edge& e) const { return gw.head(e); }
-//     Node tail(const Edge& e) const { return gw.tail(e); }
+//     Node target(const Edge& e) const { return gw.target(e); }
+//     Node source(const Edge& e) const { return gw.source(e); }
   
 //     template<typename I> Node aNode(const I& e) const { 
@@ -1685,6 +1685,6 @@
   
 //     Node addNode() { return gw.addNode(); }
-//     Edge addEdge(const Node& tail, const Node& head) { 
-//       return gw.addEdge(tail, head); }
+//     Edge addEdge(const Node& source, const Node& target) { 
+//       return gw.addEdge(source, target); }
   
 //     template<typename I> void erase(const I& i) { gw.erase(i); }
Index: src/work/marci/experiment/graph_wrapper_1.h
===================================================================
--- src/work/marci/experiment/graph_wrapper_1.h	(revision 921)
+++ src/work/marci/experiment/graph_wrapper_1.h	(revision 986)
@@ -91,6 +91,6 @@
       It e; this->first(e, v); return e; }
 
-    Node head(const Edge& e) const { return graph->head(e); }
-    Node tail(const Edge& e) const { return graph->tail(e); }
+    Node target(const Edge& e) const { return graph->target(e); }
+    Node source(const Edge& e) const { return graph->source(e); }
 
     template<typename I> bool valid(const I& i) const { 
@@ -109,6 +109,6 @@
   
     Node addNode() const { return graph->addNode(); }
-    Edge addEdge(const Node& tail, const Node& head) const { 
-      return graph->addEdge(tail, head); }
+    Edge addEdge(const Node& source, const Node& target) const { 
+      return graph->addEdge(source, target); }
   
     template<typename I> void erase(const I& i) const { graph->erase(i); }
@@ -236,6 +236,6 @@
       It e; this->first(e, v); return e; }
 
-    Node head(const Edge& e) const { return graph->head(e); }
-    Node tail(const Edge& e) const { return graph->tail(e); }
+    Node target(const Edge& e) const { return graph->target(e); }
+    Node source(const Edge& e) const { return graph->source(e); }
 
     template<typename I> bool valid(const I& i) const { 
@@ -254,6 +254,6 @@
   
     Node addNode() const { return graph->addNode(); }
-    Edge addEdge(const Node& tail, const Node& head) const { 
-      return graph->addEdge(tail, head); }
+    Edge addEdge(const Node& source, const Node& target) const { 
+      return graph->addEdge(source, target); }
   
     template<typename I> void erase(const I& i) const { graph->erase(i); }
@@ -317,6 +317,6 @@
 //       It e; first(e, v); return e; }
 
-//     Node head(const Edge& e) const { return graph->tail(e); }
-//     Node tail(const Edge& e) const { return graph->head(e); }
+//     Node target(const Edge& e) const { return graph->source(e); }
+//     Node source(const Edge& e) const { return graph->target(e); }
   
 //     template<typename I> bool valid(const I& i) const 
@@ -332,6 +332,6 @@
 
 //     Node addNode() const { return graph->addNode(); }
-//     Edge addEdge(const Node& tail, const Node& head) const { 
-//       return graph->addEdge(tail, head); }
+//     Edge addEdge(const Node& source, const Node& target) const { 
+//       return graph->addEdge(source, target); }
   
 //     int nodeNum() const { return graph->nodeNum(); }
@@ -379,8 +379,8 @@
     RevGraphWrapper(Graph& _graph) : GraphWrapper<Graph>(_graph) { }  
 
-    Node head(const Edge& e) const 
-      { return GraphWrapper<Graph>::tail(e); }
-    Node tail(const Edge& e) const 
-      { return GraphWrapper<Graph>::head(e); }
+    Node target(const Edge& e) const 
+      { return GraphWrapper<Graph>::source(e); }
+    Node source(const Edge& e) const 
+      { return GraphWrapper<Graph>::target(e); }
   };
 
@@ -512,5 +512,5 @@
 //     OutEdgeIt& next(OutEdgeIt& e) const {
 //       if (e.out_or_in) {
-// 	Node n=gw.tail(e.out);
+// 	Node n=gw.source(e.out);
 // 	gw.next(e.out);
 // 	if (!gw.valid(e.out)) {
@@ -525,7 +525,7 @@
 
 //     Node aNode(const OutEdgeIt& e) const { 
-//       if (e.out_or_in) return gw.tail(e); else return gw.head(e); }
+//       if (e.out_or_in) return gw.source(e); else return gw.target(e); }
 //     Node bNode(const OutEdgeIt& e) const { 
-//       if (e.out_or_in) return gw.head(e); else return gw.tail(e); }
+//       if (e.out_or_in) return gw.target(e); else return gw.source(e); }
 
 //     typedef OutEdgeIt InEdgeIt; 
@@ -545,6 +545,6 @@
 //       It e; first(e, v); return e; }
 
-//     Node head(const Edge& e) const { return gw.head(e); }
-//     Node tail(const Edge& e) const { return gw.tail(e); }
+//     Node target(const Edge& e) const { return gw.target(e); }
+//     Node source(const Edge& e) const { return gw.source(e); }
 
 //     template<typename I> bool valid(const I& i) const 
@@ -564,6 +564,6 @@
 //     Node addNode() const { return gw.addNode(); }
 // // FIXME: ez igy nem jo, mert nem
-// //    Edge addEdge(const Node& tail, const Node& head) const { 
-// //      return graph->addEdge(tail, head); }
+// //    Edge addEdge(const Node& source, const Node& target) const { 
+// //      return graph->addEdge(source, target); }
   
 //     template<typename I> void erase(const I& i) const { gw.erase(i); }
@@ -693,5 +693,5 @@
     OutEdgeIt& next(OutEdgeIt& e) const {
       if (e.out_or_in) {
-	Node n=graph->tail(e.out);
+	Node n=graph->source(e.out);
 	graph->next(e.out);
 	if (!graph->valid(e.out)) { e.out_or_in=false; graph->first(e.in, n); }
@@ -703,5 +703,5 @@
 
     EdgeIt& next(EdgeIt& e) const {
-      //NodeIt v=tail(e);
+      //NodeIt v=source(e);
       graph->next(e.out);
       while (valid(e.v) && !graph->valid(e.out)) { 
@@ -721,6 +721,6 @@
       It e; this->first(e, v); return e; }
 
-//    Node head(const Edge& e) const { return gw.head(e); }
-//    Node tail(const Edge& e) const { return gw.tail(e); }
+//    Node target(const Edge& e) const { return gw.target(e); }
+//    Node source(const Edge& e) const { return gw.source(e); }
 
 //    template<typename I> bool valid(const I& i) const 
@@ -736,13 +736,13 @@
 
     Node aNode(const OutEdgeIt& e) const { 
-      if (e.out_or_in) return graph->tail(e); else return graph->head(e); }
+      if (e.out_or_in) return graph->source(e); else return graph->target(e); }
     Node bNode(const OutEdgeIt& e) const { 
-      if (e.out_or_in) return graph->head(e); else return graph->tail(e); }
+      if (e.out_or_in) return graph->target(e); else return graph->source(e); }
   
 //    Node addNode() const { return gw.addNode(); }
 
 // FIXME: ez igy nem jo, mert nem
-//    Edge addEdge(const Node& tail, const Node& head) const { 
-//      return graph->addEdge(tail, head); }
+//    Edge addEdge(const Node& source, const Node& target) const { 
+//      return graph->addEdge(source, target); }
   
 //    template<typename I> void erase(const I& i) const { gw.erase(i); }
@@ -808,6 +808,6 @@
 //       It e; first(e, v); return e; }
 
-//     Node head(const Edge& e) const { return graph->head(e); }
-//     Node tail(const Edge& e) const { return graph->tail(e); }
+//     Node target(const Edge& e) const { return graph->target(e); }
+//     Node source(const Edge& e) const { return graph->source(e); }
   
 //     template<typename I> Node aNode(const I& e) const { 
@@ -823,6 +823,6 @@
   
 //     Node addNode() { return graph->addNode(); }
-//     Edge addEdge(const Node& tail, const Node& head) { 
-//       return graph->addEdge(tail, head); }
+//     Edge addEdge(const Node& source, const Node& target) { 
+//       return graph->addEdge(source, target); }
   
 //     template<typename I> void erase(const I& i) { graph->erase(i); }
@@ -1064,7 +1064,7 @@
     }
 
-    Node tail(Edge e) const { 
+    Node source(Edge e) const { 
       return ((e.out_or_in) ? graph->aNode(e.out) : graph->aNode(e.in)); }
-    Node head(Edge e) const { 
+    Node target(Edge e) const { 
       return ((e.out_or_in) ? graph->bNode(e.out) : graph->bNode(e.in)); }
 
@@ -1193,5 +1193,5 @@
       OutEdgeIt f=e;
       this->next(f);
-      first_out_edges->set(this->tail(e), f);
+      first_out_edges->set(this->source(e), f);
     }
   };
@@ -1311,6 +1311,6 @@
 //       It e; first(e, v); return e; }
 
-//     Node head(const Edge& e) const { return gw.head(e); }
-//     Node tail(const Edge& e) const { return gw.tail(e); }
+//     Node target(const Edge& e) const { return gw.target(e); }
+//     Node source(const Edge& e) const { return gw.source(e); }
   
 //     template<typename I> Node aNode(const I& e) const { 
@@ -1326,6 +1326,6 @@
   
 //     Node addNode() { return gw.addNode(); }
-//     Edge addEdge(const Node& tail, const Node& head) { 
-//       return gw.addEdge(tail, head); }
+//     Edge addEdge(const Node& source, const Node& target) { 
+//       return gw.addEdge(source, target); }
   
 //     template<typename I> void erase(const I& i) { gw.erase(i); }
Index: src/work/marci/experiment/graph_wrapper_st_ostream_op.h
===================================================================
--- src/work/marci/experiment/graph_wrapper_st_ostream_op.h	(revision 921)
+++ src/work/marci/experiment/graph_wrapper_st_ostream_op.h	(revision 986)
@@ -167,8 +167,8 @@
     EdgeIt& next(EdgeIt& i) const { graph->next(i.e); return i; }    
 
-    Node tail(const Edge& e) const { 
-      return Node(graph->tail(static_cast<typename Graph::Edge>(e))); }
-    Node head(const Edge& e) const { 
-      return Node(graph->head(static_cast<typename Graph::Edge>(e))); }
+    Node source(const Edge& e) const { 
+      return Node(graph->source(static_cast<typename Graph::Edge>(e))); }
+    Node target(const Edge& e) const { 
+      return Node(graph->target(static_cast<typename Graph::Edge>(e))); }
 
     bool valid(const Node& n) const { 
@@ -186,6 +186,6 @@
   
     Node addNode() const { return Node(graph->addNode()); }
-    Edge addEdge(const Node& tail, const Node& head) const { 
-      return Edge(graph->addEdge(tail, head)); }
+    Edge addEdge(const Node& source, const Node& target) const { 
+      return Edge(graph->addEdge(source, target)); }
 
     void erase(const Node& i) const { graph->erase(i); }
@@ -273,8 +273,8 @@
       return Node(this->graph->bNode(e.e)); }
 
-    Node tail(const Edge& e) const { 
-      return GraphWrapper<Graph>::head(e); }
-    Node head(const Edge& e) const { 
-      return GraphWrapper<Graph>::tail(e); }
+    Node source(const Edge& e) const { 
+      return GraphWrapper<Graph>::target(e); }
+    Node target(const Edge& e) const { 
+      return GraphWrapper<Graph>::source(e); }
 
   };
@@ -490,5 +490,5 @@
     OutEdgeIt& next(OutEdgeIt& e) const {
       if (e.out_or_in) {
-	typename Graph::Node n=this->graph->tail(e.out);
+	typename Graph::Node n=this->graph->source(e.out);
 	this->graph->next(e.out);
 	if (!this->graph->valid(e.out)) { 
@@ -507,9 +507,9 @@
 
     Node aNode(const OutEdgeIt& e) const { 
-      if (e.out_or_in) return this->graph->tail(e); else 
-	return this->graph->head(e); }
+      if (e.out_or_in) return this->graph->source(e); else 
+	return this->graph->target(e); }
     Node bNode(const OutEdgeIt& e) const { 
-      if (e.out_or_in) return this->graph->head(e); else 
-	return this->graph->tail(e); }
+      if (e.out_or_in) return this->graph->target(e); else 
+	return this->graph->source(e); }
   };
   
@@ -725,8 +725,8 @@
     }
 
-    Node tail(Edge e) const { 
-      return ((e.forward) ? this->graph->tail(e) : this->graph->head(e)); }
-    Node head(Edge e) const { 
-      return ((e.forward) ? this->graph->head(e) : this->graph->tail(e)); }
+    Node source(Edge e) const { 
+      return ((e.forward) ? this->graph->source(e) : this->graph->target(e)); }
+    Node target(Edge e) const { 
+      return ((e.forward) ? this->graph->target(e) : this->graph->source(e)); }
 
     Node aNode(OutEdgeIt e) const { 
@@ -914,5 +914,5 @@
       OutEdgeIt f=e;
       this->next(f);
-      first_out_edges->set(this->tail(e), f.e);
+      first_out_edges->set(this->source(e), f.e);
     }
   };
@@ -1042,15 +1042,15 @@
     InEdgeIt& next(InEdgeIt& i) const { this->graph->next(i.e); return i; }
 
-    Node tail(const Edge& e) { 
-      if (!(*(this->s_false_t_true_map))[this->graph->tail(e)]) 
-	return Node(this->graph->tail(e));
+    Node source(const Edge& e) { 
+      if (!(*(this->s_false_t_true_map))[this->graph->source(e)]) 
+	return Node(this->graph->source(e));
       else
-	return Node(this->graph->head(e));	
-    }
-    Node head(const Edge& e) { 
-      if (!(*(this->s_false_t_true_map))[this->graph->tail(e)]) 
-	return Node(this->graph->head(e));
+	return Node(this->graph->target(e));	
+    }
+    Node target(const Edge& e) { 
+      if (!(*(this->s_false_t_true_map))[this->graph->source(e)]) 
+	return Node(this->graph->target(e));
       else
-	return Node(this->graph->tail(e));	
+	return Node(this->graph->source(e));	
     }
 
@@ -1470,8 +1470,8 @@
     }    
 
-    Node tail(const Edge& e) const { 
+    Node source(const Edge& e) const { 
       switch (e.spec) {
       case 0: 
-	return Node(this->graph->tail(e));
+	return Node(this->graph->source(e));
 	break;
       case 1:
@@ -1484,8 +1484,8 @@
       }
     }
-    Node head(const Edge& e) const { 
+    Node target(const Edge& e) const { 
       switch (e.spec) {
       case 0: 
-	return Node(this->graph->head(e));
+	return Node(this->graph->target(e));
 	break;
       case 1:
@@ -1507,8 +1507,8 @@
     }
   
-    Node aNode(const OutEdgeIt& e) const { return tail(e); }
-    Node aNode(const InEdgeIt& e) const { return head(e); }
-    Node bNode(const OutEdgeIt& e) const { return head(e); }
-    Node bNode(const InEdgeIt& e) const { return tail(e); }
+    Node aNode(const OutEdgeIt& e) const { return source(e); }
+    Node aNode(const InEdgeIt& e) const { return target(e); }
+    Node bNode(const OutEdgeIt& e) const { return target(e); }
+    Node bNode(const InEdgeIt& e) const { return source(e); }
 
     void addNode() const { }
@@ -1516,6 +1516,6 @@
     
 //    Node addNode() const { return Node(this->graph->addNode()); }
-//    Edge addEdge(const Node& tail, const Node& head) const { 
-//      return Edge(this->graph->addEdge(tail, head)); }
+//    Edge addEdge(const Node& source, const Node& target) const { 
+//      return Edge(this->graph->addEdge(source, target)); }
 
 //    void erase(const Node& i) const { this->graph->erase(i); }
Index: src/work/marci/experiment/iterator_bfs_demo.cc
===================================================================
--- src/work/marci/experiment/iterator_bfs_demo.cc	(revision 921)
+++ src/work/marci/experiment/iterator_bfs_demo.cc	(revision 986)
@@ -23,5 +23,5 @@
   string get(typename Graph::Edge e) const { 
     return 
-      (node_name_map.get(graph.tail(e))+"->"+node_name_map.get(graph.head(e)));
+      (node_name_map.get(graph.source(e))+"->"+node_name_map.get(graph.target(e)));
   }
 };
Index: src/work/marci/experiment/iterator_bfs_demo_1.cc
===================================================================
--- src/work/marci/experiment/iterator_bfs_demo_1.cc	(revision 921)
+++ src/work/marci/experiment/iterator_bfs_demo_1.cc	(revision 986)
@@ -23,5 +23,5 @@
   string get(typename Graph::Edge e) const { 
     return 
-      (node_name_map.get(graph.tail(e))+"->"+node_name_map.get(graph.head(e)));
+      (node_name_map.get(graph.source(e))+"->"+node_name_map.get(graph.target(e)));
   }
 };
Index: src/work/marci/experiment/list_graph.h
===================================================================
--- src/work/marci/experiment/list_graph.h	(revision 921)
+++ src/work/marci/experiment/list_graph.h	(revision 986)
@@ -123,6 +123,6 @@
       //ListGraph* G;
       int id;
-      node_item* _tail;
-      node_item* _head;
+      node_item* _source;
+      node_item* _target;
       edge_item* _next_out;
       edge_item* _prev_out;
@@ -150,20 +150,20 @@
     }
 
-    edge_item* _add_edge(node_item* _tail, node_item* _head) {
+    edge_item* _add_edge(node_item* _source, node_item* _target) {
       edge_item* e=new edge_item;
       e->id=edge_id++;
-      e->_tail=_tail;
-      e->_head=_head;
-      
-      e->_prev_out=_tail->_last_out_edge;
-      if (_tail->_last_out_edge) (_tail->_last_out_edge)->_next_out=e;
-      _tail->_last_out_edge=e;
-      if (!_tail->_first_out_edge) _tail->_first_out_edge=e; 
+      e->_source=_source;
+      e->_target=_target;
+      
+      e->_prev_out=_source->_last_out_edge;
+      if (_source->_last_out_edge) (_source->_last_out_edge)->_next_out=e;
+      _source->_last_out_edge=e;
+      if (!_source->_first_out_edge) _source->_first_out_edge=e; 
       e->_next_out=0;
  
-      e->_prev_in=_head->_last_in_edge;
-      if (_head->_last_in_edge) (_head->_last_in_edge)->_next_in=e;
-      _head->_last_in_edge=e;
-      if (!_head->_first_in_edge) { _head->_first_in_edge=e; } 
+      e->_prev_in=_target->_last_in_edge;
+      if (_target->_last_in_edge) (_target->_last_in_edge)->_next_in=e;
+      _target->_last_in_edge=e;
+      if (!_target->_first_in_edge) { _target->_first_in_edge=e; } 
       e->_next_in=0;
 
@@ -185,11 +185,11 @@
     void _delete_edge(edge_item* e) {
       if (e->_next_out) (e->_next_out)->_prev_out=e->_prev_out; else 
-	(e->_tail)->_last_out_edge=e->_prev_out;
+	(e->_source)->_last_out_edge=e->_prev_out;
       if (e->_prev_out) (e->_prev_out)->_next_out=e->_next_out; else 
-	(e->_tail)->_first_out_edge=e->_next_out;
+	(e->_source)->_first_out_edge=e->_next_out;
       if (e->_next_in) (e->_next_in)->_prev_in=e->_prev_in; else 
-	(e->_head)->_last_in_edge=e->_prev_in;
+	(e->_target)->_last_in_edge=e->_prev_in;
       if (e->_prev_in) (e->_prev_in)->_next_in=e->_next_in; else 
-	(e->_head)->_first_in_edge=e->_next_in;
+	(e->_target)->_first_in_edge=e->_next_in;
 
       delete e;
@@ -197,31 +197,31 @@
     }
 
-    void _set_tail(edge_item* e, node_item* _tail) {
+    void _set_source(edge_item* e, node_item* _source) {
       if (e->_next_out) (e->_next_out)->_prev_out=e->_prev_out; else 
-	(e->_tail)->_last_out_edge=e->_prev_out;
+	(e->_source)->_last_out_edge=e->_prev_out;
       if (e->_prev_out) (e->_prev_out)->_next_out=e->_next_out; else 
-	(e->_tail)->_first_out_edge=e->_next_out;
-      
-      e->_tail=_tail;
-      
-      e->_prev_out=_tail->_last_out_edge;
-      if (_tail->_last_out_edge) (_tail->_last_out_edge)->_next_out=e;
-      _tail->_last_out_edge=e;
-      if (!_tail->_first_out_edge) _tail->_first_out_edge=e; 
+	(e->_source)->_first_out_edge=e->_next_out;
+      
+      e->_source=_source;
+      
+      e->_prev_out=_source->_last_out_edge;
+      if (_source->_last_out_edge) (_source->_last_out_edge)->_next_out=e;
+      _source->_last_out_edge=e;
+      if (!_source->_first_out_edge) _source->_first_out_edge=e; 
       e->_next_out=0;
     }
 
-    void _set_head(edge_item* e, node_item* _head) {
+    void _set_target(edge_item* e, node_item* _target) {
       if (e->_next_in) (e->_next_in)->_prev_in=e->_prev_in; else 
-	(e->_head)->_last_in_edge=e->_prev_in;
+	(e->_target)->_last_in_edge=e->_prev_in;
       if (e->_prev_in) (e->_prev_in)->_next_in=e->_next_in; else 
-	(e->_head)->_first_in_edge=e->_next_in;
-      
-      e->_head=_head;
-      
-      e->_prev_in=_head->_last_in_edge;
-      if (_head->_last_in_edge) (_head->_last_in_edge)->_next_in=e;
-      _head->_last_in_edge=e;
-      if (!_head->_first_in_edge) { _head->_first_in_edge=e; } 
+	(e->_target)->_first_in_edge=e->_next_in;
+      
+      e->_target=_target;
+      
+      e->_prev_in=_target->_last_in_edge;
+      if (_target->_last_in_edge) (_target->_last_in_edge)->_next_in=e;
+      _target->_last_in_edge=e;
+      if (!_target->_first_in_edge) { _target->_first_in_edge=e; } 
       e->_next_in=0;
     }
@@ -248,6 +248,6 @@
     //InEdgeIt firstInEdge(const Node v) const { return InEdgeIt(v); }
     //SymEdgeIt firstSymEdge(const Node v) const { return SymEdgeIt(v); }
-    Node tail(Edge e) const { return e.tailNode(); }
-    Node head(Edge e) const { return e.headNode(); }
+    Node source(Edge e) const { return e.sourceNode(); }
+    Node target(Edge e) const { return e.targetNode(); }
 
     Node aNode(const OutEdgeIt& e) const { return e.aNode(); }
@@ -278,6 +278,6 @@
     SymEdgeIt& /*getF*/first(SymEdgeIt& e, Node v) const { 
       e=SymEdgeIt(*this, v); return e; }
-    //void getTail(Node& n, const Edge& e) const { n=tail(e); }
-    //void getHead(Node& n, const Edge& e) const { n=head(e); }
+    //void getSource(Node& n, const Edge& e) const { n=source(e); }
+    //void getTarget(Node& n, const Edge& e) const { n=target(e); }
 
     //void getANode(Node& n, const OutEdgeIt& e) const { n=e.aNode(); }
@@ -346,10 +346,10 @@
     }
 
-    void setTail(Edge e, Node tail) {
-      _set_tail(e.edge, tail.node); 
-    }
-
-    void setHead(Edge e, Node head) {
-      _set_head(e.edge, head.node); 
+    void setSource(Edge e, Node source) {
+      _set_source(e.edge, source.node); 
+    }
+
+    void setTarget(Edge e, Node target) {
+      _set_target(e.edge, target.node); 
     }
 
@@ -360,5 +360,5 @@
     }
     friend std::ostream& operator<<(std::ostream& os, const Edge& i) { 
-      os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
+      os << "(" << i.edge->_source->id << "--" << i.edge->id << "->" << i.edge->_target->id << ")"; 
       return os; 
     }
@@ -427,6 +427,6 @@
       friend bool operator!=(Edge u, Edge v) { return v.edge!=u.edge; } 
     protected:
-      Node tailNode() const { return Node(edge->_tail); }
-      Node headNode() const { return Node(edge->_head); }
+      Node sourceNode() const { return Node(edge->_source); }
+      Node targetNode() const { return Node(edge->_target); }
     public:
       friend std::ostream& operator<<(std::ostream& os, const Edge& i);
@@ -448,5 +448,5 @@
       EdgeIt(edge_item* _e) : Edge(_e) { }
       EdgeIt& operator++() { 
-	node_item* v=edge->_tail;
+	node_item* v=edge->_source;
 	edge=edge->_next_out; 
 	while (v && !edge) { v=v->_next_node; if (v) edge=v->_first_out_edge; }
@@ -468,6 +468,6 @@
       OutEdgeIt& operator++() { edge=edge->_next_out; return *this; }
     protected:
-      Node aNode() const { return Node(edge->_tail); }
-      Node bNode() const { return Node(edge->_head); }
+      Node aNode() const { return Node(edge->_source); }
+      Node bNode() const { return Node(edge->_target); }
     };
     
@@ -485,6 +485,6 @@
       InEdgeIt& operator++() { edge=edge->_next_in; return *this; }
     protected:
-      Node aNode() const { return Node(edge->_head); }
-      Node bNode() const { return Node(edge->_tail); }
+      Node aNode() const { return Node(edge->_target); }
+      Node bNode() const { return Node(edge->_source); }
     };
 
@@ -511,5 +511,5 @@
       SymEdgeIt& operator++() { 
 	if (out_or_in) { 
-	  node_item* v=edge->_tail;
+	  node_item* v=edge->_source;
 	  edge=edge->_next_out; 
 	  if (!edge) { out_or_in=0; edge=v->_first_in_edge; }
@@ -521,7 +521,7 @@
     protected:
       Node aNode() const { 
-	return (out_or_in) ? Node(edge->_tail) : Node(edge->_head); }
+	return (out_or_in) ? Node(edge->_source) : Node(edge->_target); }
       Node bNode() const { 
-	return (out_or_in) ? Node(edge->_head) : Node(edge->_tail); }
+	return (out_or_in) ? Node(edge->_target) : Node(edge->_source); }
     };
 
Index: src/work/marci/graph_concept.h
===================================================================
--- src/work/marci/graph_concept.h	(revision 921)
+++ src/work/marci/graph_concept.h	(revision 986)
@@ -104,8 +104,8 @@
 
 
-    /// Gives back the head node of an edge.
-    Node head(const Edge&) const { return INVALID; }
-    /// Gives back the tail node of an edge.
-    Node tail(const Edge&) const { return INVALID; }
+    /// Gives back the target node of an edge.
+    Node target(const Edge&) const { return INVALID; }
+    /// Gives back the source node of an edge.
+    Node source(const Edge&) const { return INVALID; }
   
     //   Node aNode(SymEdgeIt) const {}
@@ -143,8 +143,8 @@
     /// \brief Add a new edge to the graph.
     ///
-    /// Add a new edge to the graph with tail node \c tail
-    /// and head node \c head.
+    /// Add a new edge to the graph with source node \c source
+    /// and target node \c target.
     /// \return the new edge.
-    Edge addEdge(const Node& tail, const Node& head) { return INVALID; }
+    Edge addEdge(const Node& source, const Node& target) { return INVALID; }
     
     /// \brief Resets the graph.
Index: src/work/marci/iterator_bfs_demo.cc
===================================================================
--- src/work/marci/iterator_bfs_demo.cc	(revision 921)
+++ src/work/marci/iterator_bfs_demo.cc	(revision 986)
@@ -24,5 +24,5 @@
   string operator[](typename Graph::Edge e) const { 
     return 
-      (node_name_map[graph.tail(e)]+"->"+node_name_map[graph.head(e)]);
+      (node_name_map[graph.source(e)]+"->"+node_name_map[graph.target(e)]);
   }
 };
@@ -96,12 +96,12 @@
       if (Graph::Edge(bfs)!=INVALID) {
 	cout << edge_name[bfs] << /*endl*/", " << 
-	  node_name[G.tail(bfs)] << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  node_name[G.head(bfs)] << 
+	  node_name[G.source(bfs)] << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name[G.target(bfs)] << 
 	  (bfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  node_name[bfs.tail()] << 
+	  node_name[bfs.source()] << 
 	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
 	  
@@ -130,12 +130,12 @@
       if (Graph::Edge(dfs)!=INVALID) {
 	cout << edge_name[dfs] << /*endl*/", " << 
-	  node_name[G.tail(dfs)] << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  node_name[G.head(dfs)] << 
+	  node_name[G.source(dfs)] << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name[G.target(dfs)] << 
 	  (dfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  node_name[dfs.tail()] << 
+	  node_name[dfs.source()] << 
 	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
 	  
@@ -172,12 +172,12 @@
       if (GW::Edge(bfs)!=INVALID) {
 	cout << edge_name[GW::Edge(bfs)] << /*endl*/", " << 
-	  node_name[gw.tail(bfs)] << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  node_name[gw.head(bfs)] << 
+	  node_name[gw.source(bfs)] << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name[gw.target(bfs)] << 
 	  (bfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  node_name[bfs.tail()] << 
+	  node_name[bfs.source()] << 
 	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
 	  
@@ -206,12 +206,12 @@
       if (GW::Edge(dfs)!=INVALID) {
 	cout << edge_name[GW::Edge(dfs)] << /*endl*/", " << 
-	  node_name[gw.tail(dfs)] << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  node_name[gw.head(dfs)] << 
+	  node_name[gw.source(dfs)] << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name[gw.target(dfs)] << 
 	  (dfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  node_name[dfs.tail()] << 
+	  node_name[dfs.source()] << 
 	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
 	  
@@ -311,5 +311,5 @@
     cout << "bfs and dfs iterator demo on the bidirected graph" << endl;
 //     for(GW::EdgeIt e(gw); e!=INVALID; ++e) {
-//       cout << node_name[gw.tail(e)] << "->" << node_name[gw.head(e)] << " ";
+//       cout << node_name[gw.source(e)] << "->" << node_name[gw.target(e)] << " ";
 //     } 
     for(GW::NodeIt n(gw); n!=INVALID; ++n) { 
@@ -335,12 +335,12 @@
       if (GW::Edge(bfs)!=INVALID) {
 	cout << edge_name[GW::Edge(bfs)] << /*endl*/", " << 
-	  node_name[gw.tail(bfs)] << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  node_name[gw.head(bfs)] << 
+	  node_name[gw.source(bfs)] << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name[gw.target(bfs)] << 
 	  (bfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  node_name[bfs.tail()] << 
+	  node_name[bfs.source()] << 
 	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
 	  
@@ -369,12 +369,12 @@
       if (GW::Edge(dfs)!=INVALID) {
 	cout << edge_name[GW::Edge(dfs)] << /*endl*/", " << 
-	  node_name[gw.tail(dfs)] << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  node_name[gw.head(dfs)] << 
+	  node_name[gw.source(dfs)] << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name[gw.target(dfs)] << 
 	  (dfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  node_name[dfs.tail()] << 
+	  node_name[dfs.source()] << 
 	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
 	  
Index: src/work/marci/leda/bipartite_matching_comparison.cc
===================================================================
--- src/work/marci/leda/bipartite_matching_comparison.cc	(revision 921)
+++ src/work/marci/leda/bipartite_matching_comparison.cc	(revision 986)
@@ -130,5 +130,5 @@
 
   FOR_EACH_LOC(BGW::EdgeIt, e, bgw) 
-    hg.addEdge(b_s_nodes[bgw.tail(e)], b_t_nodes[bgw.head(e)]);
+    hg.addEdge(b_s_nodes[bgw.source(e)], b_t_nodes[bgw.target(e)]);
 
   ConstMap<SageGraph::Edge, int> cm(1);
Index: src/work/marci/leda/leda_graph_wrapper.h
===================================================================
--- src/work/marci/leda/leda_graph_wrapper.h	(revision 921)
+++ src/work/marci/leda/leda_graph_wrapper.h	(revision 986)
@@ -214,19 +214,19 @@
 //     }
 
-    ///Gives back the head node of an edge.
-    Node head(Edge e) const { 
+    ///Gives back the target node of an edge.
+    Node target(Edge e) const { 
       return Node(l_graph->target(e.l_e)); 
     }
-    ///Gives back the tail node of an edge.
-    Node tail(Edge e) const { 
+    ///Gives back the source node of an edge.
+    Node source(Edge e) const { 
       return Node(l_graph->source(e.l_e)); 
     }
   
-    Node aNode(InEdgeIt e) const { return head(e); }
-    Node aNode(OutEdgeIt e) const { return tail(e); }
+    Node aNode(InEdgeIt e) const { return target(e); }
+    Node aNode(OutEdgeIt e) const { return source(e); }
     //   Node aNode(SymEdgeIt) const {}
 
-    Node bNode(InEdgeIt e) const { return tail(e); }
-    Node bNode(OutEdgeIt e) const { return head(e); }
+    Node bNode(InEdgeIt e) const { return source(e); }
+    Node bNode(OutEdgeIt e) const { return target(e); }
     //   Node bNode(SymEdgeIt) const {}
 
@@ -245,6 +245,6 @@
   
     Node addNode() const { return Node(l_graph->new_node()); }
-    Edge addEdge(Node tail, Node head) const { 
-      return Edge(l_graph->new_edge(tail.l_n, head.l_n));
+    Edge addEdge(Node source, Node target) const { 
+      return Edge(l_graph->new_edge(source.l_n, target.l_n));
     }
     
Index: src/work/marci/leda/max_bipartite_matching_demo.cc
===================================================================
--- src/work/marci/leda/max_bipartite_matching_demo.cc	(revision 921)
+++ src/work/marci/leda/max_bipartite_matching_demo.cc	(revision 986)
@@ -104,8 +104,8 @@
 //     cout << "out edges: ";
 //     for(OutEdgeIt e=G.first<OutEdgeIt>(n); G.valid(e); G.next(e)) 
-//       cout << G.id(G.tail(e)) << "->" << G.id(G.head(e)) << " ";
+//       cout << G.id(G.source(e)) << "->" << G.id(G.target(e)) << " ";
 //     cout << "in edges: ";
 //     for(InEdgeIt e=G.first<InEdgeIt>(n); G.valid(e); G.next(e)) 
-//       cout << G.id(G.tail(e)) << "->" << G.id(G.head(e)) << " ";
+//       cout << G.id(G.source(e)) << "->" << G.id(G.target(e)) << " ";
 //     cout << endl;
 //   }
@@ -124,5 +124,5 @@
     while (max_flow_test.augmentOnShortestPath()) { 
 //       for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e))  
-// 	std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
+// 	std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
 //       std::cout<<std::endl;
       ++i; 
@@ -132,10 +132,10 @@
 //     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e))  
 //       if (flow.get(e))
-// 	std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
+// 	std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
 //     std::cout<<std::endl;
 //     std::cout << "edges which are not in this maximum matching: "<< std::endl;
 //     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e))  
 //       if (!flow.get(e))
-// 	std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
+// 	std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
 //     std::cout<<std::endl;
     
@@ -157,5 +157,5 @@
 //     while (max_flow_test.augmentOnBlockingFlow2()) { 
 // //       for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e))  
-// // 	std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
+// // 	std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
 // //       std::cout<<std::endl;
 //       ++i; 
@@ -165,10 +165,10 @@
 // //     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e))  
 // //       if (flow.get(e))
-// // 	std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
+// // 	std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
 // //     std::cout<<std::endl;
 // //     std::cout << "edges which are not in this maximum matching: "<< std::endl;
 // //     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e))  
 // //       if (!flow.get(e))
-// // 	std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
+// // 	std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
 // //     std::cout<<std::endl;
     
@@ -199,10 +199,10 @@
 //     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e))  
 //       if (flow.get(e))
-// 	std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
+// 	std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
 //     std::cout<<std::endl;
 //     std::cout << "edges which are not in this maximum matching: "<< std::endl;
 //     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e))  
 //       if (!flow.get(e))
-// 	std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
+// 	std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
 //     std::cout<<std::endl;
     
Index: src/work/marci/leda_bfs_dfs.cc
===================================================================
--- src/work/marci/leda_bfs_dfs.cc	(revision 921)
+++ src/work/marci/leda_bfs_dfs.cc	(revision 986)
@@ -26,5 +26,5 @@
   string get(typename Graph::Edge e) const { 
     return 
-      (node_name_map.get(graph.tail(e))+"->"+node_name_map.get(graph.head(e)));
+      (node_name_map.get(graph.source(e))+"->"+node_name_map.get(graph.target(e)));
   }
 };
Index: src/work/marci/leda_graph_demo.cc
===================================================================
--- src/work/marci/leda_graph_demo.cc	(revision 921)
+++ src/work/marci/leda_graph_demo.cc	(revision 986)
@@ -39,8 +39,8 @@
 //     cout << "out edges: ";
 //     for(OutEdgeIt e=G.first<OutEdgeIt>(n); G.valid(e); G.next(e)) 
-//       cout << G.id(G.tail(e)) << "-" << cap.get(e) << "->" << G.id(G.head(e)) << " ";
+//       cout << G.id(G.source(e)) << "-" << cap.get(e) << "->" << G.id(G.target(e)) << " ";
 //     cout << "in edges: ";
 //     for(InEdgeIt e=G.first<InEdgeIt>(n); G.valid(e); G.next(e)) 
-//       cout << G.id(G.tail(e)) << "-" << cap.get(e) << "->" << G.id(G.head(e)) << " ";
+//       cout << G.id(G.source(e)) << "-" << cap.get(e) << "->" << G.id(G.target(e)) << " ";
 //     cout << endl;
 //   }
@@ -65,5 +65,5 @@
     while (max_flow_test.augmentOnShortestPath()) { 
 //     for(EdgeIt e=G.template first<EdgeIt>(); e.valid(); ++e) { 
-//       std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//       std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //     }
 //     std::cout<<std::endl;
@@ -73,5 +73,5 @@
 //   std::cout << "maximum flow: "<< std::endl;
 //   for(EdgeIt e=G.first<EdgeIt>(); e.valid(); ++e) { 
-//     std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+//     std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
 //   }
 //   std::cout<<std::endl;
Index: src/work/marci/lp/max_flow_by_lp.cc
===================================================================
--- src/work/marci/lp/max_flow_by_lp.cc	(revision 921)
+++ src/work/marci/lp/max_flow_by_lp.cc	(revision 986)
@@ -64,7 +64,7 @@
 
     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+	std::cout << "Slackness does not hold!" << std::endl;
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
@@ -80,7 +80,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
@@ -107,7 +107,7 @@
 
     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+	std::cout << "Slackness does not hold!" << std::endl;
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
@@ -136,7 +136,7 @@
 
     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+	std::cout << "Slackness does not hold!" << std::endl;
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
@@ -154,7 +154,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
@@ -172,7 +172,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
Index: src/work/marci/max_flow_demo.cc
===================================================================
--- src/work/marci/max_flow_demo.cc	(revision 921)
+++ src/work/marci/max_flow_demo.cc	(revision 986)
@@ -48,7 +48,7 @@
 
     for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
 	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
@@ -64,7 +64,7 @@
 
     for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
 	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
@@ -91,7 +91,7 @@
 
     for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
 	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
@@ -109,7 +109,7 @@
 
     for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
 	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
@@ -127,7 +127,7 @@
 
     for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
 	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
@@ -145,7 +145,7 @@
 
     for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
-      if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
+      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
 	std::cout << "Slackness does not hold!" << std::endl;
-      if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 	std::cout << "Slackness does not hold!" << std::endl;
     }
Index: src/work/marci/oldies/edmonds_karp.h
===================================================================
--- src/work/marci/oldies/edmonds_karp.h	(revision 921)
+++ src/work/marci/oldies/edmonds_karp.h	(revision 986)
@@ -60,6 +60,6 @@
 	ResGWOutEdgeIt e=bfs;
 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	  Node v=res_graph.tail(e);
-	  Node w=res_graph.head(e);
+	  Node v=res_graph.source(e);
+	  Node w=res_graph.target(e);
 	  pred.set(w, e);
 	  if (res_graph.valid(pred[v])) {
@@ -68,5 +68,5 @@
 	    free.set(w, res_graph.resCap(e)); 
 	  }
-	  if (res_graph.head(e)==t) { _augment=true; break; }
+	  if (res_graph.target(e)==t) { _augment=true; break; }
 	}
 	
@@ -80,5 +80,5 @@
 	  ResGWEdge e=pred[n];
 	  res_graph.augment(e, augment_value); 
-	  n=res_graph.tail(e);
+	  n=res_graph.source(e);
 	}
       }
@@ -102,7 +102,7 @@
 // 	return dist[n]; }
 //       bool get(const typename MapGraphWrapper::Edge& e) const { 
-// 	return (dist.get(g->tail(e))<dist.get(g->head(e))); }
+// 	return (dist.get(g->source(e))<dist.get(g->target(e))); }
       bool operator[](const typename MapGraphWrapper::Edge& e) const { 
-	return (dist[g->tail(e)]<dist[g->head(e)]); 
+	return (dist[g->source(e)]<dist[g->target(e)]); 
       }
     };
@@ -124,5 +124,5 @@
 	ResGWOutEdgeIt e=bfs;
 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-	  dist.set(res_graph.head(e), dist[res_graph.tail(e)]+1);
+	  dist.set(res_graph.target(e), dist[res_graph.source(e)]+1);
 	}
 	++bfs;
@@ -153,6 +153,6 @@
 	typename FilterResGW::EdgeIt e;
 	for(filter_res_graph.first(e); filter_res_graph.valid(e); filter_res_graph.next(e)) {
-	  //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
-	  typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)], res_graph_to_F[res_graph.head(e)]);
+	  //if (dist.get(res_graph.target(e))==dist.get(res_graph.source(e))+1) {
+	  typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)], res_graph_to_F[res_graph.target(e)]);
 	  original_edge.update();
 	  original_edge.set(f, e);
@@ -207,5 +207,5 @@
 	    typename MG::Edge e=pred[n];
 	    res_graph.augment(original_edge[e], augment_value); 
-	    n=F.tail(e);
+	    n=F.source(e);
 	    if (residual_capacity[e]==augment_value) 
 	      F.erase(e); 
@@ -255,6 +255,6 @@
 	if (res_graph.valid(e)) {
 	  if (bfs.isBNodeNewlyReached()) {
-	    dist.set(res_graph.head(e), dist[res_graph.tail(e)]+1);
-	    typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)], res_graph_to_F[res_graph.head(e)]);
+	    dist.set(res_graph.target(e), dist[res_graph.source(e)]+1);
+	    typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)], res_graph_to_F[res_graph.target(e)]);
 	    original_edge.update();
 	    original_edge.set(f, e);
@@ -262,6 +262,6 @@
 	    residual_capacity.set(f, res_graph.resCap(e));
 	  } else {
-	    if (dist[res_graph.head(e)]==(dist[res_graph.tail(e)]+1)) {
-	      typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.tail(e)], res_graph_to_F[res_graph.head(e)]);
+	    if (dist[res_graph.target(e)]==(dist[res_graph.source(e)]+1)) {
+	      typename MG::Edge f=F.addEdge(res_graph_to_F[res_graph.source(e)], res_graph_to_F[res_graph.target(e)]);
 	      original_edge.update();
 	      original_edge.set(f, e);
@@ -317,5 +317,5 @@
 	    typename MG::Edge e=pred[n];
 	    res_graph.augment(original_edge[e], augment_value); 
-	    n=F.tail(e);
+	    n=F.source(e);
 	    if (residual_capacity[e]==augment_value) 
 	      F.erase(e); 
@@ -344,5 +344,5 @@
  	ResGWOutEdgeIt e=bfs;
  	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
- 	  dist.set(res_graph.head(e), dist[res_graph.tail(e)]+1);
+ 	  dist.set(res_graph.target(e), dist[res_graph.source(e)]+1);
  	}
 	++bfs;
@@ -441,5 +441,5 @@
  	    typename ErasingResGW::OutEdgeIt e=pred[n];
  	    res_graph.augment(e, augment_value);
- 	    n=erasing_res_graph.tail(e);
+ 	    n=erasing_res_graph.source(e);
  	    if (res_graph.resCap(e)==0)
  	      erasing_res_graph.erase(e);
@@ -536,6 +536,6 @@
 // 	AugOutEdgeIt e=bfs;
 // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// 	  Node v=res_graph.tail(e);
-// 	  Node w=res_graph.head(e);
+// 	  Node v=res_graph.source(e);
+// 	  Node w=res_graph.target(e);
 // 	  pred.set(w, e);
 // 	  if (res_graph.valid(pred.get(v))) {
@@ -544,5 +544,5 @@
 // 	    free.set(w, res_graph.free(e)); 
 // 	  }
-// 	  n=res_graph.head(e);
+// 	  n=res_graph.target(e);
 // 	  if (T->get(n) && (used.get(n)<1) ) { 
 // 	    //Num u=0;
@@ -566,5 +566,5 @@
 // 	  AugEdge e=pred.get(n);
 // 	  res_graph.augment(e, augment_value); 
-// 	  n=res_graph.tail(e);
+// 	  n=res_graph.source(e);
 // 	}
 // 	used.set(n, 1); //mind2 vegen jav
@@ -607,5 +607,5 @@
 // // 	AugOutEdgeIt e=bfs;
 // // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// // 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+// // 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 // // 	}
 	
@@ -629,6 +629,6 @@
 // //       //which are in some shortest paths
 // //       for(typename AugGraph::EdgeIt e=res_graph.template first<typename AugGraph::EdgeIt>(); res_graph.valid(e); res_graph.next(e)) {
-// // 	if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
-// // 	  typename MutableGraph::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
+// // 	if (dist.get(res_graph.target(e))==dist.get(res_graph.source(e))+1) {
+// // 	  typename MutableGraph::Edge f=F.addEdge(res_graph_to_F.get(res_graph.source(e)), res_graph_to_F.get(res_graph.target(e)));
 // // 	  original_edge.update();
 // // 	  original_edge.set(f, e);
@@ -682,5 +682,5 @@
 // // 	    typename MutableGraph::Edge e=pred.get(n);
 // // 	    res_graph.augment(original_edge.get(e), augment_value); 
-// // 	    n=F.tail(e);
+// // 	    n=F.source(e);
 // // 	    if (residual_capacity.get(e)==augment_value) 
 // // 	      F.erase(e); 
@@ -733,5 +733,5 @@
 // 	typename ErasingResGraphWrapper<Graph, Num, FlowMap, CapMap>::OutEdgeIt e=bfs;
 // 	if (res_graph.valid(e) && bfs.isBNodeNewlyReached()) {
-// 	  dist.set(res_graph.head(e), dist.get(res_graph.tail(e))+1);
+// 	  dist.set(res_graph.target(e), dist.get(res_graph.source(e))+1);
 // 	}
 // 	++bfs;	
@@ -810,5 +810,5 @@
 // 	    EAugEdge e=pred.get(n);
 // 	    res_graph.augment(e, augment_value);
-// 	    n=res_graph.tail(e);
+// 	    n=res_graph.source(e);
 // 	    if (res_graph.free(e)==0)
 // 	      res_graph.erase(e);
@@ -903,6 +903,6 @@
 // // 	AugOutEdgeIt e=/*AugOutEdgeIt*/(bfs);
 // // 	if (e.valid() && bfs.isBNodeNewlyReached()) {
-// // 	  Node v=res_graph.tail(e);
-// // 	  Node w=res_graph.head(e);
+// // 	  Node v=res_graph.source(e);
+// // 	  Node w=res_graph.target(e);
 // // 	  pred.set(w, e);
 // // 	  if (pred.get(v).valid()) {
@@ -911,7 +911,7 @@
 // // 	    free.set(w, e.free()); 
 // // 	  }
-// // 	  if (TMap.get(res_graph.head(e))) { 
+// // 	  if (TMap.get(res_graph.target(e))) { 
 // // 	    _augment=true; 
-// // 	    reached_t_node=res_graph.head(e);
+// // 	    reached_t_node=res_graph.target(e);
 // // 	    break; 
 // // 	  }
@@ -927,5 +927,5 @@
 // // 	  AugEdge e=pred.get(n);
 // // 	  e.augment(augment_value); 
-// // 	  n=res_graph.tail(e);
+// // 	  n=res_graph.source(e);
 // // 	}
 // //       }
Index: src/work/marci/oldies/marci_graph_demo.cc
===================================================================
--- src/work/marci/oldies/marci_graph_demo.cc	(revision 921)
+++ src/work/marci/oldies/marci_graph_demo.cc	(revision 986)
@@ -32,5 +32,5 @@
     std::cout << " outdegree (OutEdgeIt): " << count(G.first<OutEdgeIt>(i)) << " "; 
     for(OutEdgeIt j=G.first<OutEdgeIt>(i); G.valid(j); G.next(j)) { 
-      std::cout << "(" << G.id(G.tail(j)) << "--" << G.id(j) << "->" << G.id(G.head(j)) << ") ";
+      std::cout << "(" << G.id(G.source(j)) << "--" << G.id(j) << "->" << G.id(G.target(j)) << ") ";
     }
     std::cout << std::endl; 
@@ -90,7 +90,7 @@
   }
 
-  std::cout << "node and edge property values on the tails and heads of edges..." << std::endl;
+  std::cout << "node and edge property values on the sources and targets of edges..." << std::endl;
   for(EdgeIt j=G.first<EdgeIt>(); G.valid(j); G.next(j)) {
-    std::cout << my_property_vector.get(G.tail(j)) << "--" << my_edge_property.get(j) << "-->" << my_property_vector.get(G.head(j)) << " ";
+    std::cout << my_property_vector.get(G.source(j)) << "--" << my_edge_property.get(j) << "-->" << my_property_vector.get(G.target(j)) << " ";
   }
   std::cout << std::endl;
@@ -159,8 +159,8 @@
     std::cout << "out edges: ";
     for(OutEdgeIt j=flowG.first<OutEdgeIt>(i); flowG.valid(j); flowG.next(j)) 
-      std::cout << node_name.get(flowG.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.head(j)) << " ";
+      std::cout << node_name.get(flowG.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.target(j)) << " ";
     std::cout << "in edges: ";
     for(InEdgeIt j=flowG.first<InEdgeIt>(i); flowG.valid(j); flowG.next(j)) 
-      std::cout << node_name.get(flowG.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.head(j)) << " ";
+      std::cout << node_name.get(flowG.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.target(j)) << " ";
     std::cout << std::endl;
   }
@@ -172,6 +172,6 @@
   
 
-  //flowG.setTail(v3_t, v2);
-  //flowG.setHead(v3_t, s);
+  //flowG.setSource(v3_t, v2);
+  //flowG.setTarget(v3_t, s);
 /*
   for(NodeIt i=flowG.first<NodeIt>(); flowG.valid(i); flowG.next(i)) { 
@@ -179,13 +179,13 @@
     std::cout << "out edges: ";
     for(OutEdgeIt j=flowG.first<OutEdgeIt>(i); flowG.valid(j); flowG.next(j)) 
-      std::cout << node_name.get(flowG.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.head(j)) << " ";
+      std::cout << node_name.get(flowG.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.target(j)) << " ";
     std::cout << "in edges: ";
     for(InEdgeIt j=flowG.first<InEdgeIt>(i); flowG.valid(j); flowG.next(j)) 
-      std::cout << node_name.get(flowG.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.head(j)) << " ";
+      std::cout << node_name.get(flowG.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.target(j)) << " ";
     std::cout << std::endl;
   }
   
   for(EdgeIt e=flowG.first<EdgeIt>(); flowG.valid(e); flowG.next(e)) {
-    std::cout << node_name.get(flowG.tail(e)) << "-"<< cap.get(e) << "->" << node_name.get(flowG.head(e)) << " ";
+    std::cout << node_name.get(flowG.source(e)) << "-"<< cap.get(e) << "->" << node_name.get(flowG.target(e)) << " ";
   }
 */
@@ -197,8 +197,8 @@
       std::cout << "out edges: ";
       for(OutEdgeIt j=flowG.first<OutEdgeIt>(i); flowG.valid(j); flowG.next(j)) 
-	std::cout << node_name.get(flowG.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.head(j)) << " ";
+	std::cout << node_name.get(flowG.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.target(j)) << " ";
       std::cout << "in edges: ";
       for(InEdgeIt j=flowG.first<InEdgeIt>(i); flowG.valid(j); flowG.next(j)) 
-	std::cout << node_name.get(flowG.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.head(j)) << " ";
+	std::cout << node_name.get(flowG.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.target(j)) << " ";
       std::cout << std::endl;
     }
@@ -211,8 +211,8 @@
       std::cout << "out edges: ";
       for(OutEdgeIt j=flowG.first<OutEdgeIt>(i); flowG.valid(j); flowG.next(j)) 
-	std::cout << node_name.get(flowG.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.head(j)) << " ";
+	std::cout << node_name.get(flowG.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.target(j)) << " ";
       std::cout << "in edges: ";
       for(InEdgeIt j=flowG.first<InEdgeIt>(i); flowG.valid(j); flowG.next(j)) 
-	std::cout << node_name.get(flowG.tail(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.head(j)) << " ";
+	std::cout << node_name.get(flowG.source(j)) << "-"<< cap.get(j) << "->" << node_name.get(flowG.target(j)) << " ";
       std::cout << std::endl;
     }
@@ -229,10 +229,10 @@
     max_flow_test.augmentOnBlockingFlow<ListGraph>();
     for(EdgeIt e=flowG.template first<EdgeIt>(); flowG.valid(e); flowG.next(e)) { 
-      std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
+      std::cout<<"("<<flowG.source(e)<< "-"<<flow.get(e)<<"->"<<flowG.target(e)<<") ";
     }
     std::cout<<std::endl;
     max_flow_test.augmentOnBlockingFlow<ListGraph>();
     for(EdgeIt e=flowG.template first<EdgeIt>(); flowG.valid(e); flowG.next(e)) { 
-      std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
+      std::cout<<"("<<flowG.source(e)<< "-"<<flow.get(e)<<"->"<<flowG.target(e)<<") ";
     }
     std::cout<<std::endl;*/
@@ -242,5 +242,5 @@
     while (max_flow_test.augmentOnShortestPath()) {
       for(EdgeIt e=flowG.template first<EdgeIt>(); flowG.valid(e); flowG.next(e)) { 
-	std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
+	std::cout<<"("<<flowG.source(e)<< "-"<<flow.get(e)<<"->"<<flowG.target(e)<<") ";
       }
       std::cout<<std::endl;
@@ -261,5 +261,5 @@
     std::cout << "maximum flow: "<< std::endl;
     for(EdgeIt e=flowG.template first<EdgeIt>(); flowG.valid(e); flowG.next(e)) { 
-      std::cout<<"("<<flowG.tail(e)<< "-"<<flow.get(e)<<"->"<<flowG.head(e)<<") ";
+      std::cout<<"("<<flowG.source(e)<< "-"<<flow.get(e)<<"->"<<flowG.target(e)<<") ";
     }
     std::cout<<std::endl;
Index: src/work/marci/preflow_bug.cc
===================================================================
--- src/work/marci/preflow_bug.cc	(revision 921)
+++ src/work/marci/preflow_bug.cc	(revision 986)
@@ -46,5 +46,5 @@
     Graph::EdgeIt e;
     for (g.first(e); g.valid(e); g.next(e))
-      cout << 1+g.id(g.tail(e)) << "->" << 1+g.id(g.head(e)) << " cap: " << cap[e] << " preflow: " << flow[e] << endl;
+      cout << 1+g.id(g.source(e)) << "->" << 1+g.id(g.target(e)) << " cap: " << cap[e] << " preflow: " << flow[e] << endl;
   }
   {
@@ -76,6 +76,6 @@
     Graph::EdgeIt e;
     for (g.first(e); g.valid(e); g.next(e)) {
-      if (cut[g.tail(e)] && !cut[g.head(e)]) {
-	cout << 1+g.id(g.tail(e)) << "->" << 1+g.id(g.head(e)) 
+      if (cut[g.source(e)] && !cut[g.target(e)]) {
+	cout << 1+g.id(g.source(e)) << "->" << 1+g.id(g.target(e)) 
 	     << "(forward edge) flow: " << flow[e] 
 	     << " cap: " << cap[e]<< endl;
@@ -83,6 +83,6 @@
 	std::cout << "Slackness does not hold!" << std::endl;
       }
-      if (!cut[g.tail(e)] && cut[g.head(e)]) {
-	cout << 1+g.id(g.tail(e)) << "->" << 1+g.id(g.head(e)) 
+      if (!cut[g.source(e)] && cut[g.target(e)]) {
+	cout << 1+g.id(g.source(e)) << "->" << 1+g.id(g.target(e)) 
 	     << "(backward edge) flow: " << flow[e] << endl;
 	if (flow[e]!=0) 
@@ -106,7 +106,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
@@ -122,7 +122,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
@@ -149,7 +149,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
@@ -178,7 +178,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
@@ -196,7 +196,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
@@ -214,7 +214,7 @@
 
 //     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
-//       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e]) 
-// 	std::cout << "Slackness does not hold!" << std::endl;
-//       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0) 
+//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e]) 
+// 	std::cout << "Slackness does not hold!" << std::endl;
+//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0) 
 // 	std::cout << "Slackness does not hold!" << std::endl;
 //     }
Index: src/work/marci/preflow_demo_athos.cc
===================================================================
--- src/work/marci/preflow_demo_athos.cc	(revision 921)
+++ src/work/marci/preflow_demo_athos.cc	(revision 986)
@@ -29,10 +29,10 @@
   //int cut_value=0;
   //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) {
-  //  if (cut.get(G.tail(e)) && !cut.get(G.head(e))) cut_value+=cap.get(e);
+  //  if (cut.get(G.source(e)) && !cut.get(G.target(e))) cut_value+=cap.get(e);
   //}
   double post_time=currTime();
   //std::cout << "maximum flow: "<< std::endl;
   //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) { 
-  //  std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+  //  std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
   //}
   //std::cout<<std::endl;
Index: src/work/marci/preflow_demo_jacint.cc
===================================================================
--- src/work/marci/preflow_demo_jacint.cc	(revision 921)
+++ src/work/marci/preflow_demo_jacint.cc	(revision 986)
@@ -32,10 +32,10 @@
   int cut_value=0;
   for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) {
-    if (cut.get(G.tail(e)) && !cut.get(G.head(e))) cut_value+=cap.get(e);
+    if (cut.get(G.source(e)) && !cut.get(G.target(e))) cut_value+=cap.get(e);
   }
   double post_time=currTime();
   //std::cout << "maximum flow: "<< std::endl;
   //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) { 
-  //  std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+  //  std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
   //}
   //std::cout<<std::endl;
@@ -56,10 +56,10 @@
   int cut_value=0;
   for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) {
-    if (cut.get(G.tail(e)) && !cut.get(G.head(e))) cut_value+=cap.get(e);
+    if (cut.get(G.source(e)) && !cut.get(G.target(e))) cut_value+=cap.get(e);
   }
   double post_time=currTime();
   //std::cout << "maximum flow: "<< std::endl;
   //for(EachEdgeIt e=G.first<EachEdgeIt>(); e.valid(); ++e) { 
-  //  std::cout<<"("<<G.tail(e)<< "-"<<flow.get(e)<<"->"<<G.head(e)<<") ";
+  //  std::cout<<"("<<G.source(e)<< "-"<<flow.get(e)<<"->"<<G.target(e)<<") ";
   //}
   //std::cout<<std::endl;
Index: src/work/peter/edgepathgraph.h
===================================================================
--- src/work/peter/edgepathgraph.h	(revision 921)
+++ src/work/peter/edgepathgraph.h	(revision 986)
@@ -74,5 +74,5 @@
 	PEdgeIt f;
 
-	//dep//cout << "Edge " << id(tail(e)) << " - " << id(head(e)) << " in actual layer is";
+	//dep//cout << "Edge " << id(source(e)) << " - " << id(target(e)) << " in actual layer is";
 	T1 incr=actmap[e];
 	//cout << incr << endl;
@@ -83,8 +83,8 @@
 	  for(edgepath[e]->first(f); edgepath[e]->valid(f); edgepath[e]->next(f))
 	  {
-	    //dep//cout << " " << sublayer->id(sublayer->tail(f)) << "-" << sublayer->id(sublayer->head(f));
+	    //dep//cout << " " << sublayer->id(sublayer->source(f)) << "-" << sublayer->id(sublayer->target(f));
 	    submap[f]+=incr;
 	  }
-	  //dep////cout << EPGr2.id(EPGr2.head(f)) << endl;
+	  //dep////cout << EPGr2.id(EPGr2.target(f)) << endl;
 	  //dep//cout << endl;
 	}
@@ -108,5 +108,5 @@
 	PEdgeIt f;
 
-	cout << "Edge " << id(tail(e)) << " - " << id(head(e)) << " in actual layer is";
+	cout << "Edge " << id(source(e)) << " - " << id(target(e)) << " in actual layer is";
         if(edgepath[e])
 	{
@@ -114,7 +114,7 @@
 	  for(edgepath[e]->first(f); edgepath[e]->valid(f); edgepath[e]->next(f))
 	  {
-	    cout << " " << sublayer->id(sublayer->tail(f)) << "-" << sublayer->id(sublayer->head(f));
+	    cout << " " << sublayer->id(sublayer->source(f)) << "-" << sublayer->id(sublayer->target(f));
 	  }
-	  //cout << EPGr2.id(EPGr2.head(f)) << endl;
+	  //cout << EPGr2.id(EPGr2.target(f)) << endl;
 	  cout << endl;
 	}
@@ -235,8 +235,8 @@
     typename Gact::EdgeIt &next(typename Gact::EdgeIt &i) const { return actuallayer.next(i);}
 
-    ///Gives back the head node of an edge.
-    typename Gact::Node head(typename Gact::Edge edge) const { return actuallayer.head(edge); }
-    ///Gives back the tail node of an edge.
-    typename Gact::Node tail(typename Gact::Edge edge) const { return actuallayer.tail(edge); }
+    ///Gives back the target node of an edge.
+    typename Gact::Node target(typename Gact::Edge edge) const { return actuallayer.target(edge); }
+    ///Gives back the source node of an edge.
+    typename Gact::Node source(typename Gact::Edge edge) const { return actuallayer.source(edge); }
   
     //   Node aNode(InEdgeIt) const {}
@@ -280,6 +280,6 @@
     ///Add a new edge to the graph.
 
-    ///Add a new edge to the graph with tail node \c tail
-    ///and head node \c head.
+    ///Add a new edge to the graph with source node \c source
+    ///and target node \c target.
     ///\return the new edge.
     typename Gact::Edge addEdge(typename Gact::Node node1, typename Gact::Node node2) { return actuallayer.addEdge(node1, node2);}
Index: src/work/peter/edgepathgraph_test.cc
===================================================================
--- src/work/peter/edgepathgraph_test.cc	(revision 921)
+++ src/work/peter/edgepathgraph_test.cc	(revision 986)
@@ -136,5 +136,5 @@
 	PEdgeIt f;
 
-	cout << "Edge " << EPGr.id(EPGr.tail(e)) << " - " << EPGr.id(EPGr.head(e)) << " in actual layer is";
+	cout << "Edge " << EPGr.id(EPGr.source(e)) << " - " << EPGr.id(EPGr.target(e)) << " in actual layer is";
         if(EPGr.edgepath[e])
 	{
@@ -142,7 +142,7 @@
 	  for(EPGr.edgepath[e]->first(f); EPGr.edgepath[e]->valid(f); EPGr.edgepath[e]->next(f))
 	  {
-	    cout << " " << EPGr2.id(EPGr2.tail(f)) << "-" << EPGr2.id(EPGr2.head(f));
+	    cout << " " << EPGr2.id(EPGr2.source(f)) << "-" << EPGr2.id(EPGr2.target(f));
 	  }
-	  //cout << EPGr2.id(EPGr2.head(f)) << endl;
+	  //cout << EPGr2.id(EPGr2.target(f)) << endl;
 	  cout << endl;
 	}
@@ -170,5 +170,5 @@
       for(EdgeIt e(EPGr.actuallayer);EPGr.actuallayer.valid(e);EPGr.actuallayer.next(e))
       {
-	cout << EPGr.id(EPGr.tail(e)) << "-" << EPGr.id(EPGr.head(e)) << ":" << actlaymap[e] << " ";
+	cout << EPGr.id(EPGr.source(e)) << "-" << EPGr.id(EPGr.target(e)) << ":" << actlaymap[e] << " ";
       }
       cout << endl;
@@ -176,5 +176,5 @@
       for(ListGraph::EdgeIt e(EPGr2.actuallayer);EPGr2.actuallayer.valid(e);EPGr2.actuallayer.next(e))
       {
-	cout << EPGr2.id(EPGr2.tail(e)) << "-" << EPGr2.id(EPGr2.head(e)) << ":" << sublaymap[e] << " ";
+	cout << EPGr2.id(EPGr2.source(e)) << "-" << EPGr2.id(EPGr2.target(e)) << ":" << sublaymap[e] << " ";
       }
       cout << endl;
@@ -191,5 +191,5 @@
       for(EdgeIt e(EPGr.actuallayer);EPGr.actuallayer.valid(e);EPGr.actuallayer.next(e))
       {
-	cout << EPGr.id(EPGr.tail(e)) << "-" << EPGr.id(EPGr.head(e)) << ":" << actlaymap[e] << " ";
+	cout << EPGr.id(EPGr.source(e)) << "-" << EPGr.id(EPGr.target(e)) << ":" << actlaymap[e] << " ";
       }
       cout << endl;
@@ -197,5 +197,5 @@
       for(ListGraph::EdgeIt e(EPGr2.actuallayer);EPGr2.actuallayer.valid(e);EPGr2.actuallayer.next(e))
       {
-	cout << EPGr2.id(EPGr2.tail(e)) << "-" << EPGr2.id(EPGr2.head(e)) << ":" << sublaymap[e] << " ";
+	cout << EPGr2.id(EPGr2.source(e)) << "-" << EPGr2.id(EPGr2.target(e)) << ":" << sublaymap[e] << " ";
       }
       cout << endl;
Index: src/work/peter/hierarchygraph.h
===================================================================
--- src/work/peter/hierarchygraph.h	(revision 921)
+++ src/work/peter/hierarchygraph.h	(revision 986)
@@ -61,7 +61,7 @@
 	    return -1;
 	  }
-	else if ((actuallayer->id (actuallayer->tail (actedge)) !=
+	else if ((actuallayer->id (actuallayer->source (actedge)) !=
 		  actuallayer->id (*actuallayernode))
-		 && (actuallayer->id (actuallayer->head (actedge)) !=
+		 && (actuallayer->id (actuallayer->target (actedge)) !=
 		     actuallayer->id (*actuallayernode)))
 	  {
@@ -133,10 +133,10 @@
 	    for (iei = actuallayer->first (iei, (*actuallayernode));
 		 ((actuallayer->valid (iei))
-		  && (actuallayer->head (iei) == (*actuallayernode)));
+		  && (actuallayer->target (iei) == (*actuallayernode)));
 		 actuallayer->next (iei))
 	      {
 		cout << actuallayer->id (actuallayer->
-					 tail (iei)) << " " << actuallayer->
-		  id (actuallayer->head (iei)) << endl;
+					 source (iei)) << " " << actuallayer->
+		  id (actuallayer->target (iei)) << endl;
 		edgenumber++;
 	      }
@@ -144,10 +144,10 @@
 	    for (oei = actuallayer->first (oei, (*actuallayernode));
 		 ((actuallayer->valid (oei))
-		  && (actuallayer->tail (oei) == (*actuallayernode)));
+		  && (actuallayer->source (oei) == (*actuallayernode)));
 		 actuallayer->next (oei))
 	      {
 		cout << actuallayer->id (actuallayer->
-					 tail (oei)) << " " << actuallayer->
-		  id (actuallayer->head (oei)) << endl;
+					 source (oei)) << " " << actuallayer->
+		  id (actuallayer->target (oei)) << endl;
 		edgenumber++;
 	      }
@@ -328,13 +328,13 @@
     }
 
-    ///Gives back the head node of an edge.
-    typename Gact::Node head (typename Gact::Edge edge) const
-    {
-      return actuallayer.head (edge);
-    }
-    ///Gives back the tail node of an edge.
-    typename Gact::Node tail (typename Gact::Edge edge) const
-    {
-      return actuallayer.tail (edge);
+    ///Gives back the target node of an edge.
+    typename Gact::Node target (typename Gact::Edge edge) const
+    {
+      return actuallayer.target (edge);
+    }
+    ///Gives back the source node of an edge.
+    typename Gact::Node source (typename Gact::Edge edge) const
+    {
+      return actuallayer.source (edge);
     }
 
@@ -394,6 +394,6 @@
     ///Add a new edge to the graph.
 
-    ///Add a new edge to the graph with tail node \c tail
-    ///and head node \c head.
+    ///Add a new edge to the graph with source node \c source
+    ///and target node \c target.
     ///\return the new edge.
     typename Gact::Edge addEdge (typename Gact::Node node1,
Index: src/work/peter/path/path.h
===================================================================
--- src/work/peter/path/path.h	(revision 959)
+++ src/work/peter/path/path.h	(revision 986)
@@ -109,5 +109,5 @@
     /// Returns INVALID if the path is empty.
     GraphNode from() const {
-      return empty() ? INVALID : gr->tail(edges[0]);
+      return empty() ? INVALID : gr->source(edges[0]);
     }
     /// \brief End point of the path.
@@ -116,5 +116,5 @@
     /// Returns INVALID if the path is empty.
     GraphNode to() const {
-      return empty() ? INVALID : gr->head(edges[length()-1]);
+      return empty() ? INVALID : gr->target(edges[length()-1]);
     }
 
@@ -154,17 +154,17 @@
     }
 
-    /// \brief Returns node iterator pointing to the head node of the
+    /// \brief Returns node iterator pointing to the target node of the
     /// given edge iterator.
-    NodeIt head(const EdgeIt& e) const {
+    NodeIt target(const EdgeIt& e) const {
       if( DM::range_check && !e.valid() )
-	fault("DirPath::head() on invalid iterator");
+	fault("DirPath::target() on invalid iterator");
       return NodeIt(*this, e.idx+1);
     }
 
-    /// \brief Returns node iterator pointing to the tail node of the
+    /// \brief Returns node iterator pointing to the source node of the
     /// given edge iterator.
-    NodeIt tail(const EdgeIt& e) const {
+    NodeIt source(const EdgeIt& e) const {
       if( DM::range_check && !e.valid() )
-	fault("DirPath::tail() on invalid iterator");
+	fault("DirPath::source() on invalid iterator");
       return NodeIt(*this, e.idx);
     }
@@ -255,5 +255,5 @@
 	  return p->to();
 	else if(idx >= 0)
-	  return p->gr->tail(p->edges[idx]);
+	  return p->gr->source(p->edges[idx]);
 	else
 	  return INVALID;
@@ -313,5 +313,5 @@
       ///\sa setStartNode
       void pushFront(const GraphEdge& e) {
-	if( DM::consistensy_check && !empty() && P.gr->head(e)!=from() ) {
+	if( DM::consistensy_check && !empty() && P.gr->target(e)!=from() ) {
 	  fault("DirPath::Builder::pushFront: nonincident edge");
 	}
@@ -324,5 +324,5 @@
       ///\sa setStartNode
       void pushBack(const GraphEdge& e) {
-	if( DM::consistensy_check && !empty() && P.gr->tail(e)!=to() ) {
+	if( DM::consistensy_check && !empty() && P.gr->source(e)!=to() ) {
 	  fault("DirPath::Builder::pushBack: nonincident edge");
 	}
@@ -363,9 +363,9 @@
       GraphNode from() const {
 	if( ! front.empty() )
-	  return P.gr->tail(front[front.size()-1]);
+	  return P.gr->source(front[front.size()-1]);
 	else if( ! P.empty() )
-	  return P.gr->tail(P.edges[0]);
+	  return P.gr->source(P.edges[0]);
 	else if( ! back.empty() )
-	  return P.gr->tail(back[0]);
+	  return P.gr->source(back[0]);
 	else
 	  return INVALID;
@@ -373,9 +373,9 @@
       GraphNode to() const {
 	if( ! back.empty() )
-	  return P.gr->head(back[back.size()-1]);
+	  return P.gr->target(back[back.size()-1]);
 	else if( ! P.empty() )
-	  return P.gr->head(P.edges[P.length()-1]);
+	  return P.gr->target(P.edges[P.length()-1]);
 	else if( ! front.empty() )
-	  return P.gr->head(front[0]);
+	  return P.gr->target(front[0]);
 	else
 	  return INVALID;
@@ -472,5 +472,5 @@
     /// Returns INVALID if the path is empty.
     GraphNode from() const {
-      return empty() ? INVALID : gr->tail(edges[0]);
+      return empty() ? INVALID : gr->source(edges[0]);
     }
     /// \brief End point of the path.
@@ -479,5 +479,5 @@
     /// Returns INVALID if the path is empty.
     GraphNode to() const {
-      return empty() ? INVALID : gr->head(edges[length()-1]);
+      return empty() ? INVALID : gr->target(edges[length()-1]);
     }
 
@@ -517,17 +517,17 @@
     }
 
-    /// \brief Returns node iterator pointing to the head node of the
+    /// \brief Returns node iterator pointing to the target node of the
     /// given edge iterator.
-    NodeIt head(const EdgeIt& e) const {
+    NodeIt target(const EdgeIt& e) const {
       if( DM::range_check && !e.valid() )
-	fault("UndirPath::head() on invalid iterator");
+	fault("UndirPath::target() on invalid iterator");
       return NodeIt(*this, e.idx+1);
     }
 
-    /// \brief Returns node iterator pointing to the tail node of the
+    /// \brief Returns node iterator pointing to the source node of the
     /// given edge iterator.
-    NodeIt tail(const EdgeIt& e) const {
+    NodeIt source(const EdgeIt& e) const {
       if( DM::range_check && !e.valid() )
-	fault("UndirPath::tail() on invalid iterator");
+	fault("UndirPath::source() on invalid iterator");
       return NodeIt(*this, e.idx);
     }
@@ -616,5 +616,5 @@
 	  return p->to();
 	else if(idx >= 0)
-	  return p->gr->tail(p->edges[idx]);
+	  return p->gr->source(p->edges[idx]);
 	else
 	  return INVALID;
@@ -674,5 +674,5 @@
       ///\sa setStartNode
       void pushFront(const GraphEdge& e) {
-	if( DM::consistensy_check && !empty() && P.gr->head(e)!=from() ) {
+	if( DM::consistensy_check && !empty() && P.gr->target(e)!=from() ) {
 	  fault("UndirPath::Builder::pushFront: nonincident edge");
 	}
@@ -685,5 +685,5 @@
       ///\sa setStartNode
       void pushBack(const GraphEdge& e) {
-	if( DM::consistensy_check && !empty() && P.gr->tail(e)!=to() ) {
+	if( DM::consistensy_check && !empty() && P.gr->source(e)!=to() ) {
 	  fault("UndirPath::Builder::pushBack: nonincident edge");
 	}
@@ -724,9 +724,9 @@
       GraphNode from() const {
 	if( ! front.empty() )
-	  return P.gr->tail(front[front.size()-1]);
+	  return P.gr->source(front[front.size()-1]);
 	else if( ! P.empty() )
-	  return P.gr->tail(P.edges[0]);
+	  return P.gr->source(P.edges[0]);
 	else if( ! back.empty() )
-	  return P.gr->tail(back[0]);
+	  return P.gr->source(back[0]);
 	else
 	  return INVALID;
@@ -734,9 +734,9 @@
       GraphNode to() const {
 	if( ! back.empty() )
-	  return P.gr->head(back[back.size()-1]);
+	  return P.gr->target(back[back.size()-1]);
 	else if( ! P.empty() )
-	  return P.gr->head(P.edges[P.length()-1]);
+	  return P.gr->target(P.edges[P.length()-1]);
 	else if( ! front.empty() )
-	  return P.gr->head(front[0]);
+	  return P.gr->target(front[0]);
 	else
 	  return INVALID;
@@ -841,10 +841,10 @@
     bool setTo(const GraphNode &n);
 
-    // WARNING: these two functions return the head/tail of an edge with
+    // WARNING: these two functions return the target/source of an edge with
     // respect to the direction of the path!
-    // So G.head(P.graphEdge(e)) == P.graphNode(P.head(e)) holds only if 
+    // So G.target(P.graphEdge(e)) == P.graphNode(P.target(e)) holds only if 
     // P.forward(e) is true (or the edge is a loop)!
-    NodeIt head(const EdgeIt& e) const;
-    NodeIt tail(const EdgeIt& e) const;
+    NodeIt target(const EdgeIt& e) const;
+    NodeIt source(const EdgeIt& e) const;
 
     // FIXME: ezeknek valami jobb nev kellene!!!
@@ -874,5 +874,5 @@
 
       size_t idx;
-      bool tail;  // Is this node the tail of the edge with same idx?
+      bool source;  // Is this node the source of the edge with same idx?
 
     public:
@@ -897,5 +897,5 @@
       return e;
 
-    GraphNode common_node = ( e.forw ? G.head(*e.it) : G.tail(*e.it) );
+    GraphNode common_node = ( e.forw ? G.target(*e.it) : G.source(*e.it) );
     ++e.it;
 
@@ -906,5 +906,5 @@
     }
 
-    e.forw = ( G.tail(*e.it) == common_node );
+    e.forw = ( G.source(*e.it) == common_node );
     return e;
   }
@@ -919,12 +919,12 @@
 
     
-    GraphNode next_node = ( n.tail ? G.head(edges[n.idx]) :
-			      G.tail(edges[n.idx]) );
+    GraphNode next_node = ( n.source ? G.target(edges[n.idx]) :
+			      G.source(edges[n.idx]) );
     ++n.idx;
     if( n.idx < length() ) {
-      n.tail = ( next_node == G.tail(edges[n.idx]) );
+      n.source = ( next_node == G.source(edges[n.idx]) );
     }
     else {
-      n.tail = true;
+      n.source = true;
     }
 
@@ -935,10 +935,10 @@
   bool DynamicPath<Gr>::edgeIncident(const GraphEdge &e, const GraphNode &a,
 			  GraphNode &b) {
-    if( G.tail(e) == a ) {
-      b=G.head(e);
+    if( G.source(e) == a ) {
+      b=G.target(e);
       return true;
     }
-    if( G.head(e) == a ) {
-      b=G.tail(e);
+    if( G.target(e) == a ) {
+      b=G.source(e);
       return true;
     }
@@ -949,10 +949,10 @@
   bool DynamicPath<Gr>::connectTwoEdges(const GraphEdge &e,
 			     const GraphEdge &f) {
-    if( edgeIncident(f, G.tail(e), _last) ) {
-      _first = G.head(e);
+    if( edgeIncident(f, G.source(e), _last) ) {
+      _first = G.target(e);
       return true;
     }
-    if( edgeIncident(f, G.head(e), _last) ) {
-      _first = G.tail(e);
+    if( edgeIncident(f, G.target(e), _last) ) {
+      _first = G.source(e);
       return true;
     }
@@ -1040,5 +1040,5 @@
   template<typename Gr>
   typename DynamicPath<Gr>::NodeIt
-  DynamicPath<Gr>::tail(const EdgeIt& e) const {
+  DynamicPath<Gr>::source(const EdgeIt& e) const {
     NodeIt n;
 
@@ -1046,10 +1046,10 @@
       // FIXME: invalid-> invalid
       n.idx = length() + 1;
-      n.tail = true;
+      n.source = true;
       return n;
     }
 
     n.idx = e.it-edges.begin();
-    n.tail = e.forw;
+    n.source = e.forw;
     return n;
   }
@@ -1057,5 +1057,5 @@
   template<typename Gr>
   typename DynamicPath<Gr>::NodeIt
-  DynamicPath<Gr>::head(const EdgeIt& e) const {
+  DynamicPath<Gr>::target(const EdgeIt& e) const {
     if( e.it == edges.end()-1 ) {
       return _last;
@@ -1064,5 +1064,5 @@
     EdgeIt next_edge = e;
     next(next_edge);
-    return tail(next_edge);
+    return source(next_edge);
   }
       
@@ -1082,5 +1082,5 @@
   DynamicPath<Gr>::graphNode(const NodeIt& n) const {
     if( n.idx < length() ) {
-      return n.tail ? G.tail(edges[n.idx]) : G.head(edges[n.idx]);
+      return n.source ? G.source(edges[n.idx]) : G.target(edges[n.idx]);
     }
     else if( n.idx == length() ) {
@@ -1104,9 +1104,9 @@
     e.it = edges.begin()+k;
     if(k==0) {
-      e.forw = ( G.tail(*e.it) == _first );
+      e.forw = ( G.source(*e.it) == _first );
     }
     else {
-      e.forw = ( G.tail(*e.it) == G.tail(edges[k-1]) ||
-		 G.tail(*e.it) == G.head(edges[k-1]) );
+      e.forw = ( G.source(*e.it) == G.source(edges[k-1]) ||
+		 G.source(*e.it) == G.target(edges[k-1]) );
     }
     return e;
@@ -1119,13 +1119,13 @@
       // FIXME: invalid NodeIt
       n.idx = length()+1;
-      n.tail = true;
+      n.source = true;
       return n;
     }
     if( k==length() ) {
       n.idx = length();
-      n.tail = true;
+      n.source = true;
       return n;
     }
-    n = tail(nth<EdgeIt>(k));
+    n = source(nth<EdgeIt>(k));
     return n;
   }
@@ -1140,7 +1140,7 @@
   {
     if( G.valid(P._first) && a.it < P.edges.end() ) {
-      _first = ( a.forw ? G.tail(*a.it) : G.head(*a.it) );
+      _first = ( a.forw ? G.source(*a.it) : G.target(*a.it) );
       if( b.it < P.edges.end() ) {
-	_last = ( b.forw ? G.tail(*b.it) : G.head(*b.it) );
+	_last = ( b.forw ? G.source(*b.it) : G.target(*b.it) );
       }
       else {
Index: src/work/peter/path/path_skeleton.h
===================================================================
--- src/work/peter/path/path_skeleton.h	(revision 959)
+++ src/work/peter/path/path_skeleton.h	(revision 986)
@@ -54,10 +54,10 @@
       /// Starting point of the path.
       /// Returns INVALID if the path is empty.
-      GraphNode head() const {}
+      GraphNode target() const {}
       /// \brief End point of the path.
       ///
       /// End point of the path.
       /// Returns INVALID if the path is empty.
-      GraphNode tail() const {}
+      GraphNode source() const {}
 
       /// \brief First NodeIt/EdgeIt.
@@ -68,15 +68,15 @@
       It& first(It &i) const { return i=It(*this); }
 
-      /// \brief The head of an edge.
-      ///
-      /// Returns node iterator pointing to the head node of the
+      /// \brief The target of an edge.
+      ///
+      /// Returns node iterator pointing to the target node of the
       /// given edge iterator.
-      NodeIt head(const EdgeIt& e) const {}
-
-      /// \brief The tail of an edge.
-      ///
-      /// Returns node iterator pointing to the tail node of the
+      NodeIt target(const EdgeIt& e) const {}
+
+      /// \brief The source of an edge.
+      ///
+      /// Returns node iterator pointing to the source node of the
       /// given edge iterator.
-      NodeIt tail(const EdgeIt& e) const {}
+      NodeIt source(const EdgeIt& e) const {}
 
 
Index: src/work/peter/path/path_test.cc
===================================================================
--- src/work/peter/path/path_test.cc	(revision 959)
+++ src/work/peter/path/path_test.cc	(revision 986)
@@ -67,8 +67,8 @@
 
 #ifdef SKELETON
-      cout << "P.tail() valid? " << (P.tail()!=INVALID) << endl;
-      check(! (P.tail()!=INVALID));
+      cout << "P.source() valid? " << (P.source()!=INVALID) << endl;
+      check(! (P.source()!=INVALID));
 #else
-      cout << "P.tail() valid? " << (P.from()!=INVALID) << endl;
+      cout << "P.source() valid? " << (P.from()!=INVALID) << endl;
       check(! (P.to()!=INVALID));
 #endif
@@ -90,12 +90,12 @@
 
 #ifdef SKELETON
-	cout << "P.tail() valid? " << (P.tail()!=INVALID) << endl;
-	check(P.tail()!=INVALID);
-	cout << "P.tail()==v1 ? " << (P.tail()==v1) << endl;
-	check(P.tail() == v1);
+	cout << "P.source() valid? " << (P.source()!=INVALID) << endl;
+	check(P.source()!=INVALID);
+	cout << "P.source()==v1 ? " << (P.source()==v1) << endl;
+	check(P.source() == v1);
 #else
-	cout << "P.tail() valid? " << (P.from()!=INVALID) << endl;
+	cout << "P.source() valid? " << (P.from()!=INVALID) << endl;
 	check(P.from()!=INVALID);
-	cout << "P.tail()==v1 ? " << (P.from()==v1) << endl;
+	cout << "P.source()==v1 ? " << (P.from()==v1) << endl;
 	check(P.from() == v1);
 #endif
@@ -129,8 +129,8 @@
 
 #ifdef SKELETON
-      cout << "P.head()==v3 ? " << (P.head()==v3) << endl;
-      check(P.head() == v3);
+      cout << "P.target()==v3 ? " << (P.target()==v3) << endl;
+      check(P.target() == v3);
 #else
-      cout << "P.head()==v3 ? " << (P.to()==v3) << endl;
+      cout << "P.target()==v3 ? " << (P.to()==v3) << endl;
       check(P.to() == v3);
 #endif
Index: src/work/sage_graph.h
===================================================================
--- src/work/sage_graph.h	(revision 921)
+++ src/work/sage_graph.h	(revision 986)
@@ -97,6 +97,6 @@
     struct edge_item {
       int id;
-      node_item* _tail;
-      node_item* _head;
+      node_item* _source;
+      node_item* _target;
       edge_item* _next_out;
       edge_item* _prev_out;
@@ -122,20 +122,20 @@
     }
 
-    edge_item* _add_edge(node_item* _tail, node_item* _head) {
+    edge_item* _add_edge(node_item* _source, node_item* _target) {
       edge_item* e=new edge_item;
       e->id=edge_id++;
-      e->_tail=_tail;
-      e->_head=_head;
+      e->_source=_source;
+      e->_target=_target;
       
-      e->_prev_out=_tail->_last_out_edge;
-      if (_tail->_last_out_edge) (_tail->_last_out_edge)->_next_out=e;
-      _tail->_last_out_edge=e;
-      if (!_tail->_first_out_edge) _tail->_first_out_edge=e; 
+      e->_prev_out=_source->_last_out_edge;
+      if (_source->_last_out_edge) (_source->_last_out_edge)->_next_out=e;
+      _source->_last_out_edge=e;
+      if (!_source->_first_out_edge) _source->_first_out_edge=e; 
       e->_next_out=0;
  
-      e->_prev_in=_head->_last_in_edge;
-      if (_head->_last_in_edge) (_head->_last_in_edge)->_next_in=e;
-      _head->_last_in_edge=e;
-      if (!_head->_first_in_edge) { _head->_first_in_edge=e; } 
+      e->_prev_in=_target->_last_in_edge;
+      if (_target->_last_in_edge) (_target->_last_in_edge)->_next_in=e;
+      _target->_last_in_edge=e;
+      if (!_target->_first_in_edge) { _target->_first_in_edge=e; } 
       e->_next_in=0;
 
@@ -157,11 +157,11 @@
     void _delete_edge(edge_item* e) {
       if (e->_next_out) (e->_next_out)->_prev_out=e->_prev_out; else 
-	(e->_tail)->_last_out_edge=e->_prev_out;
+	(e->_source)->_last_out_edge=e->_prev_out;
       if (e->_prev_out) (e->_prev_out)->_next_out=e->_next_out; else 
-	(e->_tail)->_first_out_edge=e->_next_out;
+	(e->_source)->_first_out_edge=e->_next_out;
       if (e->_next_in) (e->_next_in)->_prev_in=e->_prev_in; else 
-	(e->_head)->_last_in_edge=e->_prev_in;
+	(e->_target)->_last_in_edge=e->_prev_in;
       if (e->_prev_in) (e->_prev_in)->_next_in=e->_next_in; else 
-	(e->_head)->_first_in_edge=e->_next_in;
+	(e->_target)->_first_in_edge=e->_next_in;
 
       delete e;
@@ -169,31 +169,31 @@
     }
 
-    void _set_tail(edge_item* e, node_item* _tail) {
+    void _set_source(edge_item* e, node_item* _source) {
       if (e->_next_out) (e->_next_out)->_prev_out=e->_prev_out; else 
-	(e->_tail)->_last_out_edge=e->_prev_out;
+	(e->_source)->_last_out_edge=e->_prev_out;
       if (e->_prev_out) (e->_prev_out)->_next_out=e->_next_out; else 
-	(e->_tail)->_first_out_edge=e->_next_out;
+	(e->_source)->_first_out_edge=e->_next_out;
       
-      e->_tail=_tail;
+      e->_source=_source;
       
-      e->_prev_out=_tail->_last_out_edge;
-      if (_tail->_last_out_edge) (_tail->_last_out_edge)->_next_out=e;
-      _tail->_last_out_edge=e;
-      if (!_tail->_first_out_edge) _tail->_first_out_edge=e; 
+      e->_prev_out=_source->_last_out_edge;
+      if (_source->_last_out_edge) (_source->_last_out_edge)->_next_out=e;
+      _source->_last_out_edge=e;
+      if (!_source->_first_out_edge) _source->_first_out_edge=e; 
       e->_next_out=0;
     }
 
-    void _set_head(edge_item* e, node_item* _head) {
+    void _set_target(edge_item* e, node_item* _target) {
       if (e->_next_in) (e->_next_in)->_prev_in=e->_prev_in; else 
-	(e->_head)->_last_in_edge=e->_prev_in;
+	(e->_target)->_last_in_edge=e->_prev_in;
       if (e->_prev_in) (e->_prev_in)->_next_in=e->_next_in; else 
-	(e->_head)->_first_in_edge=e->_next_in;
+	(e->_target)->_first_in_edge=e->_next_in;
       
-      e->_head=_head;
+      e->_target=_target;
       
-      e->_prev_in=_head->_last_in_edge;
-      if (_head->_last_in_edge) (_head->_last_in_edge)->_next_in=e;
-      _head->_last_in_edge=e;
-      if (!_head->_first_in_edge) { _head->_first_in_edge=e; } 
+      e->_prev_in=_target->_last_in_edge;
+      if (_target->_last_in_edge) (_target->_last_in_edge)->_next_in=e;
+      _target->_last_in_edge=e;
+      if (!_target->_first_in_edge) { _target->_first_in_edge=e; } 
       e->_next_in=0;
     }
@@ -222,6 +222,6 @@
     //InEdgeIt firstInEdge(const Node v) const { return InEdgeIt(v); }
     //SymEdgeIt firstSymEdge(const Node v) const { return SymEdgeIt(v); }
-    Node tail(Edge e) const { return e.tailNode(); }
-    Node head(Edge e) const { return e.headNode(); }
+    Node source(Edge e) const { return e.sourceNode(); }
+    Node target(Edge e) const { return e.targetNode(); }
 
     Node aNode(const OutEdgeIt& e) const { return e.aNode(); }
@@ -252,6 +252,6 @@
     SymEdgeIt& first(SymEdgeIt& e, Node v) const { 
       e=SymEdgeIt(*this, v); return e; }
-    //void getTail(Node& n, const Edge& e) const { n=tail(e); }
-    //void getHead(Node& n, const Edge& e) const { n=head(e); }
+    //void getSource(Node& n, const Edge& e) const { n=source(e); }
+    //void getTarget(Node& n, const Edge& e) const { n=target(e); }
 
     //void getANode(Node& n, const OutEdgeIt& e) const { n=e.aNode(); }
@@ -330,10 +330,10 @@
     }
 
-    void setTail(Edge e, Node tail) {
-      _set_tail(e.edge, tail.node); 
-    }
-
-    void setHead(Edge e, Node head) {
-      _set_head(e.edge, head.node); 
+    void setSource(Edge e, Node source) {
+      _set_source(e.edge, source.node); 
+    }
+
+    void setTarget(Edge e, Node target) {
+      _set_target(e.edge, target.node); 
     }
 
@@ -349,5 +349,5 @@
 //     friend std::ostream& operator<<(std::ostream& os, const Edge& i) { 
 //       if (i.valid()) 
-// 	os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")"; 
+// 	os << "(" << i.edge->_source->id << "--" << i.edge->id << "->" << i.edge->_target->id << ")"; 
 //       else 
 // 	os << "invalid";
@@ -420,6 +420,6 @@
       friend bool operator!=(Edge u, Edge v) { return v.edge!=u.edge; } 
     protected:
-      Node tailNode() const { return Node(edge->_tail); }
-      Node headNode() const { return Node(edge->_head); }
+      Node sourceNode() const { return Node(edge->_source); }
+      Node targetNode() const { return Node(edge->_target); }
     public:
       friend std::ostream& operator<<(std::ostream& os, const Edge& i);
@@ -441,5 +441,5 @@
     public:
       EdgeIt& operator++() { 
-	node_item* v=edge->_tail;
+	node_item* v=edge->_source;
 	edge=edge->_next_out; 
 	while (v && !edge) { v=v->_next_node; if (v) edge=v->_first_out_edge; }
@@ -457,6 +457,6 @@
       OutEdgeIt& operator++() { edge=edge->_next_out; return *this; }
     protected:
-      Node aNode() const { return Node(edge->_tail); }
-      Node bNode() const { return Node(edge->_head); }
+      Node aNode() const { return Node(edge->_source); }
+      Node bNode() const { return Node(edge->_target); }
     };
     
@@ -470,6 +470,6 @@
       InEdgeIt& operator++() { edge=edge->_next_in; return *this; }
     protected:
-      Node aNode() const { return Node(edge->_head); }
-      Node bNode() const { return Node(edge->_tail); }
+      Node aNode() const { return Node(edge->_target); }
+      Node bNode() const { return Node(edge->_source); }
     };
 
@@ -496,5 +496,5 @@
       SymEdgeIt& operator++() { 
 	if (out_or_in) { 
-	  node_item* v=edge->_tail;
+	  node_item* v=edge->_source;
 	  edge=edge->_next_out; 
 	  if (!edge) { out_or_in=0; edge=v->_first_in_edge; }
@@ -506,7 +506,7 @@
     protected:
       Node aNode() const { 
-	return (out_or_in) ? Node(edge->_tail) : Node(edge->_head); }
+	return (out_or_in) ? Node(edge->_source) : Node(edge->_target); }
       Node bNode() const { 
-	return (out_or_in) ? Node(edge->_head) : Node(edge->_tail); }
+	return (out_or_in) ? Node(edge->_target) : Node(edge->_source); }
     };
   };
@@ -524,6 +524,6 @@
   std::ostream& operator<<(std::ostream& os, const SageGraph::Edge& i) { 
     if (i.valid()) 
-      os << "(" << i.tailNode() << "--" << i.edge->id << "->" 
-	 << i.headNode() << ")"; 
+      os << "(" << i.sourceNode() << "--" << i.edge->id << "->" 
+	 << i.targetNode() << ")"; 
     else 
       os << "invalid";
