anchor.diff:        | Leaf(_,_,_,leafType) when leafType = diffType -> 1
         | Leaf(_,_,_,_) -> 0
   
  +    // Recursive function for building the diff tree
  +    // takes in a sequence of tuples containing 
  +    // the file path in the package, list of the parent folders, 
  +    // the content of the difference in the file and the difference type
       let treeDataBuild input =
           let rec loop acc parentName inp =
  +          // Uses the root folder name as key to group the subfolder/files together
             let inp' =
               inp
               |> Seq.groupBy(fun (_,header,_,_) ->
  -                match header with // Always check for hd and tl !!!
  +                match header with
                     | [] -> String.Empty
                     | hd -> List.head hd)
               |> Seq.toList
   
  +          // If the input is not empty then collect the files by their root 
  +          // folder
             match inp' with
               | [] -> acc
               | y ->
                 y |> List.collect(fun (key,t) -> 
  +
  +                // Goes trough the grouped folders and construct a new node or leaf
                   match t |> Seq.toList with
  +                  // No children.
                     | [] -> []
  -                  | (id,header,data,diffType)::[] ->  // one child
  -                    match header with // Always check for hd and tl !!!
  +                  // One child. If no children then it is a leaf else 
  +                  // call loop and parse in the child
  +                  | (id,header,data,diffType)::[] ->  
  +                    match header with
                       | [ ] -> [ ]
  -                    | [x] -> [Tree.Leaf(id,key,data,diffType)]
  +                    | [x] -> [Tree.Leaf(id,key,data,diffType)] 
                       | x :: xs -> 
                         let newName = (parentName + key + "\\")
                         [ [(id,xs,data,diffType)] 
                           |> List.toSeq
                           |> loop (Tree.Node(newName,key,List.empty)) newName ]
  -                  | (id,header,data,diffType)::xs as zs -> // multiple children:
  +                  // Multiple children. Call loop and parse in a seq of childrens
  +                  | (id,header,data,diffType)::xs as zs -> 
                       let newName = (parentName + key + "\\")
                       [(id,header,data,diffType)::xs
                         |> List.map(fun (id,t,d,diffType) -> 
  -                          match t with // Always check for hd and tl !!!
  +                          match t with
                               | [] -> None
                               | z :: zs ->  Some (id,zs,d,diffType))
  -                      |> List.choose (fun x -> x) // Never use "id" as it's defined as the identity fn (fun x -> x)
  +                      |> List.choose (fun x -> x)
                         |> List.toSeq
                         |> loop (Tree.Node(newName,key,List.empty)) newName ])
                 |> addToNode acc
           loop (Tree.Node("Root","Root",List.empty)) "" input
   
  -    let rec treeHtmlWalker (sw:StreamWriter) spaces = function
  +
  +    // Walks through the constructed tree and produce html for the first row of 
  +    // the display table that contains the name of the Node/Leaf and with expand link
  +    let rec treeHtmlWalkerNameRow (sw:StreamWriter) spaces = function
           | Leaf(id,name,data,diffType) ->
             match String.IsNullOrWhiteSpace(data) with
               | false -> 
  
positive.code:       xtw.Close()
        sw.Close()
  
    let diffs pathSource pathTarget (log:ConsoleLogger.ConsoleLogger) =
  
      let guidSource = Guid.NewGuid().ToString()
  
negative.code:           |> sw.WriteLine
  
            branches
            |> List.iter(fun x -> treeHtmlWalkerNameRow sw (sprintf "\t%s" spaces) x)
            sw.WriteLine(spaces+"</ul>")
            sw.WriteLine(spaces+"</li>")
            sw.Flush()
  
      // Walks through the constructed tree and produce html for the other rows 
      // containing the difftype of the row and display the number of children in a node
      let rec treeHtmlTypeWalkerTypeRows (sw:StreamWriter) diffType spaces = function
          | Leaf(_,_,_,_) -> 
            sw.WriteLine(spaces + "<li> &nbsp; </li>")
          | Node(id,name,branches) -> 
  