Index: kernel/generic/include/adt/avl.h
===================================================================
--- kernel/generic/include/adt/avl.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/adt/avl.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -37,4 +37,5 @@
 
 #include <arch/types.h>
+#include <typedefs.h>
 
 /**
Index: kernel/generic/include/adt/list.h
===================================================================
--- kernel/generic/include/adt/list.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/adt/list.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -37,4 +37,5 @@
 
 #include <arch/types.h>
+#include <typedefs.h>
 
 /** Doubly linked list head and link type. */
Index: kernel/generic/include/console/klog.h
===================================================================
--- kernel/generic/include/console/klog.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * 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 genericklog
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_KLOG_H_
-#define KERN_KLOG_H_
-
-void klog_init(void);
-void klog_printf(const char *fmt, ...);
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/ddi/device.h
===================================================================
--- kernel/generic/include/ddi/device.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/ddi/device.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -36,4 +36,7 @@
 #define KERN_DEVICE_H_
 
+#include <arch/types.h>
+#include <typedefs.h>
+
 extern devno_t device_assign_devno(void);
 
Index: kernel/generic/include/interrupt.h
===================================================================
--- kernel/generic/include/interrupt.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/interrupt.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -41,5 +41,4 @@
 #include <proc/thread.h>
 #include <arch.h>
-#include <console/klog.h>
 #include <ddi/irq.h>
 
@@ -50,6 +49,6 @@
 	if (istate_from_uspace(istate)) { \
 		task_t *task = TASK; \
-		klog_printf("Task %llu killed due to an exception at %p.", task->taskid, istate_get_pc(istate)); \
-		klog_printf("  " cmd, ##__VA_ARGS__); \
+		printf("Task %" PRIu64 " killed due to an exception at %p.", task->taskid, istate_get_pc(istate)); \
+		printf("  " cmd, ##__VA_ARGS__); \
 		task_kill(task->taskid); \
 		thread_exit(); \
Index: kernel/generic/include/proc/task.h
===================================================================
--- kernel/generic/include/proc/task.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/proc/task.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -117,5 +117,4 @@
 extern task_t *task_create(as_t *as, char *name);
 extern void task_destroy(task_t *t);
-extern task_t *task_run_program(void *program_addr, char *name);
 extern task_t *task_find_by_id(task_id_t id);
 extern int task_kill(task_id_t id);
@@ -134,4 +133,5 @@
 
 extern unative_t sys_task_get_id(task_id_t *uspace_task_id);
+extern unative_t sys_task_spawn(void *image, size_t size);
 
 #endif
Index: kernel/generic/include/proc/thread.h
===================================================================
--- kernel/generic/include/proc/thread.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/proc/thread.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -249,4 +249,6 @@
 extern bool thread_exists(thread_t *t);
 
+extern thread_t *thread_create_program(void *program_addr, char *name);
+
 /** Fpu context slab cache. */
 extern slab_cache_t *fpu_context_slab;
Index: kernel/generic/include/stackarg.h
===================================================================
--- kernel/generic/include/stackarg.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/stackarg.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -53,7 +53,7 @@
 
 #define va_arg(ap, type) 		\
-	(*((type *)((ap).last + ((ap).pos  += sizeof(type) ) - sizeof(type))))
+	(*((type *)((ap).last + ((ap).pos += sizeof(type)) - sizeof(type))))
 
-#define va_copy(dst,src)       dst=src
+#define va_copy(dst, src) dst = src
 #define va_end(ap)
 
Index: kernel/generic/include/synch/spinlock.h
===================================================================
--- kernel/generic/include/synch/spinlock.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/synch/spinlock.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -111,6 +111,6 @@
 	if ((pname)++ > (value)) {					\
 		(pname) = 0;						\
-		printf("Deadlock probe %s: exceeded threshold %d\n",	\
-		    "cpu%d: function=%s, line=%d\n",			\
+		printf("Deadlock probe %s: exceeded threshold %u\n",	\
+		    "cpu%u: function=%s, line=%u\n",			\
 		    #pname, (value), CPU->id, __func__, __LINE__);	\
 	}
Index: kernel/generic/include/syscall/syscall.h
===================================================================
--- kernel/generic/include/syscall/syscall.h	(revision aac10f86e541e3924e4795fd3ab0341b0280a144)
+++ kernel/generic/include/syscall/syscall.h	(revision 271b5400c010d0eec9cf6495d6f78b10d98a17a2)
@@ -39,13 +39,19 @@
 	SYS_IO = 0,
 	SYS_TLS_SET = 1, /* Hardcoded in AMD64, IA32 uspace - fibril.S */
+	
 	SYS_THREAD_CREATE,
 	SYS_THREAD_EXIT,
 	SYS_THREAD_GET_ID,
+	
 	SYS_TASK_GET_ID,
+	SYS_TASK_SPAWN,
+	
 	SYS_FUTEX_SLEEP,
 	SYS_FUTEX_WAKEUP,
+	
 	SYS_AS_AREA_CREATE,
 	SYS_AS_AREA_RESIZE,
 	SYS_AS_AREA_DESTROY,
+	
 	SYS_IPC_CALL_SYNC_FAST,
 	SYS_IPC_CALL_SYNC_SLOW,
@@ -59,11 +65,15 @@
 	SYS_IPC_REGISTER_IRQ,
 	SYS_IPC_UNREGISTER_IRQ,
+	
 	SYS_CAP_GRANT,
 	SYS_CAP_REVOKE,
+	
 	SYS_PHYSMEM_MAP,
 	SYS_IOSPACE_ENABLE,
 	SYS_PREEMPT_CONTROL,
+	
 	SYS_SYSINFO_VALID,
 	SYS_SYSINFO_VALUE,
+	
 	SYS_DEBUG_ENABLE_CONSOLE,
 	SYSCALL_END
