Index: lemon/lgf_writer.h
===================================================================
--- lemon/lgf_writer.h	(revision 236)
+++ lemon/lgf_writer.h	(revision 240)
@@ -935,5 +935,5 @@
     bool local_os;
 
-    Graph& _graph;
+    const Graph& _graph;
 
     std::string _nodes_caption;
Index: lemon/list_graph.h
===================================================================
--- lemon/list_graph.h	(revision 234)
+++ lemon/list_graph.h	(revision 239)
@@ -396,7 +396,7 @@
     bool valid(Arc a) const { return Parent::valid(a); }
 
-    /// Change the target of \c e to \c n
-
-    /// Change the target of \c e to \c n
+    /// Change the target of \c a to \c n
+
+    /// Change the target of \c a to \c n
     ///
     ///\note The <tt>ArcIt</tt>s and <tt>OutArcIt</tt>s referencing
@@ -406,19 +406,19 @@
     ///\warning This functionality cannot be used together with the Snapshot
     ///feature.
-    void changeTarget(Arc e, Node n) {
-      Parent::changeTarget(e,n);
-    }
-    /// Change the source of \c e to \c n
-
-    /// Change the source of \c e to \c n
-    ///
-    ///\note The <tt>ArcIt</tt>s and <tt>InArcIt</tt>s referencing
-    ///the changed arc remain valid. However <tt>OutArcIt</tt>s are
+    void changeTarget(Arc a, Node n) {
+      Parent::changeTarget(a,n);
+    }
+    /// Change the source of \c a to \c n
+
+    /// Change the source of \c a to \c n
+    ///
+    ///\note The <tt>InArcIt</tt>s referencing the changed arc remain
+    ///valid. However the <tt>ArcIt<tt>s and <tt>OutArcIt</tt>s are
     ///invalidated.
     ///
     ///\warning This functionality cannot be used together with the Snapshot
     ///feature.
-    void changeSource(Arc e, Node n) {
-      Parent::changeSource(e,n);
+    void changeSource(Arc a, Node n) {
+      Parent::changeSource(a,n);
     }
 
@@ -843,5 +843,7 @@
 
     public:
-      operator Edge() const { return edgeFromId(id / 2); }
+      operator Edge() const { 
+        return id != -1 ? edgeFromId(id / 2) : INVALID; 
+      }
 
       Arc() {}
@@ -1115,5 +1117,5 @@
   protected:
 
-    void changeTarget(Edge e, Node n) {
+    void changeV(Edge e, Node n) {
       if(arcs[2 * e.id].next_out != -1) {
         arcs[arcs[2 * e.id].next_out].prev_out = arcs[2 * e.id].prev_out;
@@ -1136,5 +1138,5 @@
     }
 
-    void changeSource(Edge e, Node n) {
+    void changeU(Edge e, Node n) {
       if(arcs[(2 * e.id) | 1].next_out != -1) {
         arcs[arcs[(2 * e.id) | 1].next_out].prev_out =
@@ -1259,64 +1261,30 @@
     /// added to the graph.
     bool valid(Edge e) const { return Parent::valid(e); }
-    /// \brief Change the source of \c e to \c n
-    ///
-    /// This function changes the source of \c e to \c n.
-    ///
-    ///\note The <tt>ArcIt</tt>s and <tt>InArcIt</tt>s
-    ///referencing the changed arc remain
-    ///valid. However <tt>OutArcIt</tt>s are invalidated.
+    /// \brief Change the end \c u of \c e to \c n
+    ///
+    /// This function changes the end \c u of \c e to node \c n.
+    ///
+    ///\note The <tt>EdgeIt</tt>s and <tt>ArcIt</tt>s referencing the
+    ///changed edge are invalidated and if the changed node is the
+    ///base node of an iterator then this iterator is also
+    ///invalidated.
     ///
     ///\warning This functionality cannot be used together with the
     ///Snapshot feature.
-    void changeSource(Edge e, Node n) {
-      Parent::changeSource(e,n);
-    }
-    /// \brief Change the target of \c e to \c n
-    ///
-    /// This function changes the target of \c e to \c n.
-    ///
-    /// \note The <tt>ArcIt</tt>s referencing the changed arc remain
-    /// valid. However the other iterators may be invalidated.
+    void changeU(Edge e, Node n) {
+      Parent::changeU(e,n);
+    }
+    /// \brief Change the end \c v of \c e to \c n
+    ///
+    /// This function changes the end \c v of \c e to \c n.
+    ///
+    ///\note The <tt>EdgeIt</tt>s referencing the changed edge remain
+    ///valid, however <tt>ArcIt</tt>s and if the changed node is the
+    ///base node of an iterator then this iterator is invalidated.
     ///
     ///\warning This functionality cannot be used together with the
     ///Snapshot feature.
-    void changeTarget(Edge e, Node n) {
-      Parent::changeTarget(e,n);
-    }
-    /// \brief Change the source of \c e to \c n
-    ///
-    /// This function changes the source of \c e to \c n.
-    /// It also changes the proper node of the represented edge.
-    ///
-    ///\note The <tt>ArcIt</tt>s and <tt>InArcIt</tt>s
-    ///referencing the changed arc remain
-    ///valid. However <tt>OutArcIt</tt>s are invalidated.
-    ///
-    ///\warning This functionality cannot be used together with the
-    ///Snapshot feature.
-    void changeSource(Arc e, Node n) {
-      if (Parent::direction(e)) {
-        Parent::changeSource(e,n);
-      } else {
-        Parent::changeTarget(e,n);
-      }
-    }
-    /// \brief Change the target of \c e to \c n
-    ///
-    /// This function changes the target of \c e to \c n.
-    /// It also changes the proper node of the represented edge.
-    ///
-    ///\note The <tt>ArcIt</tt>s and <tt>OutArcIt</tt>s
-    ///referencing the changed arc remain
-    ///valid. However <tt>InArcIt</tt>s are invalidated.
-    ///
-    ///\warning This functionality cannot be used together with the
-    ///Snapshot feature.
-    void changeTarget(Arc e, Node n) {
-      if (Parent::direction(e)) {
-        Parent::changeTarget(e,n);
-      } else {
-        Parent::changeSource(e,n);
-      }
+    void changeV(Edge e, Node n) {
+      Parent::changeV(e,n);
     }
     /// \brief Contract two nodes.
@@ -1338,8 +1306,8 @@
         if (r && runningNode(e) == a) {
           erase(e);
-        } else if (source(e) == b) {
-          changeSource(e, a);
+        } else if (u(e) == b) {
+          changeU(e, a);
         } else {
-          changeTarget(e, a);
+          changeV(e, a);
         }
         e = f;
Index: lemon/smart_graph.h
===================================================================
--- lemon/smart_graph.h	(revision 220)
+++ lemon/smart_graph.h	(revision 238)
@@ -466,5 +466,7 @@
 
     public:
-      operator Edge() const { return edgeFromId(_id / 2); }
+      operator Edge() const { 
+        return _id != -1 ? edgeFromId(_id / 2) : INVALID; 
+      }
 
       Arc() {}
