anchor.diff:                                                                                                  lists:nth(KeyPos - 1, Subtrees)
                                                                                           end,
       {KeyNoXC, SubtreeNoXC, KeyValuesXC, SubtreesXC} = _TreeXC = lists:nth(KeyPos, Subtrees),
  -    ?debugFmt("wwe debugging delete_1_2 ===> ~n KeyPos: ~p~n SubtreeNo: ~p~n", [KeyPos, SubtreeNo]),
       {KeyNoXCRight, SubtreeNoXCRight, KeyValuesXCRight, SubtreesXCRight} = _TreeXCRight = lists:nth(KeyPos + 1, Subtrees),
  -    ?debugFmt("wwe debugging delete_1_2 ===> ~n TreeXCLeft: ~p~n TreeX: ~p~n TreeXCRight: ~p~n", [_TreeXCLeft, _TreeXC, _TreeXCRight]),
  -    Out = case KeyNoXC >= SubtreeNoMin of
  -              true ->
  -                  % CLRS: case 2a
  -                  ?debugFmt("wwe debugging delete_1_2 ===> ~n CLRS: case 2a ~n", []),
  -                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer KeyValues: ~p~n", [lists:sublist(KeyValues, 1, KeyPos - 1) ++ [lists:nth(KeyNoXC, KeyValuesXC)] ++ lists:sublist(KeyValues, KeyPos + 1, KeyNo)]),
  -                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer Subtrees Part 1: ~p~n", [lists:sublist(Subtrees, 1, KeyPos - 1)]),
  -                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer Subtrees Part 3: ~p~n", [lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)]),
  -                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner KeyValues: ~p~n", [KeyValuesXC]),
  -                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner Subtrees Part 1: ~p~n", [_SubtreesXCLeft]),
  -                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner Subtrees Part 2: ~p~n", [SubtreesXC]),
  -                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner Subtrees Part 3: ~p~n", [SubtreesXCRight]),
  -                  {
  -                      KeyNo,
  -                      SubtreeNo,
  -                          lists:sublist(KeyValues, 1, KeyPos - 1) ++ [lists:nth(KeyNoXC, KeyValuesXC)] ++ lists:sublist(KeyValues, KeyPos + 1, KeyNo),
  -                          lists:sublist(Subtrees, 1, KeyPos - 1) ++
  -                          [
  -                              {
  -                                  KeyNoXC - 1, case SubtreeNoXC == 0 of
  -                                                   true ->
  -                                                       0;
  -                                                   _ ->
  -                                                       SubtreeNoXC - 1
  -                                               end, lists:sublist(KeyValuesXC, 1, KeyNoXC - 1), case SubtreeNoXC == 0 of
  -                                                                                                    true ->
  -                                                                                                        [];
  -                                                                                                    _ ->
  -                                                                                                        lists:sublist(SubtreesXC, 1, KeyNoXC)
  -                                                                                                end
  -                              },
  -                              {
  -                                  KeyNoXCRight,
  -                                  SubtreeNoXCRight,
  -                                  KeyValuesXCRight,
  -                                  case SubtreeNoXC == 0 of
  -                                      true ->
  -                                          [];
  -                                      _ ->
  -                                          [combine(lists:nth(SubtreeNoXC, SubtreesXC), lists:nth(1, SubtreesXCRight))] ++ lists:sublist(SubtreesXCRight, 2, SubtreeNoXCRight)
  -                                  end
  -                              }
  -                          ] ++ lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)
  -                  };
  -              _ ->
  -                  case KeyNoXCRight >= SubtreeNoMin of
  -                      % CLRS: case 2b
  -                      true ->
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n CLRS: case 2b ~n", []),
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer KeyValues: ~p~n", [lists:sublist(KeyValues, 1, KeyPos - 1) ++ [lists:nth(1, KeyValuesXCRight)]]),
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer Subtrees Part 1: ~p~n", [lists:sublist(Subtrees, 1, KeyPos)]),
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer Subtrees Part 3: ~p~n", [lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)]),
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner KeyValues: ~p~n", [lists:sublist(KeyValuesXCRight, 2, KeyNoXCRight)]),
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner Subtrees Combine Part 1: ~p~n", [case SubtreeNoXC == 0 of
  -                                                                                                                     true ->
  -                                                                                                                         [];
  -                                                                                                                     _ ->
  -                                                                                                                         lists:nth(SubtreeNoXC, SubtreesXC)
  -                                                                                                                 end]),
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner Subtrees Combine Part 2: ~p~n", [case SubtreeNoXCRight == 0 of
  -                                                                                                                     true ->
  -                                                                                                                         [];
  -                                                                                                                     _ ->
  -                                                                                                                         lists:nth(1, SubtreesXCRight)
  -                                                                                                                 end]),
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner Subtrees Part 3: ~p~n", [case SubtreeNoXCRight == 0 of
  -                                                                                                             true ->
  -                                                                                                                 [];
  -                                                                                                             _ ->
  -                                                                                                                 lists:sublist(SubtreesXCRight, 2, SubtreeNoXCRight)
  -                                                                                                         end]),
  -                          {
  -                              KeyNo,
  -                              SubtreeNo,
  -                                  lists:sublist(KeyValues, 1, KeyPos - 1) ++ [lists:nth(1, KeyValuesXCRight)] ++ lists:sublist(KeyValues, KeyPos + 1, KeyNo),
  -                                  lists:sublist(Subtrees, 1, KeyPos - 1) ++
  -                                  [
  -                                      {
  -                                          KeyNoXC,
  -                                          SubtreeNoXC,
  -                                          KeyValuesXC,
  -                                          case SubtreeNoXC == 0 of
  -                                              true ->
  -                                                  [];
  -                                              _ ->
  -                                                  lists:sublist(SubtreesXC, 1, KeyNoXC) ++ [combine(lists:nth(SubtreeNoXC, SubtreesXC), lists:nth(1, SubtreesXCRight))]
  -                                          end
  -                                      },
  -                                      {
  -                                          KeyNoXCRight - 1, case SubtreeNoXCRight == 0 of
  -                                                                true ->
  -                                                                    0;
  -                                                                _ ->
  -                                                                    SubtreeNoXCRight - 1
  -                                                            end, lists:sublist(KeyValuesXCRight, 2, KeyNoXCRight), case SubtreeNoXCRight == 0 of
  -                                                                                                                       true ->
  -                                                                                                                           [];
  -                                                                                                                       _ ->
  -                                                                                                                           lists:sublist(SubtreesXCRight, 2, SubtreeNoXCRight)
  -                                                                                                                   end
  -                                      }
  -                                  ] ++
  -                                  lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)
  -                          };
  -                      % CLRS: case 2c
  -                      _ ->
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n CLRS: case 2c ~n", []),
  -                          {
  -                              LeftTree,
  -                              RightTree
  -                          } = case SubtreeNoXC == 0 of
  -                                  true ->
  -                                      {
  -                                          {0, 0, [], []},
  -                                          {0, 0, [], []}
  -                                      };
  -                                  _ ->
  -                                      {
  -                                          lists:nth(SubtreeNoXC, SubtreesXC),
  -                                          lists:nth(1, SubtreesXCRight)
  -                                      }
  -                              end,
  -                          ?debugFmt("wwe debugging delete_1_2 ===> ~n LeftTree: ~p~n RightTree: ~p~n", [LeftTree, RightTree]),
  -                          case KeyNo == 1 of
  -                              true ->
  -                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n CLRS: case 2c KeyNo == 1 ~n", []),
  -%%                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New KeyValues: ~p~n", [KeyValuesXC ++ KeyValuesXCRight]),
  -%%                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Subtrees Part 1: ~p~n", [lists:sublist(SubtreesXC, 1, KeyNoXC)]),
  -%%                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Subtrees Part 3: ~p~n", [lists:sublist(SubtreesXCRight, 2, KeyNoXCRight)]),
  -%%                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Subtrees Part x: ~p~n", [lists:sublist(SubtreesXCRight, 1, SubtreeNoXCRight)]),
  -%%                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Subtrees Part y: ~p~n", [lists:sublist(SubtreesXCRight, 2, SubtreeNoXCRight)]),
  -                                  {
  -                                      KeyNoXC + KeyNoXCRight,
  -                                      case SubtreeNoXCRight == 0 of
  -                                          true ->
  -                                              0;
  -                                          _ ->
  -                                              SubtreeNoXC + SubtreeNoXCRight - 1
  -                                      end,
  -                                          KeyValuesXC ++ KeyValuesXCRight,
  -                                      case SubtreeNoXCRight == 0 of
  -                                          true ->
  -                                              [];
  -                                          _ ->
  -                                              lists:sublist(SubtreesXC, 1, KeyNoXC) ++ [combine(LeftTree, RightTree)] ++ lists:sublist(SubtreesXCRight, 2, KeyNoXCRight)
  -                                      end
  -                                  };
  -                              _ ->
  -                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n CLRS: case 2c KeyNo != 1 ~n", []),
  -                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer KeyValues: ~p~n", [lists:sublist(KeyValues, 1, KeyPos - 1) ++ lists:sublist(KeyValues, KeyPos + 1, KeyNo)]),
  -                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer Subtrees Part 1: ~p~n", [lists:sublist(Subtrees, 1, KeyPos - 1)]),
  -                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Outer Subtrees Part 3: ~p~n", [lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)]),
  -                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner KeyValues: ~p~n", [KeyValuesXC ++ KeyValuesXCRight]),
  -                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner Subtrees Part 1: ~p~n", [lists:sublist(SubtreesXC, 1, KeyNoXC)]),
  -                                  ?debugFmt("wwe debugging delete_1_2 ===> ~n New Inner Subtrees Part 3: ~p~n", [lists:sublist(SubtreesXCRight, 1, SubtreeNoXCRight)]),
  -                                  {
  -                                      KeyNo - 1,
  -                                      SubtreeNo - 1,
  -                                          lists:sublist(KeyValues, 1, KeyPos - 1) ++ lists:sublist(KeyValues, KeyPos + 1, KeyNo),
  -                                          lists:sublist(Subtrees, 1, KeyPos - 1) ++
  -                                          [
  -                                              {
  -                                                  KeyNoXC + KeyNoXCRight, case SubtreeNoXCRight == 0 of
  -                                                                              true ->
  -                                                                                  0;
  -                                                                              _ ->
  -                                                                                  SubtreeNoXC + SubtreeNoXCRight - 1
  -                                                                          end, KeyValuesXC ++ KeyValuesXCRight, case SubtreeNoXCRight == 0 of
  -                                                                                                                    true ->
  -                                                                                                                        [];
  -                                                                                                                    _ ->
  -                                                                                                                        lists:sublist(SubtreesXC, 1, KeyNoXC) ++ [combine(LeftTree, RightTree)] ++ lists:sublist(SubtreesXCRight, 2, SubtreeNoXCRight)
  -                                                                                                                end
  -                                              }
  -                                          ] ++ lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)
  -                                  }
  -                          end
  -                  end
  -          end,
  -    ?debugFmt("wwe debugging delete_1_2 ===> Start ~n Out: ~p~n", [Out]),
  -    Out.
  +    case KeyNoXC >= SubtreeNoMin of
  +        true ->
  +            % CLRS: case 2a
  +            {
  +                KeyNo,
  +                SubtreeNo,
  +                    lists:sublist(KeyValues, 1, KeyPos - 1) ++ [lists:nth(KeyNoXC, KeyValuesXC)] ++ lists:sublist(KeyValues, KeyPos + 1, KeyNo),
  +                    lists:sublist(Subtrees, 1, KeyPos - 1) ++
  +                    [
  +                        {
  +                            KeyNoXC - 1, case SubtreeNoXC == 0 of
  +                                             true ->
  +                                                 0;
  +                                             _ ->
  +                                                 SubtreeNoXC - 1
  +                                         end, lists:sublist(KeyValuesXC, 1, KeyNoXC - 1), case SubtreeNoXC == 0 of
  +                                                                                              true ->
  +                                                                                                  [];
  +                                                                                              _ ->
  +                                                                                                  lists:sublist(SubtreesXC, 1, KeyNoXC)
  +                                                                                          end
  +                        },
  +                        {
  +                            KeyNoXCRight,
  +                            SubtreeNoXCRight,
  +                            KeyValuesXCRight,
  +                            case SubtreeNoXC == 0 of
  +                                true ->
  +                                    [];
  +                                _ ->
  +                                    [combine(lists:nth(SubtreeNoXC, SubtreesXC), lists:nth(1, SubtreesXCRight))] ++ lists:sublist(SubtreesXCRight, 2, SubtreeNoXCRight)
  +                            end
  +                        }
  +                    ] ++ lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)
  +            };
  +        _ ->
  +            case KeyNoXCRight >= SubtreeNoMin of
  +                % CLRS: case 2b
  +                true ->
  +                    {
  +                        KeyNo,
  +                        SubtreeNo,
  +                            lists:sublist(KeyValues, 1, KeyPos - 1) ++ [lists:nth(1, KeyValuesXCRight)] ++ lists:sublist(KeyValues, KeyPos + 1, KeyNo),
  +                            lists:sublist(Subtrees, 1, KeyPos - 1) ++
  +                            [
  +                                {
  +                                    KeyNoXC,
  +                                    SubtreeNoXC,
  +                                    KeyValuesXC,
  +                                    case SubtreeNoXC == 0 of
  +                                        true ->
  +                                            [];
  +                                        _ ->
  +                                            lists:sublist(SubtreesXC, 1, KeyNoXC) ++ [combine(lists:nth(SubtreeNoXC, SubtreesXC), lists:nth(1, SubtreesXCRight))]
  +                                    end
  +                                },
  +                                {
  +                                    KeyNoXCRight - 1, case SubtreeNoXCRight == 0 of
  +                                                          true ->
  +                                                              0;
  +                                                          _ ->
  +                                                              SubtreeNoXCRight - 1
  +                                                      end, lists:sublist(KeyValuesXCRight, 2, KeyNoXCRight), case SubtreeNoXCRight == 0 of
  +                                                                                                                 true ->
  +                                                                                                                     [];
  +                                                                                                                 _ ->
  +                                                                                                                     lists:sublist(SubtreesXCRight, 2, SubtreeNoXCRight)
  +                                                                                                             end
  +                                }
  +                            ] ++
  +                            lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)
  +                    };
  +                % CLRS: case 2c
  +                _ ->
  +                    {
  +                        LeftTree,
  +                        RightTree
  +                    } = case SubtreeNoXC == 0 of
  +                            true ->
  +                                {
  +                                    {0, 0, [], []},
  +                                    {0, 0, [], []}
  +                                };
  +                            _ ->
  +                                {
  +                                    lists:nth(SubtreeNoXC, SubtreesXC),
  +                                    lists:nth(1, SubtreesXCRight)
  +                                }
  +                        end,
  +                    case KeyNo == 1 of
  +                        true ->
  +                            {
  +                                KeyNoXC + KeyNoXCRight,
  +                                case SubtreeNoXCRight == 0 of
  +                                    true ->
  +                                        0;
  +                                    _ ->
  +                                        SubtreeNoXC + SubtreeNoXCRight - 1
  +                                end,
  +                                    KeyValuesXC ++ KeyValuesXCRight,
  +                                case SubtreeNoXCRight == 0 of
  +                                    true ->
  +                                        [];
  +                                    _ ->
  +                                        lists:sublist(SubtreesXC, 1, KeyNoXC) ++ [combine(LeftTree, RightTree)] ++ lists:sublist(SubtreesXCRight, 2, KeyNoXCRight)
  +                                end
  +                            };
  +                        _ ->
  +                            {
  +                                KeyNo - 1,
  +                                SubtreeNo - 1,
  +                                    lists:sublist(KeyValues, 1, KeyPos - 1) ++ lists:sublist(KeyValues, KeyPos + 1, KeyNo),
  +                                    lists:sublist(Subtrees, 1, KeyPos - 1) ++
  +                                    [
  +                                        {
  +                                            KeyNoXC + KeyNoXCRight, case SubtreeNoXCRight == 0 of
  +                                                                        true ->
  +                                                                            0;
  +                                                                        _ ->
  +                                                                            SubtreeNoXC + SubtreeNoXCRight - 1
  +                                                                    end, KeyValuesXC ++ KeyValuesXCRight, case SubtreeNoXCRight == 0 of
  +                                                                                                              true ->
  +                                                                                                                  [];
  +                                                                                                              _ ->
  +                                                                                                                  lists:sublist(SubtreesXC, 1, KeyNoXC) ++ [combine(LeftTree, RightTree)] ++ lists:sublist(SubtreesXCRight, 2, SubtreeNoXCRight)
  +                                                                                                          end
  +                                        }
  +                                    ] ++ lists:sublist(Subtrees, KeyPos + 2, SubtreeNo)
  +                            }
  +                    end
  +            end
  +    end.
   
   -spec delete_1_3(key(), tree(), pos_integer(), pos_integer(), pos_integer()) -> tree().
   
   delete_1_3(Key, {KeyNo, SubtreeNo, KeyValues, Subtrees} = _Tree, SubtreeNoMin, KeyNoMax, KeyPos) ->
  -    ?debugFmt("wwe debugging delete_1_3 ===> Start ~n Key: ~p~n Tree: ~p~n KeyPos: ~p~n", [Key, _Tree, KeyPos]),
       {KeyNoXCLeft, SubtreeNoXCLeft, KeyValuesXCLeft, SubtreesXCLeft} = _TreeXCLeft = case KeyPos == 1 of
                                                                                           true ->
                                                                                               {0, 0, [], []};
  
positive.code: 
  % Leaf node.
  insert_1(KeyValue, {KeyNo, 0, KeyValues, []}, _, _) ->
      {KeyNo + 1, 0, insert_key_value(KeyValue, KeyValues, []), []};
  insert_1({Key, _} = KeyValue, {KeyNo, SubtreeNo, KeyValues, Subtrees}, SubtreeNoMin, KeyNoMax) ->
      {ValueFound, SubtreePos} = binary_search(Key, KeyValues, KeyNo, 1, KeyNo),
      case ValueFound of
  
negative.code: %%
  %% %CopyrightBegin%
  %%
  