anchor.diff:          StartSeq,
           fun changes_enumerator/2,
           [{dir, Dir}],
  -        {Db, StartSeq, Prepend, FilterFun, Callback, UserAcc, ResponseType,
  -            Limit, IncludeDocs, Conflicts}
  +        #changes_acc{
  +            db = Db,
  +            seq = StartSeq,
  +            prepend = Prepend,
  +            filter = FilterFun,
  +            callback = Callback,
  +            user_acc = UserAcc,
  +            resp_type = ResponseType,
  +            limit = Limit,
  +            include_docs = IncludeDocs,
  +            conflicts = Conflicts
  +        }
       ).
   
   keep_sending_changes(Args, Callback, UserAcc, Db, StartSeq, Prepend, Timeout,
  
positive.code:         fun(CallbackAcc) ->
              {Callback, UserAcc} = get_callback_acc(CallbackAcc),
              UserAcc2 = start_sending_changes(Callback, UserAcc, Feed),
              {ok, {_, LastSeq, _Prepend, _, _, UserAcc3, _, _, _, _}} =
                  send_changes(
                      Args#changes_args{feed="normal"},
                      Callback,
  
negative.code: end_sending_changes(Callback, UserAcc, EndSeq, ResponseType) ->
      Callback({stop, EndSeq}, ResponseType, UserAcc).
  
  changes_enumerator(DocInfo, #changes_acc{resp_type = "continuous"} = Acc) ->
      #changes_acc{
          filter = FilterFun, callback = Callback,
          user_acc = UserAcc, limit = Limit
      } = Acc,
      #doc_info{high_seq = Seq} = DocInfo,
      Results0 = FilterFun(DocInfo),
      Results = [Result || Result <- Results0, Result /= null],
      Go = if Limit =< 1 -> stop; true -> ok end,
      case Results of
      [] ->
          {Go, Acc#changes_acc{seq = Seq}};
      _ ->
          ChangesRow = changes_row(Results, DocInfo, Acc),
          UserAcc2 = Callback({change, ChangesRow, <<>>}, "continuous", UserAcc),
          {Go, Acc#changes_acc{seq = Seq, user_acc = UserAcc2, limit = Limit - 1}}
      end;
  changes_enumerator(DocInfo, Acc) ->
      #changes_acc{
          filter = FilterFun, callback = Callback, prepend = Prepend,
          user_acc = UserAcc, limit = Limit, resp_type = ResponseType
      } = Acc,
      #doc_info{high_seq = Seq} = DocInfo,
      Results0 = FilterFun(DocInfo),
      Results = [Result || Result <- Results0, Result /= null],
      Go = if (Limit =< 1) andalso Results =/= [] -> stop; true -> ok end,
      case Results of
      [] ->
          {Go, Acc#changes_acc{seq = Seq}};
      _ ->
          ChangesRow = changes_row(Results, DocInfo, Acc),
          UserAcc2 = Callback({change, ChangesRow, Prepend}, ResponseType, UserAcc),
          {Go, Acc#changes_acc{
              seq = Seq, prepend = <<",\n">>,
              user_acc = UserAcc2, limit = Limit - 1}}
      end.
  
  
  changes_row(Results, DocInfo, Acc) ->
      #doc_info{
          id = Id, high_seq = Seq, revs = [#rev_info{deleted = Del} | _]
      } = DocInfo,
      #changes_acc{db = Db, include_docs = IncDoc, conflicts = Conflicts} = Acc,
      {[{<<"seq">>, Seq}, {<<"id">>, Id}, {<<"changes">>, Results}] ++
          deleted_item(Del) ++ case IncDoc of
              true ->
                  Options = if Conflicts -> [conflicts]; true -> [] end,
                  couch_httpd_view:doc_member(Db, DocInfo, Options);
  