 	    (message "Refactoring failed: %S" rsn))
 	   (['rex ['error rsn]]
 	    (message "Refactoring failed: %s" rsn))
-	   (['rex ['registered pars]]
+	   (['rex ['unknown_value pars]]
 	    (if (yes-or-no-p "Do you want to continue the refactoring?")
 		(erl-spawn
-		  (erl-send-rpc node 'wrangler_distel 'register_pid
+		  (erl-send-rpc node 'refac_register_pid 'register_pid_1
 				(list current-file-name start-line-no start-col-no end-line-no (- end-col-no 1) name erlang-refac-search-paths))
 		  (erl-receive (buffer)
 		      ((['rex ['badrpc rsn]]

  (let ((current-file-name (buffer-file-name))
	(line-no           (current-line-no))
        (column-no         (current-column-no))
	(buffer (current-buffer)))       
    (erl-spawn
      (erl-send-rpc node 'wrangler_distel 'rename_var (list current-file-name line-no column-no name erlang-refac-search-paths))
      (erl-receive (buffer)

		       (['rex ['ok modified]]
			(with-current-buffer buffer (revert-buffer nil t t))
			(message "Refactoring succeeded!")))))
	      (message "Refactoring aborted!")))
	    (['rex ['registered pars]]
	    (if (yes-or-no-p "Do you want to continue the refactoring?")
		(erl-spawn
		  (erl-send-rpc node 'refac_register_pid 'register_pid_2
				(list current-file-name start-line-no start-col-no end-line-no (- end-col-no 1) name erlang-refac-search-paths))
		  (erl-receive (buffer)
		      ((['rex ['badrpc rsn]]
			(message "Refactoring failed: %S" rsn))
		       (['rex ['error rsn]]
			(message "Refactoring failed: %s" rsn))
		       (['rex ['ok modified]]
			(with-current-buffer buffer (revert-buffer nil t t))
			(message "Refactoring succeeded!")))))
	      (message "Refactoring aborted!")))
	   (['rex ['ok modified]]
	    (with-current-buffer buffer
	      (dolist (f modified)
