Index: lemon/belmann_ford.h
===================================================================
--- lemon/belmann_ford.h	(revision 1741)
+++ lemon/belmann_ford.h	(revision 1754)
@@ -142,5 +142,5 @@
   };
   
-  /// \brief BelmannFord algorithm class.
+  /// \brief %BelmannFord algorithm class.
   ///
   /// \ingroup flowalgs
@@ -152,5 +152,5 @@
   /// The Belmann-Ford algorithm solves the shortest path from one node
   /// problem when the edges can have negative length but the graph should
-  /// not contain circle with negative sum of length. If we can assume
+  /// not contain cycles with negative sum of length. If we can assume
   /// that all edge is non-negative in the graph then the dijkstra algorithm
   /// should be used rather.
@@ -429,9 +429,9 @@
     }
 
-    /// \brief Executes the algorithm and checks the negative circles.
+    /// \brief Executes the algorithm and checks the negative cycles.
     ///
     /// \pre init() must be called and at least one node should be added
     /// with addSource() before using this function. If there is
-    /// a negative circle in the graph it gives back false.
+    /// a negative cycles in the graph it gives back false.
     ///
     /// This method runs the %BelmannFord algorithm from the root node(s)
Index: lemon/floyd_warshall.h
===================================================================
--- lemon/floyd_warshall.h	(revision 1741)
+++ lemon/floyd_warshall.h	(revision 1754)
@@ -143,8 +143,8 @@
   };
   
-  /// \brief FloydWarshall algorithm class.
+  /// \brief %FloydWarshall algorithm class.
   ///
   /// \ingroup flowalgs
-  /// This class provides an efficient implementation of \c FloydWarshall 
+  /// This class provides an efficient implementation of \c Floyd-Warshall 
   /// algorithm. The edge lengths are passed to the algorithm using a
   /// \ref concept::ReadMap "ReadMap", so it is easy to change it to any 
@@ -153,8 +153,8 @@
   /// The algorithm solves the shortest path problem for each pairs
   /// of node when the edges can have negative length but the graph should
-  /// not contain circle with negative sum of length. If we can assume
+  /// not contain cycles with negative sum of length. If we can assume
   /// that all edge is non-negative in the graph then the dijkstra algorithm
   /// should be used from each node rather and if the graph is sparse and
-  /// there are negative circles then the johson algorithm.
+  /// there are negative circles then the johnson algorithm.
   ///
   /// The complexity of this algorithm is O(n^3 + e).
@@ -429,8 +429,8 @@
     }
 
-    /// \brief Executes the algorithm and checks the negative circles.
+    /// \brief Executes the algorithm and checks the negative cycles.
     ///
     /// This method runs the %FloydWarshall algorithm in order to compute 
-    /// the shortest path to each node pairs. If there is a negative circle 
+    /// the shortest path to each node pairs. If there is a negative cycle 
     /// in the graph it gives back false. 
     /// The algorithm computes 
Index: lemon/johnson.h
===================================================================
--- lemon/johnson.h	(revision 1747)
+++ lemon/johnson.h	(revision 1754)
@@ -176,8 +176,8 @@
   };
 
-  /// \brief Johnson algorithm class.
+  /// \brief %Johnson algorithm class.
   ///
   /// \ingroup flowalgs
-  /// This class provides an efficient implementation of \c Johnson 
+  /// This class provides an efficient implementation of \c %Johnson 
   /// algorithm. The edge lengths are passed to the algorithm using a
   /// \ref concept::ReadMap "ReadMap", so it is easy to change it to any 
@@ -186,5 +186,5 @@
   /// The algorithm solves the shortest path problem for each pairs
   /// of node when the edges can have negative length but the graph should
-  /// not contain circle with negative sum of length. If we can assume
+  /// not contain cycles with negative sum of length. If we can assume
   /// that all edge is non-negative in the graph then the dijkstra algorithm
   /// should be used from each node.
@@ -378,6 +378,6 @@
       }
     };
-    ///\ref named-templ-param "Named parameter" for setting heap and cross 
-    ///reference type
+    ///\brief \ref named-templ-param "Named parameter" for setting heap and 
+    ///cross reference type
 
     ///\ref named-templ-param "Named parameter" for setting heap and cross 
@@ -488,16 +488,12 @@
   protected:
     
-    typedef typename BelmannFord<Graph, LengthMap>::
-    template DefOperationTraits<OperationTraits>::
-    template DefPredMap<NullMap<Node, Edge> >::
-    Create BelmannFordType;
-
-    void shiftedRun(const BelmannFordType& belmannford) {
+    template <typename PotentialMap>
+    void shiftedRun(const PotentialMap& potential) {
       
       typename Graph::template EdgeMap<Value> shiftlen(*graph);
       for (EdgeIt it(*graph);  it != INVALID; ++it) {
       	shiftlen[it] = (*length)[it] 
-	  + belmannford.dist(graph->source(it)) 
-	  - belmannford.dist(graph->target(it));
+	  + potential[graph->source(it)] 
+	  - potential[graph->target(it)];
       }
       
@@ -513,5 +509,5 @@
 	  if (dijkstra.reached(jt)) {
 	    _dist->set(it, jt, dijkstra.dist(jt) + 
-		       belmannford.dist(jt) - belmannford.dist(it));
+		       potential[jt] - potential[it]);
 	    _pred->set(it, jt, dijkstra.pred(jt));
 	  } else {
@@ -551,4 +547,9 @@
     void start() {
 
+      typedef typename BelmannFord<Graph, LengthMap>::
+      template DefOperationTraits<OperationTraits>::
+      template DefPredMap<NullMap<Node, Edge> >::
+      Create BelmannFordType;
+      
       BelmannFordType belmannford(*graph, *length);
 
@@ -560,16 +561,21 @@
       belmannford.start();
 
-      shiftedRun(belmannford);
-    }
-
-    /// \brief Executes the algorithm and checks the negatvie circles.
+      shiftedRun(belmannford.distMap());
+    }
+
+    /// \brief Executes the algorithm and checks the negatvie cycles.
     ///
     /// This method runs the %Johnson algorithm in order to compute 
     /// the shortest path to each node pairs. If the graph contains
-    /// negative circle it gives back false. The algorithm 
+    /// negative cycle it gives back false. The algorithm 
     /// computes 
     /// - The shortest path tree for each node.
     /// - The distance between each node pairs.
     bool checkedStart() {
+      
+      typedef typename BelmannFord<Graph, LengthMap>::
+      template DefOperationTraits<OperationTraits>::
+      template DefPredMap<NullMap<Node, Edge> >::
+      Create BelmannFordType;
 
       BelmannFordType belmannford(*graph, *length);
@@ -582,5 +588,5 @@
       if (!belmannford.checkedStart()) return false;
 
-      shiftedRun(belmannford);
+      shiftedRun(belmannford.distMap());
       return true;
     }
