anchor.diff:      ||
           ANodeList <- NodeListList
       ],
  -    {ok, ResultList, Bt}.
  +    {ok, ResultList}.
   
   modify_kpnode(Bt, {}, _LowerBound, Actions, [], QueryOutput) ->
       modify_node(Bt, nil, Actions, QueryOutput);
  -modify_kpnode(Bt, NodeTuple, LowerBound, [], ResultNode, QueryOutput) ->
  +modify_kpnode(_Bt, NodeTuple, LowerBound, [], ResultNode, QueryOutput) ->
       {ok, lists:reverse(ResultNode, bounded_tuple_to_list(NodeTuple, LowerBound,
  -            tuple_size(NodeTuple), [])), QueryOutput, Bt};
  +            tuple_size(NodeTuple), [])), QueryOutput};
   modify_kpnode(Bt, NodeTuple, LowerBound,
           [{_, FirstActionKey, _}|_]=Actions, ResultNode, QueryOutput) ->
       Sz = tuple_size(NodeTuple),
  
positive.code:             end
          end,
      Actions = lists:sort(SortFun, lists:append([InsertActions, RemoveActions, FetchActions])),
      {ok, KeyPointers, QueryResults, Bt2} = modify_node(Bt, Root, Actions, []),
      {ok, NewRoot, Bt3} = complete_root(Bt2, KeyPointers),
      {ok, QueryResults, Bt3#btree{root=NewRoot}}.
  
  % for ordering different operations with the same key.
  % fetch < remove < insert
  
negative.code:     end,
      NodeTuple = list_to_tuple(NodeList),
  
      {ok, NewNodeList, QueryOutput2} =
      case NodeType of
      kp_node -> modify_kpnode(Bt, NodeTuple, 1, Actions, [], QueryOutput);
      kv_node -> modify_kvnode(Bt, NodeTuple, 1, Actions, [], QueryOutput)
      end,
      case NewNodeList of
      [] ->  % no nodes remain
          {ok, [], QueryOutput2};
      NodeList ->  % nothing changed
          {LastKey, _LastValue} = element(tuple_size(NodeTuple), NodeTuple),
          {ok, [{LastKey, RootPointerInfo}], QueryOutput2};
      _Else2 ->
          {ok, ResultList} = write_node(Bt, NodeType, NewNodeList),
          {ok, ResultList, QueryOutput2}
      end.
  
  reduce_node(#btree{reduce=nil}, _NodeType, _NodeList) ->
  