anchor.diff:  	     {functions, F(functions)}, {rules, F(rules)}],
       [{A,V}||{A, V}<-NewInfo, V=/=[]].
   
  +
  +update_module_info(ModInfo) ->
  +    ModInfo1 = update_exports(ModInfo),
  +    update_inscope_funs(ModInfo1).
  +  
  +update_exports(ModInfo) ->
  +    case lists:keysearch(attributes,1, ModInfo) of 
  +        {value, {attributes, Attrs}} ->
  +            case lists:member({compile, export_all}, Attrs) of
  +                true ->
  +                    case  lists:keysearch(functions,1, ModInfo) of
  +                        {value, {functions, Funs}} ->
  +                            case lists:keysearch(exports, 1, ModInfo) of
  +                                {value, {exports, Funs1}} ->
  +                                    lists:keyreplace(exports, 1, ModInfo, 
  +                                                     {exports, lists:usort(Funs++Funs1)});
  +                                false ->
  +                                    ModInfo++[{exports, Funs}]
  +                            end;
  +                        false->
  +                            ModInfo
  +                    end;
  +                false ->
  +                    ModInfo
  +            end;
  +        false ->
  +            ModInfo
  +    end.
  +        
  +update_inscope_funs(ModInfo) ->
  +    Imps =  case lists:keysearch(imports, 1, ModInfo) of
  +                {value, {imports, Funs}} ->
  +                    Funs;
  +                _ -> []
  +            end,
  +    DefinedFuns = case lists:keysearch(functions, 1, ModInfo) of
  +                      {value, {functions, Fs}} ->
  +                       Fs;
  +                      _ -> []
  +                  end,
  +    PreDefinedFuns = [{module_info, 1}, {module_info, 2}, {record_info, 2}],
  +    AutoImps = auto_imported_bifs(),
  +    NoAutoImps =case lists:keysearch(attributes, 1, ModInfo) of
  +                     {value, {attributes, Attrs}} ->
  +                         [{F, list_to_integer(A)}||{compile, {no_auto_import, FAs}}<-Attrs,
  +                                                   {F,A}<-FAs];
  +                     _ -> []
  +                 end,
  +    InScopeFuns =Imps++DefinedFuns++PreDefinedFuns++(AutoImps--NoAutoImps),
  +    ModInfo++[{inscope_funs, InScopeFuns}].
  +
  +
  +auto_imported_bifs() ->
  +    [{abs, 1},            {apply, 2},             {apply, 3}, 
  +     {atom_to_binary, 2}, {binary_part, 2},       {binary_part, 3},
  +     {binary_to_atom, 2}, {binary_to_existing_atom,2},
  +     {atom_to_list, 1},   {binary_to_list, 1},    {binary_to_list, 3}, 
  +     {bitstring_to_list,1}, {binary_to_term, 1},  {bit_size, 1},
  +     {byte_size, 1},
  +     {binary_to_term, 2}, {check_process_code,2}, {concat_binary, 1},  
  +     {date, 3},           {delete_module, 1},     {demonitor, 1},
  +     {demonitor, 2},      {disconnect_node, 1},   {error, 1},
  +     {error, 2},
  +     {element, 2},        {erase, 0},             {erase, 1}, 
  +     {exit, 1},           {exit, 2},              {float, 1},
  +     {float_to_list, 1},  {garbage_collect, 1},   {garbage_collect, 0},
  +     {get, 0},            {get, 1},               {get_keys, 1},  
  +     {group_leader, 0},   {group_leader, 2},      {halt, 0},
  +     {halt, 1},           {hd, 1},                {integer_to_list, 1},
  +     {integer_to_list,2}, {iolist_to_binary,1},   {iolist_size, 1}, 
  +     {is_alive, 0},       {is_atom, 1},           {is_bitstring,1},
  +     {is_binary, 1},      {is_boolean, 1},        {is_float, 1},
  +     {is_function, 1},    {is_function, 2},       {is_integer, 1},
  +     {is_list, 1},        {is_number, 1},         {is_pid, 1},
  +     {is_port, 1},        {is_process_alive,1},   {is_record, 2},  
  +     {is_record, 3},      {is_reference, 1},      {is_tuple, 1},    
  +     {length, 1},         {link, 1},              {list_to_atom, 1},
  +     {list_to_binary,1},  {list_to_bitstring, 1},
  +     {list_to_float, 1},  {list_to_existing_atom,1}, 
  +     {list_to_integer,1}, {list_to_pid, 1},       {list_to_tuple, 1},
  +     {load_module, 2},    {make_ref, 0},          {max, 2},
  +     {min, 2},            {module_loaded, 1},     {monitor, 2},
  +     {monitor_node, 2},   {node, 0},              {node, 1},   
  +     {nodes, 0},          {nodes, 1},             {now, 0},
  +     {open_port, 2},      {pid_to_list, 1},       {port_close, 1},  
  +     {port_command, 2},   {port_command, 3},
  +     {port_connect, 2},   {port_control, 3},  
  +     {pre_loaded, 0},     {process_flag, 2},      {process_flag, 3},
  +     {process_info, 1},   {process_info, 2},      {processes, 0},
  +     {purge_module, 1},   {put, 2},               {register, 2},    
  +     {registered, 0},     {round, 1},             {self, 0},
  +     {setelement, 3},     {size, 1},              {spawn, 1},
  +     {spawn, 2},          {spawn, 3},             {spawn, 4},    
  +     {spawn_link, 1},     {spawn_link, 2},        {spawn_link, 3},
  +     {spawn_link, 4},     {spawn_monitor, 1},     {spawn_monitor, 3},
  +     {spawn_opt, 2},      {spawn_opt, 3},
  +     {spawn_opt, 4},      {spawn_opt, 5},         {aplit_binary, 2}, 
  +     {statistics, 1},     {term_to_binary, 1},    {term_to_binary, 2},
  +     {throw, 1},          {time, 1},              {tl, 1},
  +     {trunc, 1},          {tuple_size, 1},        {tuple_to_list, 1},
  +     {unregister, 1},     {unregister, 1},        {unlink, 1}, 
  +     {whereis, 1}].
  +
   annotate_bindings(FName, AST, Info, Ms, TabWidth) ->
       Toks = refac_util:tokenize(FName, true, TabWidth),
  -    AnnAST0 = refac_syntax_lib:annotate_bindings(add_token_and_ranges(AST, Toks), ordsets:new(), Ms),
  +    AnnAST = add_token_and_ranges(AST, Toks), 
  +    AnnAST0 = refac_syntax_lib:annotate_bindings(AnnAST,ordsets:new(), Ms),
       Comments = refac_comment_scan:file(FName, TabWidth),
       AnnAST1= refac_recomment:recomment_forms(AnnAST0, Comments),
       AnnAST2 =update_toks(Toks,AnnAST1),
  
positive.code: 			    none -> none;
  			    _ -> add_category(Argument, C)
  			end,
  	    Type1 = add_category(Type, record_type),
  	    Fields1 =[refac_syntax:add_ann({category, record_field},rewrite(F, refac_syntax:record_field(
  			add_category(refac_syntax:record_field_name(F), record_field),
  			case refac_syntax:record_field_value(F) of 
  			    none -> 
  				none;
  			    V -> 
  				add_category(V, C)
  			end))) || F<-Fields],
  	    Node1 = rewrite(Node, refac_syntax:record_expr(Argument1, Type1, Fields1)),
  	    {update_ann(Node1, {category, C}), true};
  	record_index_expr ->
  	    Type = refac_syntax:record_index_expr_type(Node),
  	    Field = refac_syntax:record_index_expr_field(Node),
  	    Type1 = add_category(Type, record_type),
  	    Field1 = add_category(Field, record_field),
  	    Node1 = rewrite(Node, refac_syntax:record_index_expr(Type1, Field1)),
  	    {update_ann(Node1, {category, C}), true};
  	operator ->
  	    {update_ann(Node, {category, operator}), true};
  	_ -> case C of
  		 none ->
  		     {Node, false};
  		 _ -> 
  		     {update_ann(Node, {category, C}),false}
  	     end
      end.
  
  rewrite(Tree, Tree1) ->
      refac_syntax:copy_attrs(Tree, Tree1).
  
negative.code: 		 end,
  	    Node1 =rewrite(Node, refac_syntax:clause(P1, G1, Body1)),
  	    {Node1, true};
          match_expr ->
  	    P = refac_syntax:match_expr_pattern(Node),
  	    B = refac_syntax:match_expr_body(Node),
  	    P1 = add_category(P, pattern),
  	    B1 = add_category(B, expression),
  	    Node1=rewrite(Node, refac_syntax:match_expr(P1, B1)),
              {update_category_ann(Node1, expression), true};
          module_qualifier ->
              Arg = refac_syntax:module_qualifier_argument(Node),
              Body = refac_syntax:module_qualifier_body(Node),
              Arg1 = add_category(Arg,C),
              Body1 = add_category(Body, C),
              Node1 =rewrite(Node, refac_syntax:module_qualifier(Arg1, Body1)),
              {Node1,true};
          binary_generator ->
              P = refac_syntax:binary_generator_pattern(Node),
              B = refac_syntax:binary_generator_body(Node),
              P1 = add_category(P, pattern),
  	    B1 = add_category(B, expression),
  	    Node1=rewrite(Node, refac_syntax:binary_generator(P1, B1)),
              {Node1, true};
          generator ->
              P = refac_syntax:generator_pattern(Node),
              B = refac_syntax:generator_body(Node),
              P1 = add_category(P, pattern),
  	    B1 = add_category(B, expression),
  	    Node1=rewrite(Node, refac_syntax:generator(P1, B1)),
              {Node1, true};
          arity_qualifier ->
              {Node, true};
          operator ->
              {Node, true};
          binary_field ->
              Body = refac_syntax:binary_field_body(Node),
              Size = refac_syntax:binary_field_size(Node),
              Types = refac_syntax:binary_field_types(Node),
              Body1 = case refac_syntax:type(Body) of 
                          size_qualifier ->
                              add_category(refac_syntax:size_qualifier_body(Body), C);
                          _ ->
                              add_category(Body, C)
                      end,
  