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: 
  -spec handle_cast(stop | _, #s{}) -> {stop, normal, #s{}}.
  %% @hidden
  handle_cast(Frame = #stomp_frame{command = Cmd}, State) ->
      case Cmd of
          "STOMP"       -> connect(Frame, State);
          "CONNECT"     -> connect(Frame, State);
          "SEND"        -> send(Frame, State);
          "SUBSCRIBE"   -> subscribe(Frame, State);
          "UNSUBSCRIBE" -> unsubscribe(Frame, State);
  
negative.code: send_error(Msg, State) -> send_error(Msg, [], State).
  
  %% @private
  send_error(Msg, Body, State) ->
      Headers = [{"message", atom_to_list(Msg)},
                 ?CONTENT_TEXT,
                 ?VERSION_HEADER],
      case send_frame("ERROR", Headers, [Body], State) of
          {noreply, NewState} -> {stop, Msg, NewState};
          Error               -> Error
      end.
  
  %% @private
  send_frame(Cmd, Headers, Body, State) ->
      send_frame(#stomp_frame{command = Cmd, headers = Headers, body = Body},
                 State).
  
  -spec send_frame(restomp:frame(), inet:socket()) -> #s{}.
  %% @private
  