Index: uspace/srv/ns/clonable.c
===================================================================
--- uspace/srv/ns/clonable.c	(revision 1a522e57d9537cb70147e25d17371059a980095e)
+++ uspace/srv/ns/clonable.c	(revision 9cfbf2fc181e543945d1810f24daf11e0311be60)
@@ -46,7 +46,8 @@
 typedef struct {
 	link_t link;
-	sysarg_t service;
-	ipc_call_t call;
+	service_t service;
+	iface_t iface;
 	ipc_callid_t callid;
+	sysarg_t arg3;
 } cs_req_t;
 
@@ -61,5 +62,5 @@
 
 /** Return true if @a service is clonable. */
-bool service_clonable(int service)
+bool service_clonable(service_t service)
 {
 	return (service == SERVICE_LOAD);
@@ -73,10 +74,8 @@
  *
  */
-void register_clonable(sysarg_t service, sysarg_t phone, ipc_call_t *call,
+void register_clonable(service_t service, sysarg_t phone, ipc_call_t *call,
     ipc_callid_t callid)
 {
-	link_t *req_link;
-
-	req_link = list_first(&cs_req);
+	link_t *req_link = list_first(&cs_req);
 	if (req_link == NULL) {
 		/* There was no pending connection request. */
@@ -94,6 +93,6 @@
 	ipc_answer_0(callid, EOK);
 	
-	ipc_forward_fast(csr->callid, phone, IPC_GET_ARG1(csr->call),
-	    IPC_GET_ARG3(csr->call), 0, IPC_FF_NONE);
+	ipc_forward_fast(csr->callid, phone, csr->iface, csr->arg3, 0,
+	    IPC_FF_NONE);
 	
 	free(csr);
@@ -104,4 +103,5 @@
  *
  * @param service Service to be connected to.
+ * @param iface   Interface to be connected to.
  * @param call    Pointer to call structure.
  * @param callid  Call ID of the request.
@@ -110,5 +110,5 @@
  *
  */
-void connect_to_clonable(sysarg_t service, ipc_call_t *call,
+void connect_to_clonable(service_t service, iface_t iface, ipc_call_t *call,
     ipc_callid_t callid)
 {
@@ -132,6 +132,7 @@
 	link_initialize(&csr->link);
 	csr->service = service;
-	csr->call = *call;
+	csr->iface = iface;
 	csr->callid = callid;
+	csr->arg3 = IPC_GET_ARG3(*call);
 	
 	/*
Index: uspace/srv/ns/clonable.h
===================================================================
--- uspace/srv/ns/clonable.h	(revision 1a522e57d9537cb70147e25d17371059a980095e)
+++ uspace/srv/ns/clonable.h	(revision 9cfbf2fc181e543945d1810f24daf11e0311be60)
@@ -36,11 +36,14 @@
 #include <ipc/common.h>
 #include <sys/types.h>
+#include <ipc/services.h>
+#include <abi/ipc/interfaces.h>
 #include <stdbool.h>
 
 extern int clonable_init(void);
 
-extern bool service_clonable(int);
-extern void register_clonable(sysarg_t, sysarg_t, ipc_call_t *, ipc_callid_t);
-extern void connect_to_clonable(sysarg_t, ipc_call_t *, ipc_callid_t);
+extern bool service_clonable(service_t);
+extern void register_clonable(service_t, sysarg_t, ipc_call_t *,
+    ipc_callid_t);
+extern void connect_to_clonable(service_t, iface_t, ipc_call_t *, ipc_callid_t);
 
 #endif
Index: uspace/srv/ns/ns.c
===================================================================
--- uspace/srv/ns/ns.c	(revision 1a522e57d9537cb70147e25d17371059a980095e)
+++ uspace/srv/ns/ns.c	(revision 9cfbf2fc181e543945d1810f24daf11e0311be60)
@@ -84,9 +84,6 @@
 			break;
 		case IPC_M_CONNECT_TO_ME:
-			iface = IPC_GET_ARG1(call);
 			service = IPC_GET_ARG2(call);
 			phone = IPC_GET_ARG5(call);
-			
-			(void) iface;
 			
 			/*
@@ -104,14 +101,12 @@
 			service = IPC_GET_ARG2(call);
 			
-			(void) iface;
-			
 			/*
 			 * Client requests to be connected to a service.
 			 */
 			if (service_clonable(service)) {
-				connect_to_clonable(service, &call, callid);
+				connect_to_clonable(service, iface, &call, callid);
 				continue;
 			} else {
-				connect_to_service(service, &call, callid);
+				connect_to_service(service, iface, &call, callid);
 				continue;
 			}
Index: uspace/srv/ns/service.c
===================================================================
--- uspace/srv/ns/service.c	(revision 1a522e57d9537cb70147e25d17371059a980095e)
+++ uspace/srv/ns/service.c	(revision 9cfbf2fc181e543945d1810f24daf11e0311be60)
@@ -43,25 +43,34 @@
 typedef struct {
 	ht_link_t link;
-	sysarg_t service;        /**< Service ID. */
-	sysarg_t phone;          /**< Phone registered with the service. */
-	sysarg_t in_phone_hash;  /**< Incoming phone hash. */
+	
+	/** Service ID */
+	service_t service;
+	
+	/** Phone registered with the interface */
+	sysarg_t phone;
+	
+	/** Incoming phone hash */
+	sysarg_t in_phone_hash;
 } hashed_service_t;
 
-
 static size_t service_key_hash(void *key)
 {
-	return *(sysarg_t*)key;
+	return *(service_t *) key;
 }
 
 static size_t service_hash(const ht_link_t *item)
 {
-	hashed_service_t *hs = hash_table_get_inst(item, hashed_service_t, link);
-	return hs->service;
+	hashed_service_t *service =
+	    hash_table_get_inst(item, hashed_service_t, link);
+	
+	return service->service;
 }
 
 static bool service_key_equal(void *key, const ht_link_t *item)
 {
-	hashed_service_t *hs = hash_table_get_inst(item, hashed_service_t, link);
-	return hs->service == *(sysarg_t*)key;
+	hashed_service_t *service =
+	    hash_table_get_inst(item, hashed_service_t, link);
+	
+	return service->service == *(service_t *) key;
 }
 
@@ -81,8 +90,8 @@
 typedef struct {
 	link_t link;
-	sysarg_t service;        /**< Number of the service. */
-	ipc_callid_t callid;     /**< Call ID waiting for the connection */
-	sysarg_t iface;          /**< Interface argument */
-	sysarg_t arg3;           /**< Third argument */
+	service_t service;    /**< Service ID */
+	iface_t iface;        /**< Interface ID */
+	ipc_callid_t callid;  /**< Call ID waiting for the connection */
+	sysarg_t arg3;        /**< Third argument */
 } pending_conn_t;
 
@@ -91,6 +100,7 @@
 int service_init(void)
 {
-	if (!hash_table_create(&service_hash_table, 0, 0, &service_hash_table_ops)) {
-		printf(NAME ": No memory available for services\n");
+	if (!hash_table_create(&service_hash_table, 0, 0,
+	    &service_hash_table_ops)) {
+		printf("%s: No memory available for services\n", NAME);
 		return ENOMEM;
 	}
@@ -105,15 +115,16 @@
 {
 loop:
-	list_foreach(pending_conn, link, pending_conn_t, pr) {
-		ht_link_t *link = hash_table_find(&service_hash_table, &pr->service);
+	list_foreach(pending_conn, link, pending_conn_t, pending) {
+		ht_link_t *link = hash_table_find(&service_hash_table, &pending->service);
 		if (!link)
 			continue;
 		
-		hashed_service_t *hs = hash_table_get_inst(link, hashed_service_t, link);
-		(void) ipc_forward_fast(pr->callid, hs->phone, pr->iface, pr->arg3, 0,
-		    IPC_FF_NONE);
-		
-		list_remove(&pr->link);
-		free(pr);
+		hashed_service_t *hashed_service = hash_table_get_inst(link, hashed_service_t, link);
+		(void) ipc_forward_fast(pending->callid, hashed_service->phone,
+		    pending->iface, pending->arg3, 0, IPC_FF_NONE);
+		
+		list_remove(&pending->link);
+		free(pending);
+		
 		goto loop;
 	}
@@ -129,17 +140,19 @@
  *
  */
-int register_service(sysarg_t service, sysarg_t phone, ipc_call_t *call)
+int register_service(service_t service, sysarg_t phone, ipc_call_t *call)
 {
 	if (hash_table_find(&service_hash_table, &service))
 		return EEXISTS;
 	
-	hashed_service_t *hs = (hashed_service_t *) malloc(sizeof(hashed_service_t));
-	if (!hs)
+	hashed_service_t *hashed_service =
+	    (hashed_service_t *) malloc(sizeof(hashed_service_t));
+	if (!hashed_service)
 		return ENOMEM;
 	
-	hs->service = service;
-	hs->phone = phone;
-	hs->in_phone_hash = call->in_phone_hash;
-	hash_table_insert(&service_hash_table, &hs->link);
+	hashed_service->service = service;
+	hashed_service->phone = phone;
+	hashed_service->in_phone_hash = call->in_phone_hash;
+	
+	hash_table_insert(&service_hash_table, &hashed_service->link);
 	
 	return EOK;
@@ -149,4 +162,5 @@
  *
  * @param service Service to be connected to.
+ * @param iface   Interface to be connected to.
  * @param call    Pointer to call structure.
  * @param callid  Call ID of the request.
@@ -155,25 +169,29 @@
  *
  */
-void connect_to_service(sysarg_t service, ipc_call_t *call, ipc_callid_t callid)
-{
+void connect_to_service(service_t service, iface_t iface, ipc_call_t *call,
+    ipc_callid_t callid)
+{
+	sysarg_t arg3 = IPC_GET_ARG3(*call);
+	sysarg_t flags = IPC_GET_ARG4(*call);
 	sysarg_t retval;
 	
 	ht_link_t *link = hash_table_find(&service_hash_table, &service);
 	if (!link) {
-		if (IPC_GET_ARG4(*call) & IPC_FLAG_BLOCKING) {
+		if (flags & IPC_FLAG_BLOCKING) {
 			/* Blocking connection, add to pending list */
-			pending_conn_t *pr =
+			pending_conn_t *pending =
 			    (pending_conn_t *) malloc(sizeof(pending_conn_t));
-			if (!pr) {
+			if (!pending) {
 				retval = ENOMEM;
 				goto out;
 			}
 			
-			link_initialize(&pr->link);
-			pr->service = service;
-			pr->callid = callid;
-			pr->iface = IPC_GET_ARG1(*call);
-			pr->arg3 = IPC_GET_ARG3(*call);
-			list_append(&pr->link, &pending_conn);
+			link_initialize(&pending->link);
+			pending->service = service;
+			pending->iface = iface;
+			pending->callid = callid;
+			pending->arg3 = arg3;
+			
+			list_append(&pending->link, &pending_conn);
 			return;
 		}
@@ -183,7 +201,7 @@
 	}
 	
-	hashed_service_t *hs = hash_table_get_inst(link, hashed_service_t, link);
-	(void) ipc_forward_fast(callid, hs->phone, IPC_GET_ARG1(*call),
-	    IPC_GET_ARG3(*call), 0, IPC_FF_NONE);
+	hashed_service_t *hashed_service = hash_table_get_inst(link, hashed_service_t, link);
+	(void) ipc_forward_fast(callid, hashed_service->phone, iface, arg3,
+	    0, IPC_FF_NONE);
 	return;
 	
Index: uspace/srv/ns/service.h
===================================================================
--- uspace/srv/ns/service.h	(revision 1a522e57d9537cb70147e25d17371059a980095e)
+++ uspace/srv/ns/service.h	(revision 9cfbf2fc181e543945d1810f24daf11e0311be60)
@@ -36,10 +36,12 @@
 #include <sys/types.h>
 #include <ipc/common.h>
+#include <ipc/services.h>
+#include <abi/ipc/interfaces.h>
 
 extern int service_init(void);
 extern void process_pending_conn(void);
 
-extern int register_service(sysarg_t, sysarg_t, ipc_call_t *);
-extern void connect_to_service(sysarg_t, ipc_call_t *, ipc_callid_t);
+extern int register_service(service_t, sysarg_t, ipc_call_t *);
+extern void connect_to_service(service_t, iface_t, ipc_call_t *, ipc_callid_t);
 
 #endif
