anchor.diff:    | SolutionComponentCallback comp-> 
         createSolutionComponent proxy diffSolutionUniqueName (Guid.Parse id) comp
   
  -let elim_elem ((proxy, devExtractedPath, prodExtractedPath): (IOrganizationService * string * string)) 
  -              output diffSolutionUniqueName (devNode: XmlNode) (prodNode: XmlNode) (resp: RetrieveEntityResponse option)
  +type DiffSolutionInfo = {
  +  proxy: IOrganizationService
  +  devExtractedPath: string
  +  prodExtractedPath: string
  +  solutionUniqueName: string
  +}
  +
  +let elim_elem (diffSolutionInfo: DiffSolutionInfo) output (devNode: XmlNode) (prodNode: XmlNode) (resp: RetrieveEntityResponse option)
                 type_ devNodePath devId (devReadable: ReadableName) (extraCheck: ExtraChecks) (callbackKind: CallbackKind) =
  +  let { proxy = proxy; solutionUniqueName = diffSolutionUniqueName; } = diffSolutionInfo
     let devElements = selectNodes devNode devNodePath
     devElements
     |> Seq.iter (fun devElement ->
       let id = getId devElement devId
       let name = GetReadableName devElement devReadable
       let prodElement = prodNode.SelectSingleNode(append_selector devNodePath id devId)
  -    let extraCheckfunction = GetExtraCheck (devExtractedPath, prodExtractedPath) devElement prodElement extraCheck
  +    let extraCheckfunction = extraCheckFun (diffSolutionInfo.devExtractedPath, diffSolutionInfo.prodExtractedPath) 
  +                                            devElement prodElement extraCheck
  +    
       let callback = callbackFun proxy diffSolutionUniqueName resp
       // remove_useless dev_elem prod_elem;
       if prodElement = null then
  
positive.code:       let req = RetrieveEntityRequest ()
        req.EntityFilters <- EntityFilters.All;
        req.LogicalName <- name.ToLower();
        let resp = proxy.Execute(req) :?> RetrieveEntityResponse
  
        NotEntity (devEntity, prodEntity, resp)
     else
       UnhandledEntity
  
  // Help: https://bettercrm.blog/2017/04/26/solution-component-types-in-dynamics-365/
  let rec elim (proxy: IOrganizationService) diffSolutionUniqueName (devCustomizations: string) (prodCustomizations: string) (devNode: XmlNode) (prodNode: XmlNode) output =
    log.Verbose "Preprocessing";
    let expr = "//IntroducedVersion|//IsDataSourceSecret|//Format|//CanChangeDateTimeBehavior|//LookupStyle|//CascadeRollupView|//Length|//TriggerOnUpdateAttributeList[not(text())]"
    selectNodes devNode expr |> Seq.iter removeNode;
    selectNodes prodNode expr |> Seq.iter removeNode;
    
    let GenericAddToSolution = elim_elem (proxy, devCustomizations, prodCustomizations) output diffSolutionUniqueName
    let entities = selectNodes devNode "/ImportExportXml/Entities/Entity"
    
    entities
    |> Seq.iter (fun dev_ent -> 
      let isEntityNode = NodeIsNotEntity proxy diffSolutionUniqueName output dev_ent prodNode
      match isEntityNode with 
        | NotEntity (dev_ent, prod_ent, resp) ->
        let AddEntityDataToSolution = GenericAddToSolution dev_ent prod_ent (Some resp)
  
negative.code:   doc.Save(writer);
    sw.ToString()
  
  let diff (proxy: IOrganizationService) diffSolutionUniqueName (devExtractedPath: string) (prodExtractedPath: string) output =
    log.Verbose "Parsing DEV customizations";
    let devDocument = XmlDocument ()
    devDocument.Load (devExtractedPath + "/customizations.xml");
    log.Verbose "Parsing PROD customizations";
    let prodDocument = XmlDocument ()
    prodDocument.Load (prodExtractedPath + "/customizations.xml");
    log.Verbose "Calculating diff";
  
    let diffSolutionInfo = {
      proxy = proxy
      devExtractedPath = devExtractedPath
      prodExtractedPath = prodExtractedPath
      solutionUniqueName = diffSolutionUniqueName
    }
  
    elim diffSolutionInfo devDocument prodDocument output |> ignore;
    // log.Verbose "Saving";
    // File.WriteAllText (__SOURCE_DIRECTORY__ + @"\diff.xml", to_string dev_doc);
  
  