anchor.diff:      %% same as notfound
       Diffs = jiak_object:diff(undefined, NewObj),
       {Diffs, Context#ctx{diffs=Diffs}};
  -diff_objects(ReqData, Context=#ctx{incoming=NewObj0, bucket=Bucket}) ->
  +diff_objects(ReqData, Context=#ctx{incoming=NewObj0, module=Mod}) ->
       case retrieve_object(ReqData, Context) of
   	{notfound, NewContext} ->
   	    Diffs = jiak_object:diff(undefined, NewObj0),
   	    {Diffs, NewContext#ctx{diffs=Diffs}};
   	{ok, {JiakObject, NewContext}} ->
  -	    NewObj = copy_unreadable_props(Bucket, JiakObject, NewObj0),
  +	    NewObj = copy_unreadable_props(Mod,JiakObject, NewObj0),
   	    Diffs = jiak_object:diff(JiakObject, NewObj),
   	    {Diffs, NewContext#ctx{diffs=Diffs, storedobj=NewObj, 
   				   incoming=NewObj}}
       end.
   
  -%% @spec apply_read_mask(jiak_object()) -> jiak_object()
  +%% @spec apply_read_mask(jiak_module(), jiak_object()) -> jiak_object()
   %% @doc Remove fields from the jiak object that are not in the
   %%      bucket's read maks.
  -apply_read_mask(JiakObject={struct,_}) ->
  -    Module = jiak_object:bucket(JiakObject),
  +apply_read_mask(Module, JiakObject={struct,_}) ->
       {struct, OldData} = jiak_object:object(JiakObject),
       NewData = apply_read_mask1(OldData, Module:read_mask(), []),
       jiak_object:set_object(JiakObject, {struct, NewData}).
  
positive.code:     {{halt, 404},
       wrq:append_to_response_body("Unknown bucket.", ReqData),
       Context};
  is_authorized(ReqData, Context=#ctx{key=Key,bucket=Bucket,jiak_context=JC}) ->
      {Result, RD1, JC1} = Bucket:auth_ok(Key, ReqData, JC),
      {Result, RD1, Context#ctx{jiak_context=JC1}}.
  
  %% @spec forbidden(webmachine:wrq(), context()) ->
  
negative.code: %%      since the client can't know the values of fields not in the
  %%      read mask, it can't preserve their values, so we have to do it
  %%      for them.
  copy_unreadable_props(Mod, OldObj, NewObj) ->
      Allowed = Mod:allowed_fields(),
      ReadMask = Mod:read_mask(),
      Unreadable = sets:to_list(sets:subtract(
  				sets:from_list(Allowed),
  				sets:from_list(ReadMask))),
  