Index: demo/dijkstra_demo.cc
===================================================================
--- demo/dijkstra_demo.cc	(revision 1528)
+++ demo/dijkstra_demo.cc	(revision 1530)
@@ -45,4 +45,9 @@
     len.set(v5_t, 8);
 
+    std::cout << "This program is a simple demo of the LEMON Dijkstra class."<<std::endl;
+    std::cout << "We calculate the shortest path from node s to node t in a graph."<<std::endl;
+    std::cout <<std::endl;
+
+
     std::cout << "The id of s is " << g.id(s)<< ", the id of t is " << g.id(t)<<"."<<std::endl;
 
Index: demo/hello_lemon.cc
===================================================================
--- demo/hello_lemon.cc	(revision 1526)
+++ demo/hello_lemon.cc	(revision 1530)
@@ -6,15 +6,36 @@
   typedef lemon::ListGraph Graph;
   typedef Graph::EdgeIt EdgeIt;
+  typedef Graph::Edge Edge;
   typedef Graph::NodeIt NodeIt;
+  typedef Graph::Node Node;
+  typedef Graph::EdgeMap<int> LengthMap;
   using lemon::INVALID;
 
   Graph g;
   
-  for (int i = 0; i < 3; i++)
-    g.addNode();
+  Node s=g.addNode();
+  Node v2=g.addNode();
+  Node v3=g.addNode();
+  Node v4=g.addNode();
+  Node v5=g.addNode();
+  Node t=g.addNode();
+
+  Edge s_v2=g.addEdge(s, v2);
+  Edge s_v3=g.addEdge(s, v3);
+  Edge v2_v4=g.addEdge(v2, v4);
+  Edge v2_v5=g.addEdge(v2, v5);
+  Edge v3_v5=g.addEdge(v3, v5);
+  Edge v4_t=g.addEdge(v4, t);
+  Edge v5_t=g.addEdge(v5, t);
   
-  for (NodeIt i(g); i!=INVALID; ++i)
-    for (NodeIt j(g); j!=INVALID; ++j)
-      if (i != j) g.addEdge(i, j);
+  LengthMap length(g);
+
+  length.set(s_v2, 10);
+  length.set(s_v3, 10);
+  length.set(v2_v4, 5);
+  length.set(v2_v5, 8);
+  length.set(v3_v5, 5);
+  length.set(v4_t, 8);
+  length.set(v5_t, 8);
 
   std::cout << "Hello World!" << std::endl;
@@ -32,3 +53,12 @@
     std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
   std::cout << std::endl;
+  std::cout <<  std::endl;
+
+  std::cout << "There is a map on the edges (length)!" << std::endl;
+  std::cout <<  std::endl;
+  for (EdgeIt i(g); i!=INVALID; ++i)
+    std::cout << "length(" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")="<<length[i]<<std::endl;
+
+  std::cout << std::endl;
+
 }
Index: demo/lp_demo.cc
===================================================================
--- demo/lp_demo.cc	(revision 1513)
+++ demo/lp_demo.cc	(revision 1530)
@@ -24,4 +24,6 @@
  //The following example is taken from the documentation of the GLPK library.
  //See it in the GLPK reference manual and among the GLPK sample files (sample.c)
+
+  //A default solver is taken
   LpDefault lp;
   typedef LpDefault::Row Row;
@@ -37,13 +39,4 @@
   Col x3 = lp.addCol();
 
-  //One solution
-  //   Row p = lp.addRow();
-  //   Row q = lp.addRow();
-  //   Row r = lp.addRow();
-  //   lp.setRow(p,x1+x2+x3 <=100);  
-  //   lp.setRow(q,10*x1+4*x2+5*x3<=600);  
-  //   lp.setRow(r,2*x1+2*x2+6*x3<=300);  
-
-  //A more elegant one
   //Constraints
   lp.addRow(x1+x2+x3 <=100);  
@@ -70,4 +63,5 @@
   }
 
+  //End of LEMON style code
 
   //Here comes the same problem written in C using GLPK API routines
Index: demo/reader_writer_demo.cc
===================================================================
--- demo/reader_writer_demo.cc	(revision 1528)
+++ demo/reader_writer_demo.cc	(revision 1530)
@@ -16,6 +16,4 @@
     SmartGraph::EdgeMap<int> cap(graph);
     reader.readEdgeMap("capacity",cap);
-//     reader.readNode("source",s).readNode("target",t)
-//       .readEdgeMap("capacity",cap).run();
     reader.run();
 
@@ -31,48 +29,4 @@
     writer.run();
      
-//     LemonReader reader(std::cin);
-
-//     NodeSetReader<SmartGraph> nodeset(reader, graph);
-//     SmartGraph::NodeMap<int> cost(graph);
-//     nodeset.readMap("cost", cost);
-//     SmartGraph::NodeMap<char> mmap(graph);
-//     nodeset.readMap("mmap", mmap);
-
-//     EdgeSetReader<SmartGraph> edgeset(reader, graph, nodeset);
-//     SmartGraph::EdgeMap<std::string> description(graph);
-//     edgeset.readMap<QuotedStringReader>("description", description);
-
-//     NodeReader<SmartGraph> nodes(reader, nodeset);
-//     SmartGraph::Node source;
-//     nodes.readNode("source", source);
-//     SmartGraph::Node target;
-//     nodes.readNode("target", target);
-
-//     AttributeReader<> attribute(reader, "gui");
-//     std::string author;
-//     attribute.readAttribute<LineReader>("author", author);
-//     int count;
-//     attribute.readAttribute("count", count);
-
-//     PrintReader print(reader);
-
-//     reader.run();
-
-
-//     for (SmartGraph::NodeIt it(graph); it != INVALID; ++it) {
-//       std::cout << cost[it] << ' ' << mmap[it] << std::endl;
-//     }
-
-//     for (SmartGraph::EdgeIt it(graph); it != INVALID; ++it) {
-//       std::cout << description[it] << std::endl;
-//     }
-
-//     std::cout << "author: " << author << std::endl;
-//     std::cout << "count: " << count << std::endl;
-
-//     std::cout << "source cost: " << cost[source] << std::endl;
-//     std::cout << "target cost: " << cost[target] << std::endl;
-
-//     std::cout.flush();
   } catch (DataFormatError& error) {
     std::cerr << error.what() << std::endl;
Index: demo/route.lgf
===================================================================
--- demo/route.lgf	(revision 1435)
+++ demo/route.lgf	(revision 1530)
@@ -12,30 +12,32 @@
 0	189.239	92.5316	
 @edgeset
-		length	
-2	3	901.074	
-8	5	270.85	
-6	9	601.553	
-5	9	285.022	
-9	4	408.091	
-3	0	719.712	
-7	5	612.836	
-0	4	933.353	
-5	0	778.871	
-5	5	0	
-7	1	664.049	
-5	5	0	
-0	9	560.464	
-4	8	352.36	
-4	9	399.625	
-4	1	402.171	
-1	2	591.688	
-3	8	182.376	
-4	5	180.254	
-3	1	345.283	
-5	4	184.511	
-6	2	1112.45	
-0	1	556.624	
+		length	id	
+2	3	901.074	0	
+8	5	270.85	1	
+6	9	601.553	2	
+5	9	285.022	3	
+9	4	408.091	4	
+3	0	719.712	5	
+7	5	612.836	6	
+0	4	933.353	7	
+5	0	778.871	8	
+5	5	0	9	
+7	1	664.049	10	
+5	5	0	11	
+0	9	560.464	12	
+4	8	352.36	13	
+4	9	399.625	14	
+4	1	402.171	15	
+1	2	591.688	16	
+3	8	182.376	17	
+4	5	180.254	18	
+3	1	345.283	19	
+5	4	184.511	20	
+6	2	1112.45	21	
+0	1	556.624	22	
 @nodes
 source	1	
 target	8	
+@edges 
+@attributes 
 @end
Index: demo/sample.lgf
===================================================================
--- demo/sample.lgf	(revision 1528)
+++ demo/sample.lgf	(revision 1530)
@@ -1,20 +1,20 @@
-@nodeset 
-id	
-5	
-4	
-3	
-2	
-1	
-0	
-@edgeset 
-		id	capacity	
-4	5	6	8	
-3	5	5	8	
-2	4	4	5	
-1	4	3	8	
-1	3	2	5	
-0	2	1	10	
-0	1	0	10	
-@nodes 
+@nodeset
+id      coordinates_x   coordinates_y
+5       796.398 208.035
+4       573.002 63.002
+3       568.549 401.748
+2       277.889 68.476
+1       288.248 397.327
+0       102.239 257.532
+@edgeset
+                id      capacity
+4       5       6       8
+3       5       5       8
+2       4       4       5
+1       4       3       8
+1       3       2       5
+0       2       1       10
+0       1       0       10
+@nodes
 source 0
 target 5
Index: doc/quicktour.dox
===================================================================
--- doc/quicktour.dox	(revision 1528)
+++ doc/quicktour.dox	(revision 1530)
@@ -43,18 +43,35 @@
 optimization.
 
-<ol> <li>The following code fragment shows how to fill a graph with
-data. It creates a complete graph on 4 nodes. The type Listgraph is one of the
-LEMON graph types: the typedefs in the beginning are for convenience and we
-will suppose them later as well.  
+<ol> <li>The following code shows how to build a graph from scratch
+and iterate on its nodes and edges.  This example also shows how to
+give a map on the edges of the graph.  The type Listgraph is one of
+the LEMON graph types: the typedefs in the beginning are for
+convenience and we will assume them later as well.
 
-\dontinclude hello_lemon.cc
-\skip ListGraph
-\until addEdge
+\include hello_lemon.cc
 
-See the whole program in file \ref hello_lemon.cc in \c demo subdir of
+See the whole program in file \ref hello_lemon.cc in the \c demo subdir of
 LEMON package.
 
     If you want to read more on the LEMON graph structures and
 concepts, read the page about \ref graphs "graphs".
+
+
+<li>LEMON has an own file format for storing graphs, maps on edges/nodes and some other things. Instead of any explanation let us give a
+short example file in this format: read the detailed description of the LEMON
+graph file format and input-output routines here: \ref graph-io-page.
+
+So here is a file describing a graph of 6 nodes (0 to 5), two nodemaps
+(called \c coordinates_x and \c coordinates_y), several edges, an edge map
+called \c capacity and two designated nodes (called \c source and \c target).
+
+\include sample.lgf
+
+Finally let us give a simple example that reads a graph from a file and writes
+it to the standard output.
+
+\include reader_writer_demo.cc
+
+See the whole program in file \ref reader_writer_demo.cc.
 
 <li> The following code shows how to read a graph from a stream
@@ -74,26 +91,4 @@
 the details about the output routines into files of the DIMACS format.
 
-<li>DIMACS formats could not give us the flexibility we needed,
-so we worked out our own file format. Instead of any explanation let us give a
-short example file in this format: read the detailed description of the LEMON
-graph file format and input-output routines \ref graph-io-page here.
-
-So here is a file describing a graph of 10 nodes (0 to 9), two nodemaps
-(called \c coordinates_x and \c coordinates_y), several edges, an edge map
-called \c length and two designated nodes (called \c source and \c target).
-
-\todo Maybe a shorter example would be better here.
-
-\include route.lgf
-
-Finally let us give a simple example that reads a graph from a file and writes
-it to the standard output.
-
-\include reader_writer_demo.cc
-
-See the whole program in file \ref reader_writer_demo.cc.
-
-\todo This is still under construction!
-
 </ol>
 <li> If you want to solve some transportation problems in a network then 
@@ -102,19 +97,22 @@
 that solves this is  the \ref lemon::Dijkstra "LEMON Dijkstra class".
 The following code is a simple program using the 
-\ref lemon::Dijkstra "LEMON Dijkstra class" and it also shows how to define a map on the edges (the length
-function):
+\ref lemon::Dijkstra "LEMON Dijkstra class": it calculates the shortest path between node \c s and \c t in a graph \c g.
+We omit the part reading the graph  \c g and the length map \c len.
 
 \dontinclude dijkstra_demo.cc
 \skip ListGraph
+\until Graph g
+...
+\skip Dijkstra algorithm
 \until std::cout << g.id(s)
 
 See the whole program in \ref dijkstra_demo.cc.
 
-The first part of the code is self-explanatory: we build the graph and set the
-length values of the edges. Then we instantiate a member of the Dijkstra class
-and run the Dijkstra algorithm from node \c s. After this we read some of the
-results. 
-You can do much more with the Dijkstra class, for example you can run it step
-by step and gain full control of the execution. For a detailed description, see the documentation of the \ref lemon::Dijkstra "LEMON Dijkstra class".
+Some explanation: after instantiating a member of the Dijkstra class
+we run the Dijkstra algorithm from node \c s. After this we read some
+of the results.  You can do much more with the Dijkstra class, for
+example you can run it step by step and gain full control of the
+execution. For a detailed description, see the documentation of the
+\ref lemon::Dijkstra "LEMON Dijkstra class".
 
 
@@ -155,46 +153,7 @@
 interface. The code together with the comments is self-explanatory.
 
-\code
-
-  //A default solver is taken
-  LpDefault lp;
-  typedef LpDefault::Row Row;
-  typedef LpDefault::Col Col;
-  
-
-  //This will be a maximization
-  lp.max();
-
-  //We add coloumns (variables) to our problem
-  Col x1 = lp.addCol();
-  Col x2 = lp.addCol();
-  Col x3 = lp.addCol();
-
-  //Constraints
-  lp.addRow(x1+x2+x3 <=100);  
-  lp.addRow(10*x1+4*x2+5*x3<=600);  
-  lp.addRow(2*x1+2*x2+6*x3<=300);  
-  //Nonnegativity of the variables
-  lp.colLowerBound(x1, 0);
-  lp.colLowerBound(x2, 0);
-  lp.colLowerBound(x3, 0);
-  //Objective function
-  lp.setObj(10*x1+6*x2+4*x3);
-  
-  //Call the routine of the underlying LP solver
-  lp.solve();
-
-  //Print results
-  if (lp.primalStatus()==LpSolverBase::OPTIMAL){
-    printf("Z = %g; x1 = %g; x2 = %g; x3 = %g\n", 
-	   lp.primalValue(), 
-	   lp.primal(x1), lp.primal(x2), lp.primal(x3));
-  }
-  else{
-    std::cout<<"Optimal solution not found!"<<std::endl;
-  }
-
-
-\endcode
+\dontinclude lp_demo.cc
+\skip A default solver is taken
+\until End of LEMON style code
 
 See the whole code in \ref lp_demo.cc.
@@ -211,39 +170,10 @@
 in the memory. We will also omit the typedefs.
 
-\code
-  //Define a map on the edges for the variables of the LP problem
-  typename G::template EdgeMap<LpDefault::Col> x(g);
-  lp.addColSet(x);
-  
-  //Nonnegativity and capacity constraints
-  for(EdgeIt e(g);e!=INVALID;++e) {
-    lp.colUpperBound(x[e],cap[e]);
-    lp.colLowerBound(x[e],0);
-  }
+\dontinclude lp_maxflow_demo.cc
+\skip Define a map on the edges for the variables of the LP problem
+\until lp.max();
+\skip Solve with the underlying solver
+\until lp.solve();
 
-
-  //Flow conservation constraints for the nodes (except for 's' and 't')
-  for(NodeIt n(g);n!=INVALID;++n) if(n!=s&&n!=t) {
-    LpDefault::Expr ex;
-    for(InEdgeIt  e(g,n);e!=INVALID;++e) ex+=x[e];
-    for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e];
-    lp.addRow(ex==0);
-  }
-  
-  //Objective function: the flow value entering 't'
-  {
-    LpDefault::Expr ex;
-    for(InEdgeIt  e(g,t);e!=INVALID;++e) ex+=x[e];
-    for(OutEdgeIt e(g,t);e!=INVALID;++e) ex-=x[e];
-    lp.setObj(ex);
-  }
-
-  //Maximization
-  lp.max();
-
-  //Solve with the underlying solver
-  lp.solve();
-
-\endcode
 
 The complete program can be found in file \ref lp_maxflow_demo.cc. After compiling run it in the form:
