anchor.diff:  
       autotest:mark(?LINE, "prepend/3 - 2"),
       %% check result
  -    #keylist{list=[
  -		   #keyelem{key="other", name="Other", item=["foo"]},
  -		   #keyelem{key="header", name="Header", item=["one"]}
  -		  ]} = PrependH1,
  +    [{"header", "Header", ["one"]},
  +     {"other", "Other", ["foo"]}
  +    ] = test_to_list(PrependH1),
   
       autotest:mark(?LINE, "prepend/3 - 3"),
       PrependH2 = prepend({"header", ["zero"]}, PrependH1),
   
       autotest:mark(?LINE, "prepend/3 - 4"),
       %% check result
  -    #keylist{list=[
  -		   #keyelem{key="other", name="Other", item=["foo"]},
  -		   #keyelem{key="header", name="Header", item=["zero", "one"]}
  -		  ]} = PrependH2,
  -
  -    %% delete/2
  +    [{"header", "Header", ["zero", "one"]},
  +     {"other", "Other", ["foo"]}
  +    ] = test_to_list(PrependH2),
  +
  +
  +    %% delete(Name, Keylist)
       %%--------------------------------------------------------------------
       autotest:mark(?LINE, "delete/2 - 1"),
       %% add Via to PrependH2 so that we have one header with an atom key
  
positive.code: normalize2(In) when is_list(In) ->	In.
  
  %%--------------------------------------------------------------------
  %% @spec    (Names) -> [string()]
  %%
  %%            Names = [string()]                                                                    |
  %%                    atom() "the name of a header in a sip message, or our internal variant of it"
  %%
  %% @doc     convert header key, to a standard format - lowercase and
  %%          verbose string()
  %% @end
  %%--------------------------------------------------------------------
  normalize_list(Names) ->
      lists:map(fun(Key) ->
  		      normalize(Key)
  	      end, Names).
  
  %%--------------------------------------------------------------------
  %% @spec    (Name, Func, List) -> #keylist{}
  %%
  %%            Name = string() "the name of a header in a sip message"
  %%            Func = fun()
  %%            List = #keylist{}
  %%
  %% @doc     apply Func to all elements E; E#keyelem{item =
  %%          F(E#keyelem.item)} - in List, where E#keyelem.key ==
  %%          normalize(Key) A new #keyelem{key=normalize(Key),
  %%          name=Name, item=Func([])} is added if Key isn't found
  %% @end
  %%--------------------------------------------------------------------
  mod(Name, Func, List) when is_atom(Name); is_list(Name), is_record(List, keylist) ->
      Key = normalize(Name),
      #keylist{list=modcase(Key, Name, Func, List#keylist.list)}.
  
  modcase(Key, Name, Func, []) ->
      %% No more input - add a new element
      [#keyelem{key=Key,
  	      name=Name,
  	      item=Func([])}];
  modcase(Key, _Name, Func, [#keyelem{key=Key}=Elem | List]) ->
      %% Match, process item using Func
      [Elem#keyelem{item=Func(Elem#keyelem.item)} | List];
  modcase(Key, Name, Func, [Elem | List]) when is_record(Elem, keyelem) ->
      %% No match
      [Elem | modcase(Key, Name, Func, List)].
  
negative.code:     %% test short format
      from = normalize("f"),
  
      autotest:mark(?LINE, "normalize/1 - 8.1"),
      %% test short format - we test all of them to 'double check' the
      %% result when new ones are added
      Normalize_L1 = [normalize([Normalize_Char]) || Normalize_Char <- lists:seq($a, $z)],
      ["a", "b", "contact-type", "d", "content-encoding", 'from', "g", "h",
       'call-id', "j", 'supported', 'content-length', 'contact', "n", 'event',
       "p", "q", "refer-to", "subject", 'to', 'allow-events', 'via', "w", "x",
       "y", "z"] = Normalize_L1,
  
      %% from_list(List)
      %%--------------------------------------------------------------------
      autotest:mark(?LINE, "from_list/1 - 1"),
      %% empty list
      #keylist{list=[]} = from_list([]),
  
      autotest:mark(?LINE, "from_list/1 - 2.1"),
      %% list() of {Key, Name, Value} tuples
      H1 = from_list([{via,    "Via",  ["one", "two", "three"]},
  		    {"test", "Test", ["foo", "bar", "baz"]}
  		   ]),
  
      autotest:mark(?LINE, "from_list/1 - 2.2"),
      %% check result
      [{"test", "Test", ["foo", "bar", "baz"]},
       {via, "Via", ["one", "two", "three"]}
      ] = test_to_list(H1),
  
      autotest:mark(?LINE, "from_list/1 - 3.1"),
      %% list() of {Name, Value} tuples
      H2 = from_list([{"ATOM", ["hi"]}]),
  
      autotest:mark(?LINE, "from_list/1 - 3.2"),
      %% check result
      [{"atom", "ATOM", ["hi"]}
      ] = test_to_list(H2),
  
      autotest:mark(?LINE, "from_list/1 - 4.1"),
      %% trickier list of tuples
      FromList_L4 = from_list([{"ATOM", ["hi"]},
  			     {"AtOm", ["low"]},
  			     {"Via",  ["first-via"]},
  			     {'via', "via", ["second-via"]}
  			    ]),
  
      autotest:mark(?LINE, "from_list/1 - 4.2"),
      %% check result
      [{"atom", "ATOM", ["hi", "low"]},
       {'via', "Via", ["first-via","second-via"]}
      ] = test_to_list(FromList_L4),
      
  
      %% fetch(Key, Keylist)
      %%--------------------------------------------------------------------
      autotest:mark(?LINE, "fetch/2 - 1"),
      %% fetch using name, will match key after normalize()
  