anchor.diff:  p_check_node([], [], AccR, AccN, AccRes) ->
       {lists:reverse(AccR), lists:append(lists:reverse(AccN)), AccRes};
   p_check_node([{ToOmit, Hash} | TK], [Node | TN], AccR, AccN, AccRes) ->
  -    OmitNodes = [Node | lists:sublist(TN, 1, ToOmit - 1)],
  -    ToResolve = merkle_get_sync_leaves(OmitNodes, Hash, []),
  -    p_check_node(TK, lists:nthtail(ToOmit - 1, TN), AccR, AccN,
  -                 lists:append(ToResolve, AccRes));
  +    {OmitNodes0, RestNodes} = util:safe_split(ToOmit - 1, TN),
  +    ToResolve = merkle_get_sync_leaves([Node | OmitNodes0], Hash, AccRes),
  +    p_check_node(TK, RestNodes, AccR, AccN, ToResolve);
   p_check_node([Hash | TK], [Node | TN], AccR, AccN, AccRes) ->
       IsLeaf = merkle_tree:is_leaf(Node),
  -    NodeHash = merkle_tree:get_hash(Node),
  -    case NodeHash =:= Hash of
  -        true when IsLeaf ->
  +    case merkle_tree:get_hash(Node) of
  +        Hash when IsLeaf ->
               p_check_node(TK, TN, [?ok_leaf | AccR], AccN, AccRes);
  -        true when not IsLeaf ->
  +        Hash when not IsLeaf ->
               p_check_node(TK, TN, [?ok_inner | AccR], AccN, AccRes);
  -        false when IsLeaf ->
  +        NodeHash when IsLeaf ->
               p_check_node(TK, TN, [{?fail_leaf, NodeHash} | AccR], AccN, AccRes);
  -        false when not IsLeaf ->
  +        _    when not IsLeaf ->
               Childs = merkle_tree:get_childs(Node),
               p_check_node(TK, TN, [?fail_inner | AccR], [Childs | AccN], AccRes)
       end.
   
  +%% @doc Processes compare results from check_node/2 on the initiator.
   -spec process_tree_cmp_result([merkle_cmp_result()],
                                 merkle_tree:merkle_tree() | RestTree,
                                 BranchSize::pos_integer(), Stats)
  
positive.code: resolve_leaves(Nodes, Dest, SID, OwnerL) ->
      resolve_leaves(Nodes, Dest, SID, OwnerL, intervals:empty(), 0).
  
  % @doc Returns number of caused resolve requests (requests with feedback count 2).
  -spec resolve_leaves([merkle_tree:mt_node()], Dest::comm:mypid(),
                       rrepair:session_id(), OwnerLocal::comm:erl_local_pid(),
                       Interval::intervals:interval(), Items::non_neg_integer())
          -> 0..2.
  resolve_leaves([Node | Rest], Dest, SID, OwnerL, Interval, Items) ->
      LeafInterval = merkle_tree:get_interval(Node),
      IntervalNew = intervals:union(Interval, LeafInterval),
      ItemsNew = Items + merkle_tree:get_item_count(Node),
  
negative.code: % Merkle Tree specific
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  %% @doc Compares the given Hashes from the other node with my merkle_tree nodes
  %%      (executed on non-initiator).
  %%      Returns the comparison results and the rest nodes to check in a next
  %%      step.
  -spec check_node(Hashes::[merkle_cmp_request()],
                   merkle_tree:merkle_tree() | NodeList)
          -> {[merkle_cmp_result()], RestTree::NodeList, ResolveReq::NodeList}
      when is_subtype(NodeList, [merkle_tree:mt_node()]).
  check_node(Hashes, Tree) ->
      TreeNodes = case merkle_tree:is_merkle_tree(Tree) of
                      false -> Tree;
                      true -> [merkle_tree:get_root(Tree)]
                  end,
      p_check_node(Hashes, TreeNodes, [], [], []).
  
  %% @doc Helper for check_node/2.
  -spec p_check_node(Hashes::[merkle_cmp_request()], MyNodes::NodeList,
  