anchor.diff:  
   rest_init(Req, _State) ->
       PoolMember = pooler:take_member(riak_pool),
  -    {ok, Req, PoolMember}.
  -
  -content_types_accepted(Req, Pid) ->
  +    {ok, Req, {PoolMember, []}}.
  +
  +content_types_accepted(Req, State) ->
       {[{{<<"application">>, <<"cdmi-capability">>, '*'}, from_cdmi_capability},
         {{<<"application">>, <<"cdmi-container">>, '*'}, from_cdmi_container},
         {{<<"application">>, <<"cdmi-object">>, '*'}, from_cdmi_object}
  -     ], Req, Pid}.
  -
  -content_types_provided(Req, Pid) ->
  +     ], Req, State}.
  +
  +content_types_provided(Req, State) ->
       {[{{<<"application">>, <<"cdmi-capability">>, '*'}, to_cdmi_capability},
         {{<<"application">>, <<"cdmi-container">>, '*'}, to_cdmi_container},
  +      {{<<"application">>, <<"cdmi-domain">>, '*'}, to_cdmi_domain},
         {{<<"application">>, <<"cdmi-object">>, '*'}, to_cdmi_object}
  -     ], Req, Pid}.
  -
  -forbidden(Req, Pid) ->
  +     ], Req, State}.
  +
  +forbidden(Req, State) ->
   %% TODO: Check ACLs here
  -    {false, Req, Pid}.
  -%%    {true, Req, Pid}.
  -    
  -from_cdmi_capability(Req, Pid) ->
  +    {false, Req, State}.
  +%%    {true, Req, State}.
  +    
  +from_cdmi_capability(Req, State) ->
  +    {Pid, _Opts} = State,
       lager:debug("from_cdmi_capability...~p", [Pid]),
       {Path, _} = cowboy_req:path_info(Req),
  -%%    Uri = string:substr(binary_to_list(Path), 6),
       lager:debug("URI: ~p", [Path]),
       {ok, Body, Req2} = cowboy_req:body(Req),
       lager:debug("Body: ~p", [Body]),
       pooler:return_member(riak_pool, Pid),
  -    {<<"{\"jsondoc\": \"number1\"}">>, Req2, Pid}.
  -
  -from_cdmi_container(Req, Pid) ->
  +    {<<"{\"jsondoc\": \"number1\"}">>, Req2, State}.
  +
  +from_cdmi_container(Req, State) ->
  +    {Pid, _Opts} = State,
       lager:debug("from_cdmi_container...~p", [Pid]),
       {Path, _} = cowboy_req:path_info(Req),
  -%%    Uri = string:substr(binary_to_list(Path), 6),
       lager:debug("URI: ~p", [Path]),
       {ok, Body, Req2} = cowboy_req:body(Req),
       lager:debug("Body: ~p", [Body]),
       pooler:return_member(riak_pool, Pid),
  -    {<<"{\"jsondoc\": \"number1\"}">>, Req2, Pid}.
  -
  -from_cdmi_object(Req, Pid) ->
  +    {<<"{\"jsondoc\": \"number1\"}">>, Req2, State}.
  +
  +from_cdmi_domain(Req, State) ->
  +    {<<"{\"jsondoc\": \"domain\"}">>, Req, State}.
  +
  +from_cdmi_object(Req, State) ->
  +    {Pid, _Opts} = State,
       lager:debug("from_cdmi_object...~p", [Pid]),
       {Path, _} = cowboy_req:path(Req),
   %%    Uri = string:substr(binary_to_list(Path), 6),
  
positive.code:          content_types_provided/2,
           from_cdmi_capability/2,
           from_cdmi_container/2,
           from_cdmi_object/2,
           forbidden/2,
           is_authorized/2,
           malformed_request/2,
           resource_exists/2,
           rest_init/2,
           service_available/2,
           to_cdmi_capability/2,
           to_cdmi_container/2,
           to_cdmi_object/2]).
  
  init(_, _Req, _Opts) ->
  
negative.code: %%    Json = nebula2_riak:get(Pid, Uri),
  %%    lager:debug("Got Json: ~p", [Json]),
      pooler:return_member(riak_pool, Pid),
      {<<"{\"jsondoc\": \"number1\"}">>, Req, State}.
  
  is_authorized(Req, State) ->
  %% TODO: Check credentials here
      {true, Req, State}.
  %%    {{false, "You suck!!!"}, Req, State}.
  
  %% Malformed request.
  %% There must be an X-CDMI-Specification-Version header, and it
  %% must request version 1.1
  malformed_request(Req, State) ->
      CDMIVersion = cowboy_req:header(<<?VERSION_HEADER>>, Req, error),
      Valid = case CDMIVersion of
          {error, _} ->
  