anchor.diff:  		  end
   	  end,
       Acc = lists:append([refac_syntax_lib:fold(Fun, [], F) || F <- Forms]),
  -    ExistingFuns =  case lists:keysearch(functions, 1, ModInfo) of
  -			{value, {functions, Funs}} ->
  -			    Funs;
  -			_ -> 
  -			    []
  -		    end,
  -    case lists:member({RecordToTupleFunName, 1}, Acc) andalso 
  -	(not (lists:member({RecordToTupleFunName,1}, ExistingFuns))) of
  -	true ->
  -	    F1 = mk_record_to_tuple_fun(RecordName, RecordFields,RecordToTupleFunName),
  -	    case lists:member({TupleToRecordFunName, 1}, Acc) andalso 
  -		(not (lists:member({TupleToRecordFunName, 1}, ExistingFuns)))of
  -		true ->
  -		    F2 = mk_tuple_to_record_fun(RecordName, RecordFields,TupleToRecordFunName),
  -		    Forms ++ [F1, F2];
  -		false ->
  -		    Forms ++ [F1]
  -	    end;
  -	false ->
  -	    case lists:member({TupleToRecordFunName, 1}, Acc) andalso 
  -		(not (lists:member({TupleToRecordFunName, 1}, ExistingFuns))) of
  -		true ->
  -		    F2 = mk_tuple_to_record_fun(RecordName, RecordFields, TupleToRecordFunName),
  -		    Forms ++ [F2];
  -		false ->
  -		    Forms
  -	    end
  +    ExistingFuns = case lists:keysearch(functions, 1, ModInfo) of
  +		     {value, {functions, Funs}} ->
  +			 Funs;
  +		     _ ->
  +			 []
  +		   end,
  +    case lists:member({RecordToTupleFunName, 1}, Acc) andalso
  +	   not lists:member({RecordToTupleFunName, 1}, ExistingFuns)
  +	of
  +      true ->
  +	  F1 = mk_record_to_tuple_fun(RecordName, RecordFields, RecordToTupleFunName),
  +	  case lists:member({TupleToRecordFunName, 1}, Acc) andalso
  +		 not lists:member({TupleToRecordFunName, 1}, ExistingFuns)
  +	      of
  +	    true ->
  +		F2 = mk_tuple_to_record_fun(RecordName, RecordFields, TupleToRecordFunName),
  +		Forms ++ [F1, F2];
  +	    false ->
  +		Forms ++ [F1]
  +	  end;
  +      false ->
  +	  case lists:member({TupleToRecordFunName, 1}, Acc) andalso
  +		 not lists:member({TupleToRecordFunName, 1}, ExistingFuns)
  +	      of
  +	    true ->
  +		F2 = mk_tuple_to_record_fun(RecordName, RecordFields, TupleToRecordFunName),
  +		Forms ++ [F2];
  +	    false ->
  +		Forms
  +	  end
       end.
   %% ======================================================================
   
  
positive.code:     
  
  get_possible_conversion_funs(Forms, RecordName) ->
      RecordToTuple =atom_to_list(RecordName) ++ "_to_tuple",
      TupleToRecord = "tuple_to_" ++ atom_to_list(RecordName),
      Fun = fun(F) ->
  		FName = refac_syntax:function_name(F),
  		Arity = refac_syntax:function_arity(F),
  		case refac_syntax:type(FName) of 
  		    atom ->
  			FName1 = atom_to_list(refac_syntax:atom_value(FName)),
  			(lists:prefix(RecordToTuple, FName1) orelse 
  			 lists:prefix(TupleToRecord, FName1)) andalso (Arity == 1);
  		    _ -> 
  			false
  		end
  	  end,
      [{{refac_syntax:atom_value(refac_syntax:function_name(F)),
         refac_syntax:function_arity(F)}, F}|| F<- Forms, refac_syntax:type(F)==function, Fun(F)].
      
  	  
  
  add_util_funs(Forms, ModInfo, RecordName, RecordFields, TupleToRecordFunName, RecordToTupleFunName) ->
      Fun = fun (Node, Acc) ->
  
negative.code: 			      {c, list, Es, _} ->
  				  case Es of
  				      [{c, tuple_set, [{_, Tuples}], _}| _] ->
  				    	  SNames = [[S || {c, atom, S, _} <- [T]] || {c, tuple, [T| _], _} <- Tuples],
  				    	  lists:flatten(SNames);
  				      [{c, tuple, [S, _Tuples], _}|_] ->
  					  SNames = [SName || {c, atom, SName, _} <- [S]],
  					  lists:flatten(SNames);
  				      [] ->
  					  [];
  