anchor.diff:  -export([
       new/1,
       run/4,
  -    valgen/2,
  +    valgen/3,
       file_to_array/1, file_to_array/2 % Get rid of compiler warnings.
   ]).
   
  
positive.code: %% returns a valgen function that takes an array of Fields and an
  %% array of Terms. The valgen function is then called by this module
  %% (the driver).
  valgen(MaxFields, MaxTerms) ->
      fun(Fields, Terms) ->
          %% Get the field names...
          NumFields = random:uniform(MaxFields) + 1,
  
negative.code:     F = fun(_, {DocsAccIn, _}) ->
                  ID = list_to_binary(KeyGen()),
                  NewRawFields = ValueGen(State#state.fields, State#state.terms),
                  Fields = [{list_to_binary(X), list_to_binary(string:join(Y, " "))} || {X, Y} <- NewRawFields],
                  {[{ID, Fields}|DocsAccIn], NewRawFields}
          end,
      %% Get a list of docs, plus the last RawFields entry (we only need
  