anchor.diff:  
   %% @private
   ack(Frame, State) ->
  -    Fun = fun(H) -> restomp:header(Frame, H) end,
  -    case {Fun("message-id"), Fun("subscription")} of
  -        {{ok, _Id}, {ok, _Sub}} ->
  +    case ensure_headers(["message-id", "subscription"], Frame) of
  +        {ok, [_Id, _Sub]} ->
               {noreply, State};
  -        {not_found, _Sub} ->
  -            send_error(no_message_id, State);
  -        {_Id, not_found} ->
  -            send_error(no_subscription, State)
  +        {error, Msg, Detail} ->
  +            send_error(Msg, Detail, State)
       end.
   
   %% @private
   nack(Frame, State) ->
  -    Fun = fun(H) -> restomp:header(Frame, H) end,
  -    case {Fun("message-id"), Fun("subscription")} of
  -        {{ok, _Id}, {ok, _Sub}} ->
  +    case ensure_headers(["message-id", "subscription"], Frame) of
  +        {ok, [_Id, _Sub]} ->
               {noreply, State};
  -        {not_found, _Sub} ->
  -            send_error(no_message_id, State);
  -        {_Id, not_found} ->
  -            send_error(no_subscription, State)
  +        {error, Msg, Detail} ->
  +            send_error(Msg, Detail, State)
       end.
   
   %% @private
  
positive.code: %%
  
  %% @private
  send_error(Message, State) ->
      Headers = [{"message", atom_to_list(Message)},
                 ?CONTENT_TEXT,
                 ?VERSION_HEADER],
      case send_frame("ERROR", Headers, [], State) of
          {noreply, NewState} -> {stop, Message, NewState};
          Error               -> Error
      end.
  
  %% @private
  send_frame(Command, Headers, Body, State) ->
      send_frame(#stomp_frame{command = Command, headers = Headers, body = Body}, State).
  
  -spec send_frame(restomp:frame(), inet:socket()) -> #s{}.
  %% @private
  
negative.code: 
  %% @private
  subscribe(Frame, State) ->
      case ensure_headers(["ack", "id", "destination"], Frame) of
          {ok, ["client", _Id, Dest]} ->
              case split_destination(Dest) of
                  {queue, _Topic, _Queue} -> {noreply, State};
                  _Other                  -> send_error(invalid_destination, State)
              end;
          {ok, [_Ack, _Id, _Dest]} ->
              send_error(must_set_ack_client, State);
          {error, Msg, Detail} ->
              send_error(Msg, Detail, State)
      end.
  
  %% @private
  