Index: uspace/app/bdsh/cmds/modules/cat/cat.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cat/cat.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -117,21 +117,24 @@
 static void waitkey()
 {
-	kbd_event_t ev;
+	cons_event_t ev;
+	kbd_event_t *kev;
 	
 	while (true) {
-		if (!console_get_kbd_event(console, &ev)) {
+		if (!console_get_event(console, &ev)) {
 			return;
 		}
-		if (ev.type == KEY_PRESS) {
-			if (ev.key == KC_ESCAPE || ev.key == KC_Q) {
+		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) {
+			kev = &ev.ev.key;
+			
+			if (kev->key == KC_ESCAPE || kev->key == KC_Q) {
 				should_quit = true;
 				return;
 			}
-			if (ev.key == KC_C) {
+			if (kev->key == KC_C) {
 				paging_enabled = false;
 				return;
 			}
-			if (ev.key == KC_ENTER || ev.key == KC_SPACE ||
-			    ev.key == KC_PAGE_DOWN) {
+			if (kev->key == KC_ENTER || kev->key == KC_SPACE ||
+			    kev->key == KC_PAGE_DOWN) {
 				return;
 			}
Index: uspace/app/bdsh/cmds/modules/cmp/cmp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cmp/cmp.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/bdsh/cmds/modules/cmp/cmp.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -107,5 +107,5 @@
 
 		if (offset[0] != offset[1] ||
-		    bcmp(buffer[0], buffer[1], offset[0])) {
+		    memcmp(buffer[0], buffer[1], offset[0]) != 0) {
 			rc = 1;
 			goto end;
Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -152,13 +152,13 @@
 
 	while (true) {
-		kbd_event_t ev;
+		cons_event_t ev;
 		console_flush(con);
-		console_get_kbd_event(con, &ev);
-		if ((ev.type != KEY_PRESS)
-		    || (ev.mods & (KM_CTRL | KM_ALT)) != 0) {
+		console_get_event(con, &ev);
+		if (ev.type != CEV_KEY || ev.ev.key.type != KEY_PRESS ||
+		    (ev.ev.key.mods & (KM_CTRL | KM_ALT)) != 0) {
 			continue;
 		}
 
-		switch(ev.key) {
+		switch(ev.ev.key.key) {
 		case KC_Y:
 			printf("y\n");
Index: uspace/app/bdsh/cmds/modules/ls/ls.c
===================================================================
--- uspace/app/bdsh/cmds/modules/ls/ls.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/bdsh/cmds/modules/ls/ls.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -315,5 +315,5 @@
 {
 	if (stat(path, &de->s)) {
-		cli_error(CL_ENOENT, path);
+		cli_error(CL_ENOENT, "%s", path);
 		return LS_BOGUS;
 	}
Index: uspace/app/bdsh/cmds/modules/sleep/sleep.c
===================================================================
--- uspace/app/bdsh/cmds/modules/sleep/sleep.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/bdsh/cmds/modules/sleep/sleep.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -114,5 +114,5 @@
 	int ret;
 	unsigned int argc;
-	useconds_t duration;
+	useconds_t duration = 0;
 
 	/* Count the arguments */
Index: uspace/app/bnchmark/bnchmark.c
===================================================================
--- uspace/app/bnchmark/bnchmark.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/bnchmark/bnchmark.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -142,5 +142,5 @@
 {
 	int rc;
-	umseconds_t milliseconds_taken;
+	umseconds_t milliseconds_taken = 0;
 	char *path = NULL;
 	measure_func_t fn = NULL;
Index: uspace/app/dnscfg/Makefile
===================================================================
--- uspace/app/dnscfg/Makefile	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
+++ uspace/app/dnscfg/Makefile	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2013 Jiri Svoboda
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+USPACE_PREFIX = ../..
+BINARY = dnscfg
+
+SOURCES = \
+	dnscfg.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/dnscfg/dnscfg.c
===================================================================
--- uspace/app/dnscfg/dnscfg.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
+++ uspace/app/dnscfg/dnscfg.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2013 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup dnscfg
+ * @{
+ */
+/** @file DNS configuration utility.
+ *
+ * Controls the DNS resolution server (@c dnsrsrv).
+ */
+
+#include <errno.h>
+#include <inet/addr.h>
+#include <inet/dnsr.h>
+#include <ipc/services.h>
+#include <loc.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <str_error.h>
+#include <sys/types.h>
+
+#define NAME "dnscfg"
+
+static void print_syntax(void)
+{
+	printf("syntax:\n");
+	printf("\t" NAME " set-ns <server-addr>\n");
+	printf("\t" NAME " unset-ns\n");
+}
+
+static int dnscfg_set_ns(int argc, char *argv[])
+{
+	char *srv_addr;
+	inet_addr_t addr;
+	int rc;
+
+	if (argc < 1) {
+		printf(NAME ": Missing arguments.\n");
+		print_syntax();
+		return EINVAL;
+	}
+
+	if (argc > 1) {
+		printf(NAME ": Too many arguments.\n");
+		print_syntax();
+		return EINVAL;
+	}
+
+	srv_addr = argv[0];
+
+	rc = inet_addr_parse(srv_addr, &addr);
+	if (rc != EOK) {
+		printf(NAME ": Invalid address format '%s'.\n", srv_addr);
+		return EINVAL;
+	}
+
+	rc = dnsr_set_srvaddr(&addr);
+	if (rc != EOK) {
+		printf(NAME ": Failed setting server address '%s' (%s)\n",
+		    srv_addr, str_error(rc));
+		return EIO;
+	}
+
+	return EOK;
+}
+
+static int dnscfg_unset_ns(int argc, char *argv[])
+{
+	inet_addr_t addr;
+	int rc;
+
+	if (argc > 0) {
+		printf(NAME ": Too many arguments.\n");
+		print_syntax();
+		return EINVAL;
+	}
+
+	addr.ipv4 = 0;
+	rc = dnsr_set_srvaddr(&addr);
+	if (rc != EOK) {
+		printf(NAME ": Failed unsetting server address (%s)\n",
+		    str_error(rc));
+		return EIO;
+	}
+
+	return EOK;
+}
+
+static int dnscfg_print(void)
+{
+	inet_addr_t addr;
+	char *addr_str;
+	int rc;
+
+	rc = dnsr_get_srvaddr(&addr);
+	if (rc != EOK) {
+		printf(NAME ": Failed getting DNS server address.\n");
+		return rc;
+	}
+
+	rc = inet_addr_format(&addr, &addr_str);
+	if (rc != EOK) {
+		printf(NAME ": Out of memory.\n");
+		return rc;
+	}
+
+	printf("Server: %s\n", addr_str);
+	free(addr_str);
+	return EOK;
+}
+
+int main(int argc, char *argv[])
+{
+	int rc;
+
+	if (argc < 2) {
+		rc = dnscfg_print();
+		if (rc != EOK)
+			return 1;
+		return 0;
+	}
+
+	if (str_cmp(argv[1], "set-ns") == 0) {
+		rc = dnscfg_set_ns(argc - 2, argv + 2);
+		if (rc != EOK)
+			return 1;
+	} else if (str_cmp(argv[1], "unset-ns") == 0) {
+		rc = dnscfg_unset_ns(argc - 2, argv + 2);
+		if (rc != EOK)
+			return 1;
+	} else {
+		printf(NAME ": Unknown command '%s'.\n", argv[1]);
+		print_syntax();
+		return 1;
+	}
+
+
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/app/dnsres/Makefile
===================================================================
--- uspace/app/dnsres/Makefile	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
+++ uspace/app/dnsres/Makefile	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2013 Jiri Svoboda
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+USPACE_PREFIX = ../..
+BINARY = dnsres
+
+SOURCES = \
+	dnsres.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/dnsres/dnsres.c
===================================================================
--- uspace/app/dnsres/dnsres.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
+++ uspace/app/dnsres/dnsres.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2013 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup dnsres
+ * @{
+ */
+/** @file DNS query utility.
+ */
+
+#include <errno.h>
+#include <inet/addr.h>
+#include <inet/dnsr.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#define NAME "dnsres"
+
+static void print_syntax(void)
+{
+	printf("syntax: " NAME " <host-name>\n");
+}
+
+int main(int argc, char *argv[])
+{
+	int rc;
+	dnsr_hostinfo_t *hinfo;
+	char *hname;
+	char *saddr;
+
+	if (argc != 2) {
+		print_syntax();
+		return 1;
+	}
+
+	hname = argv[1];
+
+	rc = dnsr_name2host(hname, &hinfo);
+	if (rc != EOK) {
+		printf(NAME ": Error resolving '%s'.\n", argv[1]);
+		return 1;
+	}
+
+	rc = inet_addr_format(&hinfo->addr, &saddr);
+	if (rc != EOK) {
+		dnsr_hostinfo_destroy(hinfo);
+		printf(NAME ": Out of memory.\n");
+		return 1;
+	}
+
+	printf("Host name: %s\n", hname);
+	if (str_cmp(hname, hinfo->cname) != 0)
+		printf("Canonical name: %s\n", hinfo->cname);
+	printf("Address: %s\n", saddr);
+
+	dnsr_hostinfo_destroy(hinfo);
+	free(saddr);
+
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/app/edit/edit.c
===================================================================
--- uspace/app/edit/edit.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/edit/edit.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -80,4 +80,7 @@
 	tag_t sel_start;
 
+	/** Active keyboard modifiers */
+	keymod_t keymod;
+
 	/** 
 	 * Ideal column where the caret should try to get. This is used
@@ -119,4 +122,5 @@
 static void cursor_setvis(bool visible);
 
+static void key_handle_press(kbd_event_t *ev);
 static void key_handle_unmod(kbd_event_t const *ev);
 static void key_handle_ctrl(kbd_event_t const *ev);
@@ -124,4 +128,6 @@
 static void key_handle_shift_ctrl(kbd_event_t const *ev);
 static void key_handle_movement(unsigned int key, bool shift);
+
+static void pos_handle(pos_event_t *ev);
 
 static int file_save(char const *fname);
@@ -182,5 +188,5 @@
 int main(int argc, char *argv[])
 {
-	kbd_event_t ev;
+	cons_event_t ev;
 	bool new_file;
 	int rc;
@@ -245,24 +251,16 @@
 
 	while (!done) {
-		console_get_kbd_event(con, &ev);
+		console_get_event(con, &ev);
 		pane.rflags = 0;
 
-		if (ev.type == KEY_PRESS) {
-			/* Handle key press. */
-			if (((ev.mods & KM_ALT) == 0) &&
-			    ((ev.mods & KM_SHIFT) == 0) &&
-			     (ev.mods & KM_CTRL) != 0) {
-				key_handle_ctrl(&ev);
-			} else if (((ev.mods & KM_ALT) == 0) &&
-			    ((ev.mods & KM_CTRL) == 0) &&
-			     (ev.mods & KM_SHIFT) != 0) {
-				key_handle_shift(&ev);
-			} else if (((ev.mods & KM_ALT) == 0) &&
-			    ((ev.mods & KM_CTRL) != 0) &&
-			     (ev.mods & KM_SHIFT) != 0) {
-				key_handle_shift_ctrl(&ev);
-			} else if ((ev.mods & (KM_CTRL | KM_ALT | KM_SHIFT)) == 0) {
-				key_handle_unmod(&ev);
-			}
+		switch (ev.type) {
+		case CEV_KEY:
+			pane.keymod = ev.ev.key.mods;
+			if (ev.ev.key.type == KEY_PRESS)
+				key_handle_press(&ev.ev.key);
+			break;
+		case CEV_POS:
+			pos_handle(&ev.ev.pos);
+			break;
 		}
 
@@ -286,4 +284,24 @@
 
 	return 0;
+}
+
+/* Handle key press. */
+static void key_handle_press(kbd_event_t *ev)
+{
+	if (((ev->mods & KM_ALT) == 0) &&
+	    ((ev->mods & KM_SHIFT) == 0) &&
+	     (ev->mods & KM_CTRL) != 0) {
+		key_handle_ctrl(ev);
+	} else if (((ev->mods & KM_ALT) == 0) &&
+	    ((ev->mods & KM_CTRL) == 0) &&
+	     (ev->mods & KM_SHIFT) != 0) {
+		key_handle_shift(ev);
+	} else if (((ev->mods & KM_ALT) == 0) &&
+	    ((ev->mods & KM_CTRL) != 0) &&
+	     (ev->mods & KM_SHIFT) != 0) {
+		key_handle_shift_ctrl(ev);
+	} else if ((ev->mods & (KM_CTRL | KM_ALT | KM_SHIFT)) == 0) {
+		key_handle_unmod(ev);
+	}
 }
 
@@ -462,4 +480,21 @@
 }
 
+static void pos_handle(pos_event_t *ev)
+{
+	coord_t bc;
+	spt_t pt;
+	bool select;
+
+	if (ev->type == POS_PRESS && ev->vpos < (unsigned)pane.rows) {
+		bc.row = pane.sh_row + ev->vpos;
+		bc.column = pane.sh_column + ev->hpos;
+		sheet_get_cell_pt(doc.sh, &bc, dir_before, &pt);
+
+		select = (pane.keymod & KM_SHIFT) != 0;
+
+		caret_move(pt, select, true);
+	}
+}
+
 /** Move caret while preserving or resetting selection. */
 static void caret_move(spt_t new_caret_pt, bool select, bool update_ideal_column)
@@ -592,5 +627,6 @@
 static char *prompt(char const *prompt, char const *init_value)
 {
-	kbd_event_t ev;
+	cons_event_t ev;
+	kbd_event_t *kev;
 	char *str;
 	wchar_t buffer[INFNAME_MAX_LEN + 1];
@@ -612,13 +648,15 @@
 
 	while (!done) {
-		console_get_kbd_event(con, &ev);
-
-		if (ev.type == KEY_PRESS) {
+		console_get_event(con, &ev);
+
+		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) {
+			kev = &ev.ev.key;
+
 			/* Handle key press. */
-			if (((ev.mods & KM_ALT) == 0) &&
-			     (ev.mods & KM_CTRL) != 0) {
+			if (((kev->mods & KM_ALT) == 0) &&
+			     (kev->mods & KM_CTRL) != 0) {
 				;
-			} else if ((ev.mods & (KM_CTRL | KM_ALT)) == 0) {
-				switch (ev.key) {
+			} else if ((kev->mods & (KM_CTRL | KM_ALT)) == 0) {
+				switch (kev->key) {
 				case KC_ESCAPE:
 					return NULL;
@@ -634,8 +672,8 @@
 					break;
 				default:
-					if (ev.c >= 32 && nc < max_len) {
-						putchar(ev.c);
+					if (kev->c >= 32 && nc < max_len) {
+						putchar(kev->c);
 						console_flush(con);
-						buffer[nc++] = ev.c;
+						buffer[nc++] = kev->c;
 					}
 					break;
Index: uspace/app/inet/inet.c
===================================================================
--- uspace/app/inet/inet.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/inet/inet.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jiri Svoboda
+ * Copyright (c) 2013 Jiri Svoboda
  * All rights reserved.
  *
@@ -36,4 +36,5 @@
 
 #include <errno.h>
+#include <inet/addr.h>
 #include <inet/inetcfg.h>
 #include <loc.h>
@@ -54,95 +55,4 @@
 }
 
-static int naddr_parse(const char *text, inet_naddr_t *naddr)
-{
-	unsigned long a[4], bits;
-	char *cp = (char *)text;
-	int i;
-
-	for (i = 0; i < 3; i++) {
-		a[i] = strtoul(cp, &cp, 10);
-		if (*cp != '.')
-			return EINVAL;
-		++cp;
-	}
-
-	a[3] = strtoul(cp, &cp, 10);
-	if (*cp != '/')
-		return EINVAL;
-	++cp;
-
-	bits = strtoul(cp, &cp, 10);
-	if (*cp != '\0')
-		return EINVAL;
-
-	naddr->ipv4 = 0;
-	for (i = 0; i < 4; i++) {
-		if (a[i] > 255)
-			return EINVAL;
-		naddr->ipv4 = (naddr->ipv4 << 8) | a[i];
-	}
-
-	if (bits > 31)
-		return EINVAL;
-
-	naddr->bits = bits;
-	return EOK;
-}
-
-static int addr_parse(const char *text, inet_addr_t *addr)
-{
-	unsigned long a[4];
-	char *cp = (char *)text;
-	int i;
-
-	for (i = 0; i < 3; i++) {
-		a[i] = strtoul(cp, &cp, 10);
-		if (*cp != '.')
-			return EINVAL;
-		++cp;
-	}
-
-	a[3] = strtoul(cp, &cp, 10);
-	if (*cp != '\0')
-		return EINVAL;
-
-	addr->ipv4 = 0;
-	for (i = 0; i < 4; i++) {
-		if (a[i] > 255)
-			return EINVAL;
-		addr->ipv4 = (addr->ipv4 << 8) | a[i];
-	}
-
-	return EOK;
-}
-
-static int naddr_format(inet_naddr_t *naddr, char **bufp)
-{
-	int rc;
-
-	rc = asprintf(bufp, "%d.%d.%d.%d/%d", naddr->ipv4 >> 24,
-	    (naddr->ipv4 >> 16) & 0xff, (naddr->ipv4 >> 8) & 0xff,
-	    naddr->ipv4 & 0xff, naddr->bits);
-
-	if (rc < 0)
-		return ENOMEM;
-
-	return EOK;
-}
-
-static int addr_format(inet_addr_t *addr, char **bufp)
-{
-	int rc;
-
-	rc = asprintf(bufp, "%d.%d.%d.%d", addr->ipv4 >> 24,
-	    (addr->ipv4 >> 16) & 0xff, (addr->ipv4 >> 8) & 0xff,
-	    addr->ipv4 & 0xff);
-
-	if (rc < 0)
-		return ENOMEM;
-
-	return EOK;
-}
-
 static int addr_create_static(int argc, char *argv[])
 {
@@ -178,5 +88,5 @@
 	}
 
-	rc = naddr_parse(addr_spec, &naddr);
+	rc = inet_naddr_parse(addr_spec, &naddr);
 	if (rc != EOK) {
 		printf(NAME ": Invalid network address format '%s'.\n",
@@ -267,5 +177,5 @@
 	route_name = argv[2];
 
-	rc = naddr_parse(dest_str, &dest);
+	rc = inet_naddr_parse(dest_str, &dest);
 	if (rc != EOK) {
 		printf(NAME ": Invalid network address format '%s'.\n",
@@ -274,5 +184,5 @@
 	}
 
-	rc = addr_parse(router_str, &router);
+	rc = inet_addr_parse(router_str, &router);
 	if (rc != EOK) {
 		printf(NAME ": Invalid address format '%s'.\n", router_str);
@@ -366,5 +276,5 @@
 		}
 
-		rc = naddr_format(&ainfo.naddr, &astr);
+		rc = inet_naddr_format(&ainfo.naddr, &astr);
 		if (rc != EOK) {
 			printf("Memory allocation failed.\n");
@@ -430,5 +340,5 @@
 		}
 
-		rc = naddr_format(&srinfo.dest, &dest_str);
+		rc = inet_naddr_format(&srinfo.dest, &dest_str);
 		if (rc != EOK) {
 			printf("Memory allocation failed.\n");
@@ -437,5 +347,5 @@
 		}
 
-		rc = addr_format(&srinfo.router, &router_str);
+		rc = inet_addr_format(&srinfo.router, &router_str);
 		if (rc != EOK) {
 			printf("Memory allocation failed.\n");
Index: uspace/app/init/init.c
===================================================================
--- uspace/app/init/init.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/init/init.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -359,4 +359,5 @@
 	srv_start("/srv/tcp");
 	srv_start("/srv/udp");
+	srv_start("/srv/dnsrsrv");
 	
 	srv_start("/srv/clipboard");
Index: uspace/app/mkbd/main.c
===================================================================
--- uspace/app/mkbd/main.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/mkbd/main.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -178,6 +178,6 @@
 
 	while (1) {
-		kbd_event_t ev;
-		bool ok = console_get_kbd_event(con, &ev);
+		cons_event_t ev;
+		bool ok = console_get_event(con, &ev);
 		if (!ok) {
 			printf("Connection with console broken: %s.\n",
@@ -186,5 +186,6 @@
 		}
 
-		if (ev.key == KC_ESCAPE) {
+		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS &&
+		    ev.ev.key.key == KC_ESCAPE) {
 			break;
 		}
Index: uspace/app/msim/arch_helenos/input.c
===================================================================
--- uspace/app/msim/arch_helenos/input.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/msim/arch_helenos/input.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -91,17 +91,17 @@
 bool stdin_poll(char *key)
 {
-	kbd_event_t ev;
+	cons_event_t ev;
 	suseconds_t timeout = 0;
 	errno = EOK;
 	console_flush(input_prompt->console);
-	bool has_input = console_get_kbd_event_timeout(input_prompt->console, &ev, &timeout);
+	bool has_input = console_get_event_timeout(input_prompt->console, &ev, &timeout);
 	if (!has_input) {
 		return false;
 	}
 
-	if (ev.type != KEY_PRESS)
+	if (ev.type != CEV_KEY || ev.ev.key.type != KEY_PRESS)
 		return false;
 
-	*key = ev.c;
+	*key = ev.ev.key.c;
 
 	return true;
Index: uspace/app/nettest1/nettest1.c
===================================================================
--- uspace/app/nettest1/nettest1.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/nettest1/nettest1.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -46,4 +46,5 @@
 #include <arg_parse.h>
 
+#include <inet/dnsr.h>
 #include <net/in.h>
 #include <net/in6.h>
@@ -75,5 +76,5 @@
 	printf(
 	    "Network Networking test 1 aplication - sockets\n"
-	    "Usage: echo [options] numeric_address\n"
+	    "Usage: nettest1 [options] host\n"
 	    "Where options are:\n"
 	    "-f protocol_family | --family=protocol_family\n"
@@ -290,4 +291,5 @@
 	struct sockaddr_in address_in;
 	struct sockaddr_in6 address_in6;
+	dnsr_hostinfo_t *hinfo;
 	uint8_t *address_start;
 
@@ -319,7 +321,7 @@
 	}
 
-	/* If not before the last argument containing the address */
+	/* If not before the last argument containing the host */
 	if (index >= argc) {
-		printf("Command line error: missing address\n");
+		printf("Command line error: missing host name\n");
 		nettest1_print_help();
 		return EINVAL;
@@ -348,9 +350,15 @@
 	}
 
-	/* Parse the last argument which should contain the address */
+	/* Parse the last argument which should contain the host/address */
 	rc = inet_pton(family, argv[argc - 1], address_start);
 	if (rc != EOK) {
-		fprintf(stderr, "Address parse error %d\n", rc);
-		return rc;
+		/* Try interpreting as a host name */
+		rc = dnsr_name2host(argv[argc - 1], &hinfo);
+		if (rc != EOK) {
+			printf("Error resolving host '%s'.\n", argv[argc - 1]);
+			return rc;
+		}
+
+		address_in.sin_addr.s_addr = host2uint32_t_be(hinfo->addr.ipv4);
 	}
 
Index: uspace/app/nettest2/nettest2.c
===================================================================
--- uspace/app/nettest2/nettest2.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/nettest2/nettest2.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -47,4 +47,5 @@
 #include <stdbool.h>
 
+#include <inet/dnsr.h>
 #include <net/in.h>
 #include <net/in6.h>
@@ -71,5 +72,5 @@
 	printf(
 	    "Network Networking test 2 aplication - UDP transfer\n"
-	    "Usage: echo [options] address\n"
+	    "Usage: nettest2 [options] host\n"
 	    "Where options are:\n"
 	    "-f protocol_family | --family=protocol_family\n"
@@ -227,4 +228,5 @@
 	struct sockaddr_in address_in;
 	struct sockaddr_in6 address_in6;
+	dnsr_hostinfo_t *hinfo;
 	socklen_t addrlen;
 	uint8_t *address_start;
@@ -265,7 +267,7 @@
 	}
 
-	/* If not before the last argument containing the address */
+	/* If not before the last argument containing the host */
 	if (index >= argc) {
-		printf("Command line error: missing address\n");
+		printf("Command line error: missing host name\n");
 		nettest2_print_help();
 		return EINVAL;
@@ -294,9 +296,15 @@
 	}
 
-	/* Parse the last argument which should contain the address. */
+	/* Parse the last argument which should contain the host/address */
 	rc = inet_pton(family, argv[argc - 1], address_start);
 	if (rc != EOK) {
-		fprintf(stderr, "Address parse error %d\n", rc);
-		return rc;
+		/* Try interpreting as a host name */
+		rc = dnsr_name2host(argv[argc - 1], &hinfo);
+		if (rc != EOK) {
+			printf("Error resolving host '%s'.\n", argv[argc - 1]);
+			return rc;
+		}
+
+		address_in.sin_addr.s_addr = host2uint32_t_be(hinfo->addr.ipv4);
 	}
 
Index: uspace/app/nettest3/nettest3.c
===================================================================
--- uspace/app/nettest3/nettest3.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/nettest3/nettest3.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -39,4 +39,5 @@
 #include <str.h>
 
+#include <inet/dnsr.h>
 #include <net/in.h>
 #include <net/in6.h>
@@ -60,4 +61,5 @@
 	int fd;
 	char *endptr;
+	dnsr_hostinfo_t *hinfo;
 
 	port = 7;
@@ -75,6 +77,13 @@
 		rc = inet_pton(AF_INET, argv[1], (uint8_t *)&addr.sin_addr.s_addr);
 		if (rc != EOK) {
-			fprintf(stderr, "Error parsing address\n");
-			return 1;
+			/* Try interpreting as a host name */
+			rc = dnsr_name2host(argv[1], &hinfo);
+			if (rc != EOK) {
+				printf("Error resolving host '%s'.\n", argv[1]);
+				return rc;
+			}
+
+			addr.sin_addr.s_addr = host2uint32_t_be(hinfo->addr.ipv4);
+			addr.sin_family = AF_INET;
 		}
 		printf("result: rc=%d, family=%d, addr=%x\n", rc,
Index: uspace/app/nterm/conn.c
===================================================================
--- uspace/app/nterm/conn.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/nterm/conn.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -33,7 +33,9 @@
  */
 
+#include <byteorder.h>
 #include <stdbool.h>
 #include <errno.h>
 #include <fibril.h>
+#include <inet/dnsr.h>
 #include <net/socket.h>
 #include <stdio.h>
@@ -74,4 +76,5 @@
 {
 	struct sockaddr_in addr;
+	dnsr_hostinfo_t *hinfo = NULL;
 	int rc;
 	char *endptr;
@@ -81,6 +84,12 @@
 	rc = inet_pton(addr.sin_family, addr_s, (uint8_t *)&addr.sin_addr);
 	if (rc != EOK) {
-		printf("Invalid addres %s\n", addr_s);
-		return EINVAL;
+		/* Try interpreting as a host name */
+		rc = dnsr_name2host(addr_s, &hinfo);
+		if (rc != EOK) {
+			printf("Error resolving host '%s'.\n", addr_s);
+			goto error;
+		}
+
+		addr.sin_addr.s_addr = host2uint32_t_be(hinfo->addr.ipv4);
 	}
 
@@ -88,5 +97,5 @@
 	if (*endptr != '\0') {
 		printf("Invalid port number %s\n", port_s);
-		return EINVAL;
+		goto error;
 	}
 
@@ -95,5 +104,5 @@
 		goto error;
 
-	printf("Connecting to address %s port %u\n", addr_s, ntohs(addr.sin_port));
+	printf("Connecting to host %s port %u\n", addr_s, ntohs(addr.sin_port));
 
 	rc = connect(conn_fd, (struct sockaddr *)&addr, sizeof(addr));
Index: uspace/app/nterm/nterm.c
===================================================================
--- uspace/app/nterm/nterm.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/nterm/nterm.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -104,10 +104,10 @@
 static void print_syntax(void)
 {
-	printf("syntax: nterm <ip-address> <port>\n");
+	printf("syntax: nterm <host> <port>\n");
 }
 
 int main(int argc, char *argv[])
 {
-	kbd_event_t ev;
+	cons_event_t ev;
 	int rc;
 
@@ -129,7 +129,7 @@
 	done = false;
 	while (!done) {
-		console_get_kbd_event(con, &ev);
-		if (ev.type == KEY_PRESS)
-			key_handle(&ev);
+		console_get_event(con, &ev);
+		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS)
+			key_handle(&ev.ev.key);
 	}
 
Index: uspace/app/ping/ping.c
===================================================================
--- uspace/app/ping/ping.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/ping/ping.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jiri Svoboda
+ * Copyright (c) 2013 Jiri Svoboda
  * All rights reserved.
  *
@@ -37,4 +37,6 @@
 #include <errno.h>
 #include <fibril_synch.h>
+#include <inet/dnsr.h>
+#include <inet/addr.h>
 #include <inet/inetping.h>
 #include <io/console.h>
@@ -68,46 +70,5 @@
 static void print_syntax(void)
 {
-	printf("syntax: " NAME " [-r] <addr>\n");
-}
-
-static int addr_parse(const char *text, inet_addr_t *addr)
-{
-	unsigned long a[4];
-	char *cp = (char *)text;
-	int i;
-
-	for (i = 0; i < 3; i++) {
-		a[i] = strtoul(cp, &cp, 10);
-		if (*cp != '.')
-			return EINVAL;
-		++cp;
-	}
-
-	a[3] = strtoul(cp, &cp, 10);
-	if (*cp != '\0')
-		return EINVAL;
-
-	addr->ipv4 = 0;
-	for (i = 0; i < 4; i++) {
-		if (a[i] > 255)
-			return EINVAL;
-		addr->ipv4 = (addr->ipv4 << 8) | a[i];
-	}
-
-	return EOK;
-}
-
-static int addr_format(inet_addr_t *addr, char **bufp)
-{
-	int rc;
-
-	rc = asprintf(bufp, "%d.%d.%d.%d", addr->ipv4 >> 24,
-	    (addr->ipv4 >> 16) & 0xff, (addr->ipv4 >> 8) & 0xff,
-	    addr->ipv4 & 0xff);
-
-	if (rc < 0)
-		return ENOMEM;
-
-	return EOK;
+	printf("syntax: " NAME " [-r] <host>\n");
 }
 
@@ -125,9 +86,9 @@
 	int rc;
 
-	rc = addr_format(&sdu->src, &asrc);
+	rc = inet_addr_format(&sdu->src, &asrc);
 	if (rc != EOK)
 		return ENOMEM;
 
-	rc = addr_format(&sdu->dest, &adest);
+	rc = inet_addr_format(&sdu->dest, &adest);
 	if (rc != EOK) {
 		free(asrc);
@@ -188,5 +149,5 @@
 {
 	console_ctrl_t *con;
-	kbd_event_t ev;
+	cons_event_t ev;
 
 	con = console_init(stdin, stdout);
@@ -194,11 +155,12 @@
 
 	while (true) {
-		if (!console_get_kbd_event(con, &ev))
+		if (!console_get_event(con, &ev))
 			break;
 
-		if (ev.type == KEY_PRESS && (ev.mods & (KM_ALT | KM_SHIFT)) ==
-		    0 && (ev.mods & KM_CTRL) != 0) {
+		if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS &&
+		    (ev.ev.key.mods & (KM_ALT | KM_SHIFT)) ==
+		    0 && (ev.ev.key.mods & KM_CTRL) != 0) {
 			/* Ctrl+key */
-			if (ev.key == KC_Q) {
+			if (ev.ev.key.key == KC_Q) {
 				ping_signal_done();
 				return 0;
@@ -212,4 +174,8 @@
 int main(int argc, char *argv[])
 {
+	dnsr_hostinfo_t *hinfo = NULL;
+	char *asrc = NULL;
+	char *adest = NULL;
+	char *sdest = NULL;
 	int rc;
 	int argi;
@@ -219,5 +185,5 @@
 		printf(NAME ": Failed connecting to internet ping service "
 		    "(%d).\n", rc);
-		return 1;
+		goto error;
 	}
 
@@ -232,13 +198,18 @@
 	if (argc - argi != 1) {
 		print_syntax();
-		return 1;
+		goto error;
 	}
 
 	/* Parse destination address */
-	rc = addr_parse(argv[argi], &dest_addr);
-	if (rc != EOK) {
-		printf(NAME ": Invalid address format.\n");
-		print_syntax();
-		return 1;
+	rc = inet_addr_parse(argv[argi], &dest_addr);
+	if (rc != EOK) {
+		/* Try interpreting as a host name */
+		rc = dnsr_name2host(argv[argi], &hinfo);
+		if (rc != EOK) {
+			printf(NAME ": Error resolving host '%s'.\n", argv[argi]);
+			goto error;
+		}
+
+		dest_addr = hinfo->addr;
 	}
 
@@ -247,6 +218,32 @@
 	if (rc != EOK) {
 		printf(NAME ": Failed determining source address.\n");
-		return 1;
-	}
+		goto error;
+	}
+
+	rc = inet_addr_format(&src_addr, &asrc);
+	if (rc != EOK) {
+		printf(NAME ": Out of memory.\n");
+		goto error;
+	}
+
+	rc = inet_addr_format(&dest_addr, &adest);
+	if (rc != EOK) {
+		printf(NAME ": Out of memory.\n");
+		goto error;
+	}
+
+	if (hinfo != NULL) {
+		rc = asprintf(&sdest, "%s (%s)", hinfo->cname, adest);
+		if (rc < 0) {
+			printf(NAME ": Out of memory.\n");
+			goto error;
+		}
+	} else {
+		sdest = adest;
+		adest = NULL;
+	}
+
+	printf("Sending ICMP echo request from %s to %s.\n",
+	    asrc, sdest);
 
 	fid_t fid;
@@ -256,5 +253,5 @@
 		if (fid == 0) {
 			printf(NAME ": Failed creating transmit fibril.\n");
-			return 1;
+			goto error;
 		}
 
@@ -264,5 +261,5 @@
 		if (fid == 0) {
 			printf(NAME ": Failed creating input fibril.\n");
-			return 1;
+			goto error;
 		}
 
@@ -282,8 +279,18 @@
 	if (rc == ETIMEOUT) {
 		printf(NAME ": Echo request timed out.\n");
-		return 1;
-	}
-
+		goto error;
+	}
+
+	free(asrc);
+	free(adest);
+	free(sdest);
+	dnsr_hostinfo_destroy(hinfo);
 	return 0;
+error:
+	free(asrc);
+	free(adest);
+	free(sdest);
+	dnsr_hostinfo_destroy(hinfo);
+	return 1;
 }
 
Index: uspace/app/taskdump/symtab.c
===================================================================
--- uspace/app/taskdump/symtab.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/taskdump/symtab.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -267,5 +267,5 @@
 			continue;
 
-		if (best_name == NULL || (saddr <= addr && saddr > best_addr)) {
+		if (saddr <= addr && (best_name == NULL || saddr > best_addr)) {
 			best_name = sname;
 			best_addr = saddr;
Index: uspace/app/tester/ipc/starve.c
===================================================================
--- uspace/app/tester/ipc/starve.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/tester/ipc/starve.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -62,9 +62,9 @@
 			break;
 		
-		kbd_event_t ev;
+		cons_event_t ev;
 		suseconds_t timeout = 0;
-		bool has_event = console_get_kbd_event_timeout(console, &ev, &timeout);
-		if (has_event && (ev.type == KEY_PRESS)) {
-			TPRINTF("Key %d pressed, terminating.\n", ev.key);
+		bool has_event = console_get_event_timeout(console, &ev, &timeout);
+		if (has_event && ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) {
+			TPRINTF("Key %d pressed, terminating.\n", ev.ev.key.key);
 			break;
 		}
Index: uspace/app/tetris/scores.c
===================================================================
--- uspace/app/tetris/scores.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/tetris/scores.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -125,5 +125,6 @@
 	int j;
 	size_t off;
-	kbd_event_t ev;
+	cons_event_t ev;
+	kbd_event_t *kev;
 	
 	clear_screen();
@@ -141,14 +142,16 @@
 	while (1) {
 		console_flush(console);
-		if (!console_get_kbd_event(console, &ev))
+		if (!console_get_event(console, &ev))
 			exit(1);
 		
-		if (ev.type == KEY_RELEASE)
+		if (ev.type != CEV_KEY || ev.ev.key.type == KEY_RELEASE)
 			continue;
 		
-		if (ev.key == KC_ENTER || ev.key == KC_NENTER)
+		kev = &ev.ev.key;
+		
+		if (kev->key == KC_ENTER || kev->key == KC_NENTER)
 			break;
 		
-		if (ev.key == KC_BACKSPACE) {
+		if (kev->key == KC_BACKSPACE) {
 			if (i > 0) {
 				wchar_t uc;
@@ -166,7 +169,7 @@
 				scores[NUMSPOTS - 1].hs_name[off] = '\0';
 			}
-		} else if (ev.c != '\0') {
+		} else if (kev->c != '\0') {
 			if (i < (MAXLOGNAME - 1)) {
-				if (chr_encode(ev.c, scores[NUMSPOTS - 1].hs_name,
+				if (chr_encode(kev->c, scores[NUMSPOTS - 1].hs_name,
 				    &off, STR_BOUNDS(MAXLOGNAME) + 1) == EOK) {
 					++i;
Index: uspace/app/tetris/screen.c
===================================================================
--- uspace/app/tetris/screen.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/tetris/screen.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -344,7 +344,7 @@
 	
 	while (timeout > 0) {
-		kbd_event_t event;
-		
-		if (!console_get_kbd_event_timeout(console, &event, &timeout))
+		cons_event_t event;
+		
+		if (!console_get_event_timeout(console, &event, &timeout))
 			break;
 	}
@@ -376,13 +376,13 @@
 	
 	while (c == 0) {
-		kbd_event_t event;
-		
-		if (!console_get_kbd_event_timeout(console, &event, &timeleft)) {
+		cons_event_t event;
+		
+		if (!console_get_event_timeout(console, &event, &timeleft)) {
 			timeleft = 0;
 			return -1;
 		}
 		
-		if (event.type == KEY_PRESS)
-			c = event.c;
+		if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS)
+			c = event.ev.key.c;
 	}
 	
@@ -398,11 +398,11 @@
 	
 	while (c == 0) {
-		kbd_event_t event;
-		
-		if (!console_get_kbd_event(console, &event))
+		cons_event_t event;
+		
+		if (!console_get_event(console, &event))
 			return -1;
 		
-		if (event.type == KEY_PRESS)
-			c = event.c;
+		if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS)
+			c = event.ev.key.c;
 	}
 	
Index: uspace/app/top/screen.c
===================================================================
--- uspace/app/top/screen.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/top/screen.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -556,8 +556,8 @@
 	
 	while (c == 0) {
-		kbd_event_t event;
+		cons_event_t event;
 		
 		warning_timeleft -= timeleft;
-		if (!console_get_kbd_event_timeout(console, &event, &timeleft)) {
+		if (!console_get_event_timeout(console, &event, &timeleft)) {
 			timeleft = 0;
 			return -1;
@@ -565,6 +565,6 @@
 		warning_timeleft += timeleft;
 		
-		if (event.type == KEY_PRESS)
-			c = event.c;
+		if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS)
+			c = event.ev.key.c;
 	}
 	
Index: uspace/app/trace/ipc_desc.c
===================================================================
--- uspace/app/trace/ipc_desc.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/trace/ipc_desc.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -49,8 +49,7 @@
 	{ IPC_M_DATA_READ,        "DATA_READ" },
 	{ IPC_M_DEBUG,            "DEBUG" },
-	
-	/* Terminating entry */
-	{ 0, NULL }
 };
+
+size_t ipc_methods_len = sizeof(ipc_methods) / sizeof(ipc_m_desc_t);
 
 /** @}
Index: uspace/app/trace/ipc_desc.h
===================================================================
--- uspace/app/trace/ipc_desc.h	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/trace/ipc_desc.h	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -42,4 +42,5 @@
 
 extern ipc_m_desc_t ipc_methods[];
+extern size_t ipc_methods_len;
 
 #endif
Index: uspace/app/trace/ipcp.c
===================================================================
--- uspace/app/trace/ipcp.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/trace/ipcp.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -140,7 +140,4 @@
 void ipcp_init(void)
 {
-	ipc_m_desc_t *desc;
-	oper_t *oper;
-
 	val_type_t arg_def[OPER_MAX_ARGS] = {
 		V_INTEGER,
@@ -162,11 +159,8 @@
 	proto_system = proto_new("system");
 
-	desc = ipc_methods;
-	while (desc->number != 0) {
-		oper = oper_new(desc->name, OPER_MAX_ARGS, arg_def, V_INTEGER,
-			OPER_MAX_ARGS, arg_def);
-		proto_add_oper(proto_system, desc->number, oper);
-
-		++desc;
+	for (size_t i = 0; i < ipc_methods_len; i++) {
+		oper_t *oper = oper_new(ipc_methods[i].name, OPER_MAX_ARGS,
+		    arg_def, V_INTEGER, OPER_MAX_ARGS, arg_def);
+		proto_add_oper(proto_system, ipc_methods[i].number, oper);
 	}
 
Index: uspace/app/trace/syscalls.c
===================================================================
--- uspace/app/trace/syscalls.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/trace/syscalls.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -46,4 +46,5 @@
 
     [SYS_TASK_GET_ID] = { "task_get_id",		1,	V_ERRNO },
+    [SYS_TASK_SET_NAME] = { "task_set_name", 		2,	V_ERRNO },
     [SYS_FUTEX_SLEEP] = { "futex_sleep_timeout",	3,	V_ERRNO },
     [SYS_FUTEX_WAKEUP] = { "futex_wakeup",		1,	V_ERRNO },
@@ -82,4 +83,6 @@
 };
 
+const size_t syscall_desc_len = (sizeof(syscall_desc) / sizeof(sc_desc_t));
+
 /** @}
  */
Index: uspace/app/trace/syscalls.h
===================================================================
--- uspace/app/trace/syscalls.h	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/trace/syscalls.h	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -36,4 +36,7 @@
 #define SYSCALLS_H_
 
+#include <stdbool.h>
+#include <unistd.h>
+
 #include "trace.h"
 
@@ -45,4 +48,10 @@
 
 extern const sc_desc_t syscall_desc[];
+extern const size_t syscall_desc_len;
+
+static inline bool syscall_desc_defined(unsigned sc_id)
+{
+	return (sc_id < syscall_desc_len && syscall_desc[sc_id].name != NULL);
+}
 
 #endif
Index: uspace/app/trace/trace.c
===================================================================
--- uspace/app/trace/trace.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/trace/trace.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -136,5 +136,4 @@
 	}
 
-	free(task_ldr);
 	task_ldr = NULL;
 
@@ -348,6 +347,12 @@
 	if ((display_mask & DM_SYSCALL) != 0) {
 		/* Print syscall name and arguments */
-		printf("%s", syscall_desc[sc_id].name);
-		print_sc_args(sc_args, syscall_desc[sc_id].n_args);
+		if (syscall_desc_defined(sc_id)) {
+			printf("%s", syscall_desc[sc_id].name);
+			print_sc_args(sc_args, syscall_desc[sc_id].n_args);
+		}
+		else {
+			printf("unknown_syscall<%d>", sc_id);
+			print_sc_args(sc_args, 6);
+		}
 	}
 }
@@ -372,5 +377,8 @@
 	if ((display_mask & DM_SYSCALL) != 0) {
 		/* Print syscall return value */
-		rv_type = syscall_desc[sc_id].rv_type;
+		if (syscall_desc_defined(sc_id))
+			rv_type = syscall_desc[sc_id].rv_type;
+		else
+			rv_type = V_PTR;
 		print_sc_retval(sc_rc, rv_type);
 	}
@@ -497,5 +505,5 @@
 	ldr = loader_connect();
 	if (ldr == NULL)
-		return 0;
+		return NULL;
 
 	/* Get task ID. */
@@ -557,4 +565,6 @@
 static int cev_fibril(void *arg)
 {
+	cons_event_t event;
+
 	(void) arg;
 	
@@ -567,11 +577,14 @@
 		fibril_mutex_unlock(&state_lock);
 		
-		if (!console_get_kbd_event(console, &cev))
+		if (!console_get_event(console, &event))
 			return -1;
 		
-		fibril_mutex_lock(&state_lock);
-		cev_valid = true;
-		fibril_condvar_broadcast(&state_cv);
-		fibril_mutex_unlock(&state_lock);
+		if (event.type == CEV_KEY) {
+			fibril_mutex_lock(&state_lock);
+			cev = event.ev.key;
+			cev_valid = true;
+			fibril_condvar_broadcast(&state_cv);
+			fibril_mutex_unlock(&state_lock);
+		}
 	}
 }
Index: uspace/app/vdemo/vdemo.c
===================================================================
--- uspace/app/vdemo/vdemo.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/vdemo/vdemo.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -141,8 +141,8 @@
 		    lbl_action->cancel);
 
-		grid->add(grid, &lbl_action->label.widget, 0, 0, 1, 2);
-		grid->add(grid, &btn_confirm->widget, 1, 0, 1, 1);
+		grid->add(grid, &lbl_action->label.widget, 0, 0, 2, 1);
+		grid->add(grid, &btn_confirm->widget, 0, 1, 1, 1);
 		grid->add(grid, &btn_cancel->widget, 1, 1, 1, 1);
-		window_resize(main_window, 200, 70);
+		window_resize(main_window, 200, 76);
 
 		window_exec(main_window);
Index: uspace/app/vlaunch/Makefile
===================================================================
--- uspace/app/vlaunch/Makefile	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/vlaunch/Makefile	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -35,5 +35,15 @@
 
 SOURCES = \
-	vlaunch.c
+	vlaunch.c \
+	images.c
+
+IMAGES = \
+	gfx/helenos.tga
+
+PRE_DEPEND = images.c images.h
+EXTRA_CLEAN = images.c images.h
 
 include $(USPACE_PREFIX)/Makefile.common
+
+images.c images.h: $(IMAGES)
+	$(ROOT_PATH)/tools/mkarray.py images COMPOSITOR_IMAGES $^
Index: uspace/app/vlaunch/vlaunch.c
===================================================================
--- uspace/app/vlaunch/vlaunch.c	(revision d120133ee86d737fdfb6746d53beb5cfd4d4c243)
+++ uspace/app/vlaunch/vlaunch.c	(revision 192565bb8d97d3d2b9c03b06e4ed08402ecbbccf)
@@ -46,6 +46,17 @@
 #include <button.h>
 #include <label.h>
+#include <canvas.h>
 
-#define NAME "vlaunch"
+#include <surface.h>
+#include <source.h>
+#include <drawctx.h>
+#include <codec/tga.h>
+
+#include "images.h"
+
+#define NAME  "vlaunch"
+
+#define LOGO_WIDTH   196
+#define LOGO_HEIGHT  66
 
 static char *winreg = NULL;
@@ -97,4 +108,10 @@
 	}
 	
+	surface_t *logo = decode_tga((void *) helenos_tga, helenos_tga_size, 0);
+	if (!logo) {
+		printf("Unable to decode logo.\n");
+		return 1;
+	}
+	
 	winreg = argv[1];
 	window_t *main_window = window_open(argv[1], true, true, "vlaunch", 0, 0);
@@ -104,10 +121,12 @@
 	}
 	
-	pixel_t grd_bg = PIXEL(255, 240, 240, 240);
+	pixel_t grd_bg = PIXEL(255, 255, 255, 255);
 	pixel_t btn_bg = PIXEL(255, 0, 0, 0);
 	pixel_t btn_fg = PIXEL(255, 240, 240, 240);
-	pixel_t lbl_bg = PIXEL(255, 240, 240, 240);
+	pixel_t lbl_bg = PIXEL(255, 255, 255, 255);
 	pixel_t lbl_fg = PIXEL(255, 0, 0, 0);
 	
+	canvas_t *logo_canvas = create_canvas(NULL, LOGO_WIDTH, LOGO_HEIGHT,
+	    logo);
 	label_t *lbl_caption = create_label(NULL, "Launch application:", 16,
 	    lbl_bg, lbl_fg);
@@ -118,8 +137,8 @@
 	button_t *btn_vlaunch = create_button(NULL, "vlaunch", 16, btn_bg,
 	    btn_fg);
-	grid_t *grid = create_grid(window_root(main_window), 4, 1, grd_bg);
+	grid_t *grid = create_grid(window_root(main_window), 1, 5, grd_bg);
 	
-	if ((!lbl_caption) || (!btn_vterm) || (!btn_vdemo) ||
-	    (!btn_vlaunch) || (!grid)) {
+	if ((!logo_canvas) || (!lbl_caption) || (!btn_vterm) ||
+	    (!btn_vdemo) || (!btn_vlaunch) || (!grid)) {
 		window_close(main_window);
 		printf("Cannot create widgets.\n");
@@ -131,11 +150,13 @@
 	sig_connect(&btn_vlaunch->clicked, NULL, on_vlaunch);
 	
-	grid->add(grid, &lbl_caption->widget, 0, 0, 1, 1);
-	grid->add(grid, &btn_vterm->widget, 1, 0, 1, 1);
-	grid->add(grid, &btn_vdemo->widget, 2, 0, 1, 1);
-	grid->add(grid, &btn_vlaunch->widget, 3, 0, 1, 1);
+	grid->add(grid, &logo_canvas->widget, 0, 0, 1, 1);
+	grid->add(grid, &lbl_caption->widget, 0, 1, 1, 1);
+	grid->add(grid, &btn_vterm->widget, 0, 2, 1, 1);
+	grid->add(grid, &btn_vdemo->widget, 0, 3, 1, 1);
+	grid->add(grid, &btn_vlaunch->widget, 0, 4, 1, 1);
 	
-	window_resize(main_window, 180, 130);
+	window_resize(main_window, 210, 130 + LOGO_HEIGHT);
 	window_exec(main_window);
+	
 	task_retval(0);
 	async_manager();
