anchor.diff:  %%
   
   %% @private
  -connect(_Frame, State = #s{session = undefined}) ->
  +connect(_Frame, State) ->
       Session = riak_core_util:unique_id_62(),
       Headers = [{"session", Session},
                  ?SERVER_HEADER,
                  ?VERSION_HEADER],
  -    send_frame("CONNECTED", Headers, "", State#s{session = Session});
  -connect(_Frame, State) ->
  -    send_error(already_connected, State).
  +    send_frame("CONNECTED", Headers, "", State#s{session = Session}).
   
   %% @private
   send(Frame = #stomp_frame{command = _Cmd, headers = _Headers, body = _Body},
        State) ->
       %% Check destination header exists
  -    case restomp:header(Frame, "destination") of
  -        {ok, Dest} ->
  +    case with_headers(["destination"], Frame, State) of
  +        {ok, [Dest]} ->
               case split_destination(Dest) of
                   {topic, _Topic}  -> {noreply, State};
                   _Other           -> send_error(invalid_destination, State)
               end;
  -        not_found ->
  -            send_error(no_destination, State)
  +        Error ->
  +            Error
       end.
   
   %% @private
   subscribe(Frame, State) ->
  -    case ensure_headers(["ack", "id", "destination"], Frame) of
  +    case with_headers(["ack", "id", "destination"], Frame, State) of
           {ok, ["client", _Id, Dest]} ->
               case split_destination(Dest) of
                   {queue, _Topic, _Queue} -> {noreply, State};
  
positive.code: %%
  
  %% @private
  ensure_headers(Headers, Frame) -> ensure_headers(Headers, Frame, []).
  
  %% @private
  ensure_headers([], _Frame, Acc) ->
      {ok, lists:reverse(Acc)};
  ensure_headers([H|T], Frame, Acc) ->
      case restomp:header(Frame, H) of
          {ok, Value} -> ensure_headers(T, Frame, [Value|Acc]);
          not_found   -> {error, missing_header, "Missing header: " ++ H}
      end.
  
  %% @private
  
negative.code: 
  -spec handle_cast(stop | _, #s{}) -> {stop, normal, #s{}}.
  %% @hidden
  handle_cast(Frame = #stomp_frame{command = Cmd}, State = #s{session = Session})
    when Cmd =:= "STOMP" orelse Cmd =:= "CONNECT" ->
      case Session of
          undefined -> connect(Frame, State);
          _Session  -> send_error(already_connected, State)
      end;
  handle_cast(#stomp_frame{}, State = #s{session = undefined}) ->
      send_error(not_connected, State);
  handle_cast(Frame = #stomp_frame{command = Cmd}, State) ->
      case Cmd of
          "SEND"        -> send(Frame, State);
          "SUBSCRIBE"   -> subscribe(Frame, State);
          "UNSUBSCRIBE" -> unsubscribe(Frame, State);
  