anchor.diff:      {Match, Diff} = lists:partition(Fun, RRs),
       NewMatch = [ RR#dnsxd_couch_rr{expire = Now - 1} || RR <- Match ],
       NewRRs = NewMatch ++ Diff,
  -    update_rr(Key, Private, Updates, NewRRs);
  -update_rr(Key, Private, [{add, Name, Type, TTL, Data, LeaseLength}|Updates],
  -	  RRs) ->
  +    update_rr(Key, Updates, NewRRs);
  +update_rr(Key, [{add, Name, Type, TTL, Data, LeaseLength}|Updates], RRs) ->
       Fun = fun(#dnsxd_couch_rr{name = SN, type = ST, data = SD}) ->
   		  (dns:dname_to_lower(SN) =:= Name
   		   andalso Type =:= ST andalso SD =:= Data)
  
positive.code: 				   end, RRs),
      case check_update_prereqs(PreReqs, MutableRRs) of
  	ok ->
  	    NewMutableRRs = update_rr(Key, true, Updates, MutableRRs),
  	    NewImmutableRRs = reap(Now, TombstonePeriod, ImmutableRRs),
  	    NewRRs = lists:sort(NewMutableRRs ++ NewImmutableRRs),
  	    NewZone = Zone#dnsxd_couch_zone{rr = NewRRs},
  
negative.code:     if Exists -> yxrrset;
         true -> check_update_prereqs(PreReqs, RRs) end.
  
  update_rr(_Key, [], RRs) -> RRs;
  update_rr(Key, [{delete, Name}|Updates], RRs) ->
      Now = dns:unix_time(),
      {Match, Diff} = lists:partition(
  		      fun(#dnsxd_couch_rr{name = SN}) ->
  			      dns:dname_to_lower(SN) =:= Name end, RRs),
      NewMatch = [ RR#dnsxd_couch_rr{expire = Now - 1} || RR <- Match ],
      NewRRs = NewMatch ++ Diff,
      update_rr(Key, Updates, NewRRs);
  update_rr(Key, [{delete, Name, Type}|Updates], RRs) ->
      Now = dns:unix_time(),
      Fun = fun(#dnsxd_couch_rr{name = SN, type = ST}) ->
  		  dns:dname_to_lower(SN) =:= Name andalso ST =:= Type
  