anchor.diff:                  // overload an existing function name used with a different arity
                   let newName = res.Key
                   let funRenames = env.funRenames.Add (res.Key, res.Value.Add(nbArgs, id))
  -                let env = {env with funRenames = funRenames; varRenames = env.varRenames.Add(id, newName)}
  +                let env = env.Update(env.varRenames.Add(id, newName), funRenames, env.availableNames)
                   env, newName
               | _ ->
                   // find a new function name
                   let env, newName = env.newName env id
                   let funRenames = env.funRenames.Add (newName, Map.empty.Add(nbArgs, id))
  -                let env = {env with funRenames = funRenames}
  +                let env = env.Update(env.varRenames, funRenames, env.availableNames)
                   env, newName
   
       let renFctName env (f: FunctionType) =
  
positive.code:             for c, _ in prevs do
                  match contextTable.TryFind (c, firstLetter) with
                  | None -> ()
                  | Some occ2 -> score <- score + occ2 // * occ
  
              for c, _ in nexts do
                  match contextTable.TryFind (lastLetter, c) with
                  | None -> ()
                  | Some occ2 -> score <- score + occ2 // * occ
  
              if word.Length > 1 then
                  score <- score - 1000 // avoid long names if there are 1-letter names available
                  match contextTable.TryFind (firstLetter, lastLetter) with
                  | None -> ()
                  | Some occ2 -> score <- score + occ2
  
              if score > fst best then best <- score, word
  
  
negative.code:         let varRenames, reusable = env.varRenames |> Map.partition (fun _ id -> id.Length > 2 || set.Contains id)
          let reusable = reusable |> Seq.filter (fun x -> not (List.exists ((=) x.Value) options.noRenamingList))
          let allAvailable = [for i in reusable -> i.Value] @ env.availableNames |> Seq.distinct |> Seq.toList
          env.Update(varRenames, env.funRenames, allAvailable)
  
      let rec renStmt env =
          let renOpt o = Option.map (renExpr env) o
  