anchor.diff:                       State1#state{organization_guid = OrgId, couchbeam = S}};
                   {no_authn, Reason} ->
                       Msg = bad_auth_message(Reason),
  -                    Json = mochijson2:encode(Msg),
  +                    Json = ejson:encode(Msg),
                       Req1 = wrq:set_resp_body(Json, Req),
                       % TODO This is a needless mutation
                       {false, Req1, State1#state{couchbeam = S}}
  
positive.code:         not_found ->
              NoCertMsg = bad_auth_message(no_cert),
              {false,
               wrq:set_resp_body(mochijson2:encode(NoCertMsg), Req), State};
          CertInfo ->
              Cert = ?gv(cert, CertInfo),
              OrgId = ?gv(org_guid, CertInfo, State#state.organization_guid),
  
negative.code:     SolrDataRaw = solr_query(Url),
      % FIXME: Probably want a solr module that knows how to query solr
      % and parse its responses.
      SolrData = ejson:decode(SolrDataRaw),
      DocList = ej:get({<<"response">>, <<"docs">>}, SolrData),
      Ids = [ ej:get({<<"X_CHEF_id_CHEF_X">>}, Doc) || Doc <- DocList ],
      Docs = chef_otto:bulk_get(S, ?db_for_guid(Db), Ids),
  