anchor.diff:                          ownerRemotePid = OwnerR,
                           struct = Tree }) ->
       SID = rr_recon_stats:get(session_id, Stats),
  -    {Req, Res, NStats} = process_tree_cmp_result(CmpResults, Tree, Stats),
  +    {Req, Res, NStats, RTree} = process_tree_cmp_result(CmpResults, Tree, get_merkle_branch_factor(), Stats),
  +    %ct:pal("CmpRes=~p~nReq=~p~nRes=~p", [CmpResults, Req, Res]),
       Req =/= [] andalso
           comm:send(DestReconPid, {check_nodes, comm:this(), Req}),    
       {Leafs, Resolves} = lists:foldl(fun(Node, {AccL, AccR}) -> 
                                               {LCount, RCount} = resolve_node(Node, {SrcNode, SID, OwnerL, OwnerR}),
                                               {AccL + LCount, AccR + RCount}
                                       end, {0, 0}, Res),
  -    FStats = rr_recon_stats:inc([{tree_leafsSynced, Leafs}, {resolve_started, Resolves}], NStats),
  +    FStats = rr_recon_stats:inc([{tree_leafsSynced, Leafs}, 
  +                                 {resolve_started, Resolves}], NStats),
       CompLeft = rr_recon_stats:get(tree_compareLeft, FStats),
       if CompLeft =:= 0 ->
  +           %ct:pal("MERKLE - ~p", [FStats]),
              comm:send(DestReconPid, {shutdown, sync_finished_remote}),
              comm:send_local(self(), {shutdown, sync_finished});
          true -> ok
       end,
  -    State#rr_recon_state{ stats = FStats }.
  +    State#rr_recon_state{ stats = FStats, struct = RTree }.
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
  
positive.code: % Merkle Tree specific
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  -spec check_node({intervals:interval(), merkle_tree:mt_node_key()}, merkle_tree:merkle_tree()) -> merkle_cmp_result().
  check_node({I, Hash}, Tree) ->
      Node = merkle_tree:lookup(I, Tree),
      case Node of
          not_found -> {I, not_found};
          _ ->
              IsLeaf = merkle_tree:is_leaf(Node),
              case merkle_tree:get_hash(Node) =:= Hash of
                  true when IsLeaf -> {I, ok_leaf};
                  true when not IsLeaf -> {I, ok_inner};
                  false when IsLeaf -> {I, fail_leaf};
                  false when not IsLeaf ->
                      {I, fail_inner, [merkle_tree:get_hash(N) || N <- merkle_tree:get_childs(Node)]} 
              end
      end.
  
  -spec process_tree_cmp_result([merkle_cmp_result()], merkle_tree:merkle_tree(), Stats) ->
            {Requests, Resolve, New::Stats}
      when
        is_subtype(Stats,     rr_recon_stats:stats()),
        is_subtype(Requests,  [merkle_cmp_request()]),
        is_subtype(Resolve,   [merkle_tree:mt_node()]).
  process_tree_cmp_result(CmpResult, Tree, Stats) ->
      Compared = length(CmpResult),
      NStats = rr_recon_stats:inc([{tree_compareLeft, -Compared}, 
                                   {tree_nodesCompared, Compared}], Stats),
      process_tree_cmp_result(CmpResult, Tree, [], [], NStats).
  
  -spec process_tree_cmp_result([merkle_cmp_result()], Tree, AccR::Requests, AccRes::Resolve, Old::Stats) -> {NewR::Requests, NewRes::Resolve, New::Stats}
      when
          is_subtype(Tree,        merkle_tree:merkle_tree()),
          is_subtype(Resolve,     [merkle_tree:mt_node()]),
          is_subtype(Stats,       rr_recon_stats:stats()),
          is_subtype(Requests,    [merkle_cmp_request()]).
  process_tree_cmp_result([], _Tree, AccReq, AccRes, Stats) ->
      {AccReq, AccRes, Stats};
  process_tree_cmp_result([{_, not_found} | T], Tree, AccReq, AccRes, Stats) ->
      NStats = rr_recon_stats:inc([{error_count, 1}], Stats),
      process_tree_cmp_result(T, Tree, AccReq, AccRes, NStats);
  process_tree_cmp_result([{_, ok_leaf} | T], Tree, AccReq, AccRes, Stats) ->
      NStats = rr_recon_stats:inc([{tree_compareSkipped, 1}], Stats),
      process_tree_cmp_result(T, Tree, AccReq, AccRes, NStats);
  process_tree_cmp_result([{I, ok_inner} | T], Tree, AccReq, AccRes, Stats) ->
      Node = merkle_tree:lookup(I, Tree),
      NStats = rr_recon_stats:inc([{tree_compareSkipped, merkle_tree:size(Node)}], Stats),
      process_tree_cmp_result(T, Tree, AccReq, AccRes, NStats);
  process_tree_cmp_result([{I, fail_leaf} | T], Tree, AccReq, AccRes, Stats) ->
      Node = merkle_tree:lookup(I, Tree),
      process_tree_cmp_result(T, Tree, AccReq, [Node | AccRes], Stats);
  process_tree_cmp_result([{I, fail_inner, ChildHashs} | T], Tree, AccReq, AccRes, Stats) ->
      Node = merkle_tree:lookup(I, Tree),
      case merkle_tree:is_leaf(Node) of
          false -> 
              MyChilds = merkle_tree:get_childs(Node),
              {Matched, NotMatched} = compareNodes(MyChilds, ChildHashs, {[], []}),
              Skipped = lists:foldl(fun(MNode, Acc) -> 
                                            Acc + case merkle_tree:is_leaf(MNode) of
                                                      true -> 0;
                                                      false -> merkle_tree:size(MNode) - 1
                                                  end
                                    end, 0, Matched),
              NewReq = [{merkle_tree:get_interval(X), merkle_tree:get_hash(X)} || X <- NotMatched],
              NStats = rr_recon_stats:inc([{tree_compareLeft, length(NotMatched)},
                                            {tree_nodesCompared, length(Matched)},
                                            {tree_compareSkipped, Skipped}], Stats),
              process_tree_cmp_result(T, Tree, lists:append(NewReq, AccReq), AccRes, NStats);
          true -> 
              process_tree_cmp_result(T, Tree, AccReq, [Node | AccRes], Stats)
      end.
  
  -spec compareNodes(CompareNodes::NodeL, CmpKeyList, Acc::Result) -> Result when
      is_subtype(CmpKeyList,  [merkle_tree:mt_node_key()]),
      is_subtype(NodeL,       [merkle_tree:mt_node()]),
      is_subtype(Result,      {Matched::NodeL, NotMatched::NodeL}).
  compareNodes([], [], Acc) -> Acc;
  compareNodes([N | Nodes], [H | NodeHashs], {Matched, NotMatched}) ->
      case merkle_tree:get_hash(N) =:= H of
          true -> compareNodes(Nodes, NodeHashs, {[N|Matched], NotMatched});
          false -> compareNodes(Nodes, NodeHashs, {Matched, [N|NotMatched]})
      end.
  
  % @doc Starts one resolve process per leaf node in a given node
  
negative.code:         merkle_tree -> 
              case Initiator of
                  true -> comm:send(DestReconPid, 
                                    {check_nodes, comm:this(), [merkle_tree:get_hash(SyncStruct)]});
                  false ->
                      IntParams = [{interval, merkle_tree:get_interval(SyncStruct)}, {reconPid, comm:this()}],
                      comm:send(DestRRPid, 
  