anchor.diff:  	    _ ->
   		{Form2, _} = ast_traverse_api:stop_tdTP(fun wrap_run_commands_result/2, Form1,
   							{RecordName, RecordFields, Res, IsTuple,
  -							 refac_misc:collect_vars(Form1), SM}),
  +							 refac_misc:collect_var_names(Form1), SM}),
   		Form2
   	  end
       end.
   
   check_use_of_run_commands(Form, SM) ->
  -    Fun= fun(Node, {Acc1, Acc2}) ->
  -		 case refac_syntax:type(Node) of
  -		     match_expr ->
  -			 P = refac_syntax:match_expr_pattern(Node),
  -			 B = refac_syntax:match_expr_body(Node),
  -			 case is_app(B, {SM, run_commands, 2}) orelse 
  -			     is_app(B, {SM, run_commands, 3}) of 
  -			     true ->
  -				 case refac_syntax:type(P) of 
  -				     tuple ->
  -					 Es = refac_syntax:tuple_elements(P),
  -					 case Es of 
  -					     [_H, S, _Res] ->
  -						 case refac_syntax:type(S) of
  -						     variable ->
  -							 case refac_util:get_free_vars(S) of 
  -							     [] ->
  -								 {[refac_syntax:get_pos(S)|Acc1], 
  -								  [refac_syntax:get_pos(B)|Acc2]};
  -							     _ ->
  -								 {[refac_syntax:get_pos(B)|Acc1], Acc2}
  -							 end;								 
  -						     _ -> {[refac_syntax:get_pos(B)|Acc1], Acc2}
  -						 end;
  -					     _ -> {[refac_syntax:get_pos(B)|Acc1], Acc2}
  +    Fun = fun (Node, {Acc1, Acc2}) ->
  +		  case refac_syntax:type(Node) of
  +		    match_expr ->
  +			P = refac_syntax:match_expr_pattern(Node),
  +			B = refac_syntax:match_expr_body(Node),
  +			case is_app(B, {SM, run_commands, 2}) orelse
  +			       is_app(B, {SM, run_commands, 3})
  +			    of
  +			  true ->
  +			      case refac_syntax:type(P) of
  +				tuple ->
  +				    Es = refac_syntax:tuple_elements(P),
  +				    case Es of
  +				      [_H, S, _Res] ->
  +					  case refac_syntax:type(S) of
  +					    variable ->
  +						case refac_misc:get_free_vars(S) of
  +						  [] ->
  +						      {[refac_syntax:get_pos(S)| Acc1],
  +						       [refac_syntax:get_pos(B)| Acc2]};
  +						  _ ->
  +						      {[refac_syntax:get_pos(B)| Acc1], Acc2}
  +						end;
  +					    _ -> {[refac_syntax:get_pos(B)| Acc1], Acc2}
  +					  end;
  +				      _ -> {[refac_syntax:get_pos(B)| Acc1], Acc2}
  +				    end;
  +				_ -> {[refac_syntax:get_pos(B)| Acc1], Acc2}
  +			      end;
  +			  _ -> {Acc1, Acc2}
  +			end;
  +		    application -> case is_app(Node, {SM, run_commands, 2}) orelse
  +					  is_app(Node, {SM, run_commands, 3})
  +				       of
  +				     true ->
  +					 Pos = refac_syntax:get_pos(Node),
  +					 case lists:member(Pos, Acc2) of
  +					   true -> {Acc1, Acc2};
  +					   false ->
  +					       {[Pos| Acc1], Acc2}
   					 end;
  -				     _ -> {[refac_syntax:get_pos(B)|Acc1], Acc2}
  -				 end;
  -			     _ -> {Acc1, Acc2}
  -			 end;
  -		     application -> case is_app(Node, {SM, run_commands, 2}) orelse 
  -					is_app(Node, {SM, run_commands, 3}) of 
  -					true ->
  -					    Pos= refac_syntax:get_pos(Node),
  -					    case lists:member(Pos, Acc2) of
  -						true -> {Acc1, Acc2};
  -						false ->
  -						    {[Pos|Acc1], Acc2}
  -					    end;
  -					false ->
  -					    {Acc1, Acc2}
  -				    end;
  -		     _ -> {Acc1, Acc2}
  -		 end
  -	 end,
  -    {Acc1, Acc2} = refac_syntax_lib:fold(Fun, {[],[]}, Form),
  +				     false ->
  +					 {Acc1, Acc2}
  +				   end;
  +		    _ -> {Acc1, Acc2}
  +		  end
  +	  end,
  +    {Acc1, Acc2} = refac_syntax_lib:fold(Fun, {[], []}, Form),
       lists:usort(Acc1) -- lists:usort(Acc2).
      
       
  
positive.code: 			       case refac_syntax:get_pos(P) of
  				 Pos ->
  				     [T] = refac_syntax:application_arguments(B),
  				     refac_util:rewrite(Node, refac_syntax:match_expr(P, T));
  				 _ -> Node
  			       end;
  			   _ -> Node
  
negative.code: 	  end
      end.
   
  make_record_to_tuple_app(Expr, RecordName, RecordFields, IsTuple, TupleToRecordFunName, RecordToTupleFunName) ->
      case IsTuple of
        false ->
  	  refac_misc:rewrite(Expr, refac_syntax:record_access(Expr, refac_syntax:atom(RecordName),
  							      refac_syntax:atom(hd(RecordFields))));
        true ->
  	  NewExpr = refac_misc:rewrite(Expr, refac_syntax:application(
  					       refac_syntax:atom(RecordToTupleFunName), [Expr])),
  	  case is_app(Expr, {TupleToRecordFunName, 1}) of
  	    true ->
  		hd(refac_syntax:application_arguments(Expr));
  	    false ->
  		NewExpr
  	  end
      end.
  
  
  mk_record_field(Name, Val) ->
      refac_misc:rewrite(Val, refac_syntax:record_field(
  			      refac_misc:rewrite(Val, refac_syntax:atom(Name)),
  			      refac_syntax:remove_comments(Val))).
  
  mk_record_fields(RecordFields, Es) ->
  