anchor.diff:      case refac_util:is_var_name(ParName) of 
   	true ->
   	    {ok, {AnnAST, Info}} =refac_util:parse_annotate_file(FileName,true, SearchPaths, TabWidth),
  +	    {ok, ModName} = get_module_name(Info),
   	    case refac_util:pos_to_expr(AnnAST, Start, End) of  
  -		{ok, Exp1} ->{ok, Fun} = refac_util:expr_to_fun(AnnAST, Exp1),
  -			     FunName = refac_syntax:data(refac_syntax:function_name(Fun)),
  -			     FunArity = refac_syntax:function_arity(Fun),
  -			     Inscope_Funs = lists:map(fun({_M1,F, A})->{F, A} end, 
  -						      refac_util:inscope_funs(Info)),
  -			     case lists:member({FunName, FunArity+1}, Inscope_Funs) of 
  -				 true ->{error, "Function "++ atom_to_list(FunName)++"/"++
  -					 integer_to_list(FunArity+1)++" is already in scope!"};
  -				 _   -> FunDefPos =get_fun_def_loc(Fun), 
  -					ParName1 = list_to_atom(ParName),
  -					case gen_cond_analysis(Fun, Exp1, ParName1) of 
  -					    ok -> 
  -						SideEffect = refac_util:has_side_effect(FileName, Exp1, SearchPaths),
  -						case SideEffect of  
  -						    unknown -> {unknown_side_effect, {ParName1, FunName, FunArity, FunDefPos,Exp1}};
  -						    _ ->AnnAST1=gen_fun(AnnAST, ParName1, 
  -									FunName, FunArity, FunDefPos,Info, Exp1, SideEffect),
  -							case Editor of 
  -							    emacs ->
  -								refac_util:write_refactored_files([{{FileName,FileName}, AnnAST1}]),
  -								{ok, "Refactor succeeded"};
  -							    eclipse  ->
  -								Res = [{FileName, FileName, refac_prettypr:print_ast(refac_util:file_format(FileName),AnnAST1)}],
  -								{ok, Res}
  -							end
  -						end;	     
  -					    {error, Reason} -> {error, Reason}
  -					end 
  -			     end;
  +		{ok, Exp1} ->
  +		    case  refac_util:expr_to_fun(AnnAST, Exp1) of 
  +			{ok, Fun} ->
  +			    FunName = refac_syntax:data(refac_syntax:function_name(Fun)),
  +			    FunArity = refac_syntax:function_arity(Fun),
  +			    Inscope_Funs = lists:map(fun({_M1,F, A})->{F, A} end, refac_util:inscope_funs(Info)),
  +			    case lists:member({FunName, FunArity+1}, Inscope_Funs) of 
  +				true ->{error, "Function "++ atom_to_list(FunName)++"/"++
  +					integer_to_list(FunArity+1)++" is already in scope!"};
  +				_   -> FunDefPos =get_fun_def_loc(Fun), 
  +				       ParName1 = list_to_atom(ParName),
  +				       case gen_cond_analysis(Fun, Exp1, ParName1, refac_util:is_exported({FunName, FunArity},Info)) of 
  +					   ok -> 
  +					       SideEffect = refac_util:has_side_effect(FileName, Exp1, SearchPaths),
  +					       case SideEffect of  
  +						   unknown -> {unknown_side_effect, {ParName1, FunName, FunArity, FunDefPos,Exp1}};
  +						   _ ->AnnAST1=gen_fun(ModName, AnnAST, ParName1, FunName, FunArity, FunDefPos,Info, Exp1, SideEffect),
  +						       case Editor of 
  +							   emacs ->
  +							       refac_util:write_refactored_files([{{FileName,FileName}, AnnAST1}]),
  +							       {ok, "Refactor succeeded"};
  +							   eclipse  ->
  +							       Res = [{FileName, FileName, refac_prettypr:print_ast(refac_util:file_format(FileName),AnnAST1)}],
  +							       {ok, Res}
  +						       end
  +					       end;	     
  +					   {error, Reason} -> {error, Reason}
  +				       end
  +			    end;
  +			{error, _} -> {error, "You have not selected an expression within a function."}		    
  +		    end;
   		{error, Reason} -> {error, Reason}
   	    end;
   	false  -> {error, "Invalid parameter name!"}
  
positive.code: 		fun_expr -> Exp;
  		implicit_fun -> Exp;
  		_ ->  case lists:keysearch(fun_def, 1, refac_syntax:get_ann(Exp)) of 
  			  {value, {fun_def, {_M, _N, A, _P1, _P2}}} ->
  			      case refac_syntax:type(Exp) of 
  				  atom -> refac_syntax:implicit_fun(Exp, refac_syntax:integer(A));				       
  				  module_qualifier -> refac_syntax:implicit_fun(Exp, refac_syntax:integer(A));
  				  _ -> throw({error, 
  					      "Wrangler failed to perform this refactoring, because it could not get enough information about the expression selected."})
  
negative.code: 
  %% =====================================================================
  %%
  do_gen_fun(Tree, {ModName, ParName, FunName, Arity, DefPos,Info, Exp, SideEffect}) ->    
       Exp1 =  make_actual_parameter(ModName, Exp, SideEffect),
      case  refac_syntax:type(Tree) of 
  	function -> 
  	    case get_fun_def_loc(Tree) of 
  