anchor.diff:  clean_prepared(_PreparedTx, [], _TxId) ->
       ok;
   clean_prepared(PreparedTx, [{Key, _Type, {_Op, _Actor}} | Rest], TxId) ->
  -    ActiveTxs = case ets:lookup(PreparedTx, {prepare, Key}) of
  +    ActiveTxs = case ets:lookup(PreparedTx, Key) of
                       [] ->
                           [];
  -                    [{{prepare, Key}, List}] ->
  +                    [{Key, List}] ->
                           List
                   end,
       NewActive = lists:keydelete(TxId, 1, ActiveTxs),
       true = case NewActive of
                  [] ->
  -                   ets:delete(PreparedTx, {prepare, Key});
  +                   ets:delete(PreparedTx, Key);
                  _ ->
  -                   ets:insert(PreparedTx, {{prepare, Key}, NewActive})
  +                   ets:insert(PreparedTx, {Key, NewActive})
              end,
       clean_prepared(PreparedTx, Rest, TxId).
   
  
positive.code:     ok;
  reset_prepared(PreparedTx, [{Key, _Type, {_Op, _Actor}} | Rest], TxId, Time, ActiveTxs) ->
      %% Could do this more efficiently in case of multiple updates to the same key
      true = ets:insert(PreparedTx, {{prepare, Key}, [{TxId, Time} | dict:fetch(Key, ActiveTxs)]}),
      reset_prepared(PreparedTx, Rest, TxId, Time, ActiveTxs).
  
  commit(Transaction, TxCommitTime, Updates, CommittedTx, State) ->
  
negative.code: set_prepared(_PreparedTx, [], _TxId, _Time, Acc) ->
      Acc;
  set_prepared(PreparedTx, [{Key, _Type, {_Op, _Actor}} | Rest], TxId, Time, Acc) ->
      ActiveTxs = case ets:lookup(PreparedTx, Key) of
                      [] ->
                          [];
                      [{Key, List}] ->
                          List
                  end,
      case lists:keymember(TxId, 1, ActiveTxs) of
          true ->
              set_prepared(PreparedTx, Rest, TxId, Time, Acc);
          false ->
              true = ets:insert(PreparedTx, {Key, [{TxId, Time} | ActiveTxs]}),
              set_prepared(PreparedTx, Rest, TxId, Time, dict:append_list(Key, ActiveTxs, Acc))
      end.
  
  