diff --git a/include/libdraw.h b/include/libdraw.h
index 35e836ab8a007fed3a41a62be1c2ea4fb2e11c04..30f8138f2f68d90b6415a9b1ef58d268da61be7e 100644
--- a/include/libdraw.h
+++ b/include/libdraw.h
@@ -31,11 +31,11 @@ extern char *color[4];
  * function for treedraw
  */
 
-void libhqr_writeheader(FILE *tree);
-void libhqr_writeend(FILE *tree);
-void libhqr_drawTT(int x, int y, int w, int h, int k, FILE *tree);
-void libhqr_drawTS(int x, int y, int w, int h, int k, FILE *tree);
-void libhqr_drawline(int x1, int y1, int x2, int y2, int k, FILE *tree);
+void libhqr_writeheader(FILE *file);
+void libhqr_writeend(FILE *file);
+void libhqr_drawTT(int x, int y, int w, int h, int k, FILE *file);
+void libhqr_drawTS(int x, int y, int w, int h, int k, FILE *file);
+void libhqr_drawline(int x1, int y1, int x2, int y2, int k, FILE *file);
 
 END_C_DECLS
 
diff --git a/include/libhqr.h b/include/libhqr.h
index 9f516dc5d91f3b04c146a521d78881e2762d14f8..c9bf812919ae5e604c63fec38b9677ec8a711486 100644
--- a/include/libhqr.h
+++ b/include/libhqr.h
@@ -194,7 +194,7 @@ void libhqr_hqr_finalize( libhqr_tree_t *qrtree );
  * function for treewalk
  */
 
-void libhqr_treewalk(const libhqr_tree_t *qrtree,int k, int *tiles, FILE *tree, int size);
+void libhqr_treewalk(const libhqr_tree_t *qrtree,int k, int *tiles, FILE *file, int size);
 
 /*
  * Debugging functions
diff --git a/src/treedraw.c b/src/treedraw.c
index f834e16e1f14f79b22dec38918648ccb8cd88832..4c3a05df777ffc02f0ff7f08f6a001d70d04b258 100644
--- a/src/treedraw.c
+++ b/src/treedraw.c
@@ -28,8 +28,8 @@ char *colortree[4] = {"red", "blue", "green", "purple"};
  * functions writing in the svg file
  */
 
-void libhqr_writeheader(FILE *tree){
-    if(fprintf(tree, "<?xml version=\"1.0\" standalone=\"no\"?>\n"
+void libhqr_writeheader(FILE *file){
+    if(fprintf(file, "<?xml version=\"1.0\" standalone=\"no\"?>\n"
                      "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"
                      "<svg width=\"2000\" height=\"2000\" version=\"1.1\" \n xmlns=\"http://www.w3.org/2000/svg\">\n") <0)
         return;
@@ -44,25 +44,25 @@ void libhqr_writeheader(FILE *tree){
  *    k - Factorization step for the color
  */
 
-void libhqr_drawTT(int x, int y, int w, int h, int k, FILE *tree){
-    if(fprintf(tree,"<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill=\"%s\" /> \n", x, y, w, h, colortree[k%4]) < 0 )
+void libhqr_drawTT(int x, int y, int w, int h, int k, FILE *file){
+    if(fprintf(file,"<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill=\"%s\" /> \n", x, y, w, h, colortree[k%4]) < 0 )
         return;
 }
 
-void libhqr_drawTS(int x, int y, int w, int h, int k, FILE *tree){
-    if(fprintf(tree,"<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill=\"%s\" /> \n", x, y, w, h, colortree[k%4]) < 0 )
+void libhqr_drawTS(int x, int y, int w, int h, int k, FILE *file){
+    if(fprintf(file,"<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill=\"%s\" /> \n", x, y, w, h, colortree[k%4]) < 0 )
         return;
     int x2 = x + (w / 4);
     int y2 = y + (h / 4);
     int w2 = (w / 2);
     int h2 = (h / 2);
-    if(fprintf(tree,"<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill =\"white\"/> \n", x2, y2, w2, h2) < 0 ) return;
+    if(fprintf(file,"<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill =\"white\"/> \n", x2, y2, w2, h2) < 0 ) return;
 }
 
-void libhqr_drawline(int x1, int y1, int x2, int y2, int k, FILE *tree){
-    if(fprintf(tree,"<line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\" style=\"fill:none;stroke:%s;stroke-width:2px;\"/> \n", x1, y1, x2, y2, colortree[k%4]) < 0 ) return;
+void libhqr_drawline(int x1, int y1, int x2, int y2, int k, FILE *file){
+    if(fprintf(file,"<line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\" style=\"fill:none;stroke:%s;stroke-width:2px;\"/> \n", x1, y1, x2, y2, colortree[k%4]) < 0 ) return;
 }
 
-void libhqr_writeend(FILE *tree){
-    if(fprintf(tree, "</svg>") < 0) return;
+void libhqr_writeend(FILE *file){
+    if(fprintf(file, "</svg>") < 0) return;
 }
diff --git a/src/treewalk.c b/src/treewalk.c
index dfdf64b0b9376942991b4f4073b54bb314cc1775..b68cfaeae4a771b09571d85acadab3d2a5dfd87c 100644
--- a/src/treewalk.c
+++ b/src/treewalk.c
@@ -19,27 +19,37 @@
 #include <stdio.h>
 #include <assert.h>
 
-void draw_horizontal_line(int pivot, int k, FILE *tree,int size, int *tiles, int killed){
+/*
+ * Common prameters to the 2 following functions:
+ *    k     - Factorization step for the color
+ *    p     - annihilator
+ *    m     - tile eliminated
+ *    file  - File where the lines are drawn
+ *    size  - Size parameter of the drawing
+ *    tiles - table stocking the tiles
+ */
+
+void draw_horizontal_line(int k, int p, int m, int *tiles, FILE *file, int size){
     int y, ordinate1, ordinate2, absciss1, absciss2, absciss3, absciss4;
-    ordinate1 =  size + size * killed;
-    ordinate2  = size + size * pivot;
-    absciss1 = (size + (size / 4)) + size * tiles[killed];
-    absciss3 = (size + (size / 4)) + size * tiles[pivot];
+    ordinate1 =  size + size * m;
+    ordinate2  = size + size * p;
+    absciss1 = (size + (size / 4)) + size * tiles[m];
+    absciss3 = (size + (size / 4)) + size * tiles[p];
     /* Increasing the step */
-    y = libhqr_imax(tiles[killed],  tiles[pivot]) + 1;
-    tiles[killed] = tiles[pivot] = y;
-    absciss2 = (size + (size / 4)) + size * tiles[killed];
-    absciss4 = (size + (size / 4)) + size * tiles[pivot];
-    libhqr_drawline( absciss1, ordinate1, absciss2, ordinate1, k, tree);
-    libhqr_drawline( absciss3, ordinate2, absciss4, ordinate2, k, tree);
+    y = libhqr_imax(tiles[m],  tiles[p]) + 1;
+    tiles[m] = tiles[p] = y;
+    absciss2 = (size + (size / 4)) + size * tiles[m];
+    absciss4 = (size + (size / 4)) + size * tiles[p];
+    libhqr_drawline( absciss1, ordinate1, absciss2, ordinate1, k, file);
+    libhqr_drawline( absciss3, ordinate2, absciss4, ordinate2, k, file);
 }
 
-void draw_vertical_line(int pivot, int k, FILE *tree,int size, int *tiles, int killed){
+void draw_vertical_line(int k, int p, int m, int *tiles, FILE *file, int size){
     int absciss, ordinate1, ordinate2;
-    absciss = size + size * tiles[killed];
-    ordinate1 = size + size * killed;
-    ordinate2 = size + size * pivot;
-    libhqr_drawline(absciss, ordinate1, absciss, ordinate2, k, tree);
+    absciss = size + size * tiles[m];
+    ordinate1 = size + size * m;
+    ordinate2 = size + size * p;
+    libhqr_drawline(absciss, ordinate1, absciss, ordinate2, k, file);
 }
 
 /****************************************************
@@ -58,14 +68,14 @@ void draw_vertical_line(int pivot, int k, FILE *tree,int size, int *tiles, int k
  * @param[in] tiles
  *         Table stocking the tiles and their step
  *
- * @param[in] tree
+ * @param[in] file
  *         File where the tree is drawn
  *
  * @param[in] size
  *         Paramter for the size of the drawing
  *
  */
-void libhqr_treewalk(const libhqr_tree_t *qrtree, int k, int *tiles, FILE *tree, int size)
+void libhqr_treewalk(const libhqr_tree_t *qrtree, int k, int *tiles, FILE *file, int size)
 {
     int tsid = -1, ttid = -1;
     int p = k;
@@ -103,8 +113,8 @@ void libhqr_treewalk(const libhqr_tree_t *qrtree, int k, int *tiles, FILE *tree,
             printf("POP TS: %d\n", tsid);
             printf("Call function on (%d, %d)\n",
                    qrtree->currpiv(qrtree, k, tsid), tsid );
-            draw_horizontal_line(qrtree->currpiv(qrtree, k, tsid), k, tree, size, tiles, tsid);
-            draw_vertical_line(qrtree->currpiv(qrtree, k, tsid), k, tree, size, tiles, tsid);
+            draw_horizontal_line(k, qrtree->currpiv(qrtree, k, tsid), tsid, tiles, file, size);
+            draw_vertical_line(k, qrtree->currpiv(qrtree, k, tsid), tsid, tiles, file, size);
             tsid = libhqr_queue_tile_head(&ts);
         }
         pivot = p = ttid;