anchor.diff:                                            precommit = Precommit,
                                             postcommit = Postcommit,
                                             req_id = ReqId,
  -                                          timeout = Timeout},
  +                                          timeout = Timeout,
  +                                          robj = riak_object:apply_updates(RObj)},
               Options = flatten_options(proplists:unfold(Options0 ++ ?DEFAULT_OPTS), []),
               StateData2 = handle_options(Options, StateData1),
  -            StateData = find_fail_threshold(StateData2), 
  -            new_state_timeout(execute, StateData)
  -    end.
  -
  -%% @private
  -execute(timeout, StateData0=#state{robj=RObj0, req_id = ReqId,
  -                                   update_last_modified=UpdateLastMod,
  +            StateData = find_fail_threshold(StateData2),
  +            case Precommit of
  +                [] -> % Nothing to run, spare the timing code
  +                    new_state_timeout(execute, StateData);
  +                _ ->
  +                    new_state_timeout(precommit, StateData)
  +            end
  +    end.
  +
  +%% Run the precommit hooks
  +precommit(timeout, State = #state{precommit = []}) ->
  +    new_state_timeout(execute, State);
  +precommit(timeout, State = #state{precommit = [Hook | Rest], robj = RObj}) ->
  +    Result = decode_precommit(invoke_hook(Hook, RObj)),
  +    case Result of
  +        Result when element(1, Result) == r_object ->
  +            {next_state, precommit, State#state{robj = riak_object:apply_updates(Result),
  +                                                precommit = Rest}, 0};
  +        fail ->
  +            process_reply({error, precommit_fail}, State);
  +        {fail, Reason} ->
  +            process_reply({error, {precommit_fail, Reason}}, State)
  +    end.
  +
  +%% @private
  +execute(timeout, StateData0=#state{robj=RObj, req_id = ReqId,
                                      timeout=Timeout, preflist2 = Preflist2, bkey=BKey,
                                      vnode_options=VnodeOptions,
  -                                   starttime = StartTime,
  -                                   precommit = Precommit}) ->
  -    case invoke_precommit(Precommit, update_last_modified(UpdateLastMod, RObj0)) of
  -        fail ->
  -            process_reply({error, precommit_fail}, StateData0);
  -        {fail, Reason} ->
  -            process_reply({error, {precommit_fail, Reason}}, StateData0);
  -        RObj1 ->
  -            TRef = schedule_timeout(Timeout),
  -            Preflist = [IndexNode || {IndexNode, _Type} <- Preflist2],
  -            riak_kv_vnode:put(Preflist, BKey, RObj1, ReqId, StartTime, VnodeOptions),
  -            StateData = StateData0#state{
  -                          robj=RObj1,
  -                          replied_w=[], replied_dw=[], replied_fail=[],
  -                          tref=TRef},
  -            case enough_results(StateData) of
  -                {reply, Reply, StateData1} ->
  -                    process_reply(Reply, StateData1);
  -                {false, StateData} ->
  -                    new_state(waiting_vnode, StateData)
  -            end
  +                                   starttime = StartTime}) ->
  +    TRef = schedule_timeout(Timeout),
  +    Preflist = [IndexNode || {IndexNode, _Type} <- Preflist2],
  +    riak_kv_vnode:put(Preflist, BKey, RObj, ReqId, StartTime, VnodeOptions),
  +    StateData = StateData0#state{
  +                  replied_w=[], replied_dw=[], replied_fail=[],
  +                  tref=TRef},
  +    case enough_results(StateData) of
  +        {reply, Reply, StateData1} ->
  +            process_reply(Reply, StateData1);
  +        {false, StateData} ->
  +            new_state(waiting_vnode, StateData)
       end.
   
   %% @private
  
positive.code: %% @private
  handle_options([], State) ->
      State;
  handle_options([{update_last_modified, Value}|T], State) ->
      handle_options(T, State#state{update_last_modified=Value});
  handle_options([{returnbody, true}|T], State) ->
      VnodeOpts = [{returnbody, true} | State#state.vnode_options],
      %% Force DW>0 if requesting return body to ensure the dw event 
  
negative.code: make_vtag(RObj) ->
      <<HashAsNum:128/integer>> = crypto:md5(term_to_binary(riak_object:vclock(RObj))),
      riak_core_util:integer_to_list(HashAsNum,62).
  
  %% Invokes the hook and returns a tuple of
  %% {Lang, Called, Result}
  