anchor.diff:      tokenize_literal(Rest, S, []).
       
   tokenize_word([], S, _Quote, Acc) ->
  -    {lists:reverse(Acc), [], S};
  +    {list_to_binary(lists:reverse(Acc)), [], S};
   tokenize_word([Quote | Rest], S, Quote, Acc) ->
  -    {lists:reverse(Acc), Rest, ?INC_COL(S)};
  +    {list_to_binary(lists:reverse(Acc)), Rest, ?INC_COL(S)};
   tokenize_word([$& | Rest], S, Quote, Acc) ->
       {{data, Data, false}, S1, Rest1} = tokenize_charref(Rest, ?INC_COL(S), []),
  -    tokenize_word(Rest1, S1, Quote, lists:reverse(Data, Acc));
  +    tokenize_word(Rest1, S1, Quote, lists:reverse(binary_to_list(Data), Acc));
   tokenize_word([C | Rest], S, Quote, Acc) ->
       tokenize_word(Rest, ?INC_CHAR(S, C), Quote, [C | Acc]).
   
   tokenize_literal([], S, Acc) ->
  -    {lists:reverse(Acc), [], S};
  +    {list_to_binary(lists:reverse(Acc)), [], S};
   tokenize_literal(Rest=">" ++ _, S, Acc) ->
  -    {lists:reverse(Acc), Rest, S};
  +    {list_to_binary(lists:reverse(Acc)), Rest, S};
   tokenize_literal([$& | Rest], S, Acc) ->
       {{data, Data, false}, S1, Rest1} = tokenize_charref(Rest, ?INC_COL(S), []),
  -    tokenize_literal(Rest1, S1, lists:reverse(Data, Acc));
  +    tokenize_literal(Rest1, S1, lists:reverse(binary_to_list(Data), Acc));
   tokenize_literal(Rest=[C | _], S, Acc) when ?IS_WHITESPACE(C)
                                               orelse C =:= $/
                                               orelse C =:= $= ->
  -    {lists:reverse(Acc), Rest, S};
  +    {list_to_binary(lists:reverse(Acc)), Rest, S};
   tokenize_literal([C | Rest], S, Acc) ->
       tokenize_literal(Rest, ?INC_COL(S), [C | Acc]).
   
   tokenize_cdata([], S, Acc) ->
  -    {{data, lists:reverse(Acc), false}, [], S};
  +    {{data, list_to_binary(lists:reverse(Acc)), false}, [], S};
   tokenize_cdata("]]>" ++ Rest, S, Acc) ->
  -    {{data, lists:reverse(Acc), false}, Rest, ?ADV_COL(S, 3)};
  +    {{data, list_to_binary(lists:reverse(Acc)), false}, Rest, ?ADV_COL(S, 3)};
   tokenize_cdata([C | Rest], S, Acc) ->
       tokenize_cdata(Rest, ?INC_CHAR(S, C), [C | Acc]).
   
   tokenize_comment([], S, Acc) ->
  -    {{comment, lists:reverse(Acc)}, [], S};
  +    {{comment, list_to_binary(lists:reverse(Acc))}, [], S};
   tokenize_comment("-->" ++ Rest, S, Acc) ->
  -    {{comment, lists:reverse(Acc)}, Rest, ?ADV_COL(S, 3)};
  +    {{comment, list_to_binary(lists:reverse(Acc))}, Rest, ?ADV_COL(S, 3)};
   tokenize_comment([C | Rest], S, Acc) ->
       tokenize_comment(Rest, ?INC_CHAR(S, C), [C | Acc]).
  
positive.code:     end.
  
  norm({Tag, Attrs}) ->
      {norm(Tag), [{norm(K), V} || {K, V} <- Attrs], []};
  norm(Tag) ->
      string:to_lower(Tag).
  
  test_destack() ->
      {"a", [], []} = destack([{"a", [], []}]),
      {"a", [], [{"b", [], []}]} = destack([{"b", [], []}, {"a", [], []}]),
      {"a", [], [{"b", [], [{"c", [], []}]}]} =
          destack([{"c", [], []}, {"b", [], []}, {"a", [], []}]),
      [{"a", [], [{"b", [], [{"c", [], []}]}]}] =
          destack("b", [{"c", [], []}, {"b", [], []}, {"a", [], []}]),
      [{"b", [], [{"c", [], []}]}, {"a", [], []}] =
          destack("c", [{"c", [], []}, {"b", [], []}, {"a", [], []}]),
      ok.
  
  stack(T1={"li", _, _}, Stack=[{TN="li", _, _} | _Rest]) ->
      [T1 | destack(TN, Stack)];
  stack(T1={"dt", _, _}, Stack=[{TN="dd", _, _} | _Rest]) ->
      [T1 | destack(TN, Stack)];
  stack(T1={"dt", _, _}, Stack=[{TN="dt", _, _} | _Rest]) ->
      [T1 | destack(TN, Stack)];
  stack(T1={"dd", _, _}, Stack=[{TN="dt", _, _} | _Rest]) ->
      [T1 | destack(TN, Stack)];
  stack(T1={"dd", _, _}, Stack=[{TN="dd", _, _} | _Rest]) ->
      [T1 | destack(TN, Stack)];
  stack(T1={"option", _, _}, Stack=[{TN="option", _, _} | _Rest]) ->
      [T1 | destack(TN, Stack)];
  stack(T1, Stack) ->
      [T1 | Stack].
  
  
negative.code:     escape(Rest, [C | Acc]).
  
  escape_attr([], Acc) ->
      list_to_binary(lists:reverse(Acc));
  escape_attr("<" ++ Rest, Acc) ->
      escape_attr(Rest, lists:reverse("&lt;", Acc));
  escape_attr(">" ++ Rest, Acc) ->
  