anchor.diff:              resp.EntityMetadata.Attributes
               |> Array.find (fun a -> a.SchemaName = id)
               |> fun a -> add_entity_component proxy sol_id a.MetadataId.Value EntityComponent.Attribute);
  -        addElementToTemp "form" output
  -          dev_ent prod_ent 
  -          "FormXml/forms/systemform"
  +        AddEntityDataToSolution "form" "FormXml/forms/systemform"
             (Node "formid")
             LocalizedNameDescription
             NoExtra
             (fun id -> 
               add_entity_component proxy sol_id (Guid.Parse id) EntityComponent.Form);
  -        addElementToTemp "view" output
  -          dev_ent prod_ent 
  -          "SavedQueries/savedqueries/savedquery"
  +        AddEntityDataToSolution "view" "SavedQueries/savedqueries/savedquery"
             (Node "savedqueryid")
             LocalizedNameDescription
             NoExtra
             (fun id -> 
               add_entity_component proxy sol_id (Guid.Parse id) EntityComponent.View);
  -        addElementToTemp "chart" output
  -          dev_ent prod_ent 
  -          "Visualizations/visualization"
  +        AddEntityDataToSolution "chart" "Visualizations/visualization"
             (Node "savedqueryvisualizationid")
             LocalizedNameDescription
             NoExtra
             (fun id -> 
               add_entity_component proxy sol_id (Guid.Parse id) EntityComponent.Chart);
       )
  -  addElementToTemp "role" output
  -    dev_node prod_node 
  -    "/ImportExportXml/Roles/Role"
  +  let AddEntityDataToSolution = elim_elem (dev_customizations, prod_customizations) output dev_node prod_node
  +
  +  AddEntityDataToSolution "role" "/ImportExportXml/Roles/Role"
       (Attribute "id")
       (AttributeNamedItem "name")
       NoExtra
       (fun id -> 
         add_solution_component proxy sol_id (Guid.Parse id) SolutionComponent.Role);
  -  addElementToTemp "workflow" output
  -    dev_node prod_node 
  -    "/ImportExportXml/Workflows/Workflow"
  +  AddEntityDataToSolution "workflow" "/ImportExportXml/Workflows/Workflow"
       (Attribute "WorkflowId")
       (AttributeNamedItem "Name")
       WorkflowGuidReplace
       (fun id -> 
         add_solution_component proxy sol_id (Guid.Parse id) SolutionComponent.Workflow);
  -  addElementToTemp "field security profile" output
  -    dev_node prod_node 
  -    "/ImportExportXml/FieldSecurityProfiles/FieldSecurityProfile"
  +  AddEntityDataToSolution "field security profile" "/ImportExportXml/FieldSecurityProfiles/FieldSecurityProfile"
       (Attribute "fieldsecurityprofileid")
       (AttributeNamedItem "name")
       NoExtra
       (fun id -> 
         add_solution_component proxy sol_id (Guid.Parse id) SolutionComponent.FieldSecurityProfile);
  -  addElementToTemp "entity relationships" output
  -    dev_node prod_node 
  -    "/ImportExportXml/EntityRelationships/EntityRelationship"
  +  AddEntityDataToSolution "entity relationships" "/ImportExportXml/EntityRelationships/EntityRelationship"
       (Attribute "Name")
       (AttributeNamedItem "Name")
       NoExtra
  
positive.code:   | WebResourceByteDiff -> webResourceByteDiff (dev_path, prod_path) dev_elem prod_elem
  
  
  let elim_elem ((dev_path, prod_path): (string * string)) type_ output 
      (dev_node: XmlNode) (prod_node: XmlNode) dev_path dev_id (dev_readable: ReadableName) (extra_check: ExtraChecks) callback =
    let dev_elems = select_nodes dev_node dev_path
    dev_elems
    |> Seq.iter (fun dev_elem ->
      let id = get_id dev_elem dev_id
      let name = GetReadableName dev_elem dev_readable
      let prod_elem = prod_node.SelectSingleNode(append_selector dev_path id dev_id)
      let extra_check_fun = GetExtraCheck (dev_path, prod_path) dev_elem prod_elem extra_check
      // remove_useless dev_elem prod_elem;
      if prod_elem = null then
        if output = Diff || output = Both then 
  
negative.code:         req.EntityFilters <- EntityFilters.All;
          req.LogicalName <- name.ToLower();
          let resp = proxy.Execute(req) :?> RetrieveEntityResponse
          let AddEntityDataToSolution = GenericAddToSolution dev_ent prod_ent
          AddEntityDataToSolution "entity info" "EntityInfo/entity/*[not(self::attributes)]" 
            (Custom (fun id -> "EntityInfo/entity/"+id))
            ElemName
            NoExtra
            (fun id -> 
              add_entity_component proxy sol_id resp.EntityMetadata.MetadataId.Value EntityComponent.EntityMetaData);
          AddEntityDataToSolution "ribbon" "RibbonDiffXml"
            (Custom (fun id -> "RibbonDiffXml"))
            (Static "Ribbon")
            NoExtra
            (fun id -> 
              add_solution_component proxy sol_id resp.EntityMetadata.MetadataId.Value SolutionComponent.Ribbon);
          AddEntityDataToSolution "attribute" "EntityInfo/entity/attributes/attribute"
            (Attribute "PhysicalName")
            (AttributeNamedItem "PhysicalName")
            NoExtra
  