Index: src/libcfa/concurrency/coroutines.c
===================================================================
--- src/libcfa/concurrency/coroutines.c	(revision 35dd180fa5a918887f22a8145dac7984b875d0d4)
+++ src/libcfa/concurrency/coroutines.c	(revision 8f49a54ffd2ebee0164eb91c530d7625a9d1f910)
@@ -100,6 +100,4 @@
 // is not inline (We can't inline Cforall in C)
 void suspend_no_inline(void) {
-	LIB_DEBUG_PRINTF("Suspending back : to %p from %p\n", this_coroutine(), this_coroutine() ? this_coroutine()->last : (void*)-1);
-
 	suspend();
 }
Index: src/libcfa/concurrency/invoke.c
===================================================================
--- src/libcfa/concurrency/invoke.c	(revision 35dd180fa5a918887f22a8145dac7984b875d0d4)
+++ src/libcfa/concurrency/invoke.c	(revision 8f49a54ffd2ebee0164eb91c530d7625a9d1f910)
@@ -33,4 +33,7 @@
       main( this );
 
+      cor->state = Halt;
+      cor->notHalted = false;
+
       //Final suspend, should never return
       __suspend_no_inline__F___1();
@@ -54,4 +57,6 @@
       main( this );
 
+      cor->state = Halt;
+      cor->notHalted = false;
       __scheduler_remove__F_P9sthread_h__1(thrd);
 
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision 35dd180fa5a918887f22a8145dac7984b875d0d4)
+++ src/libcfa/concurrency/kernel.c	(revision 8f49a54ffd2ebee0164eb91c530d7625a9d1f910)
@@ -119,9 +119,9 @@
 	// context switch to specified coroutine
 	// Which is now the current_coroutine
-	LIB_DEBUG_PRINTF("Kernel : switching to ctx %p (from %p, current %p)\n", thrd_ctx, proc_ctx, current_coroutine);
+	// LIB_DEBUG_PRINTF("Kernel : switching to ctx %p (from %p, current %p)\n", thrd_ctx, proc_ctx, current_coroutine);
 	current_coroutine = thrd_ctx;
 	CtxSwitch( proc_ctx->stack.context, thrd_ctx->stack.context );
 	current_coroutine = proc_ctx;
-	LIB_DEBUG_PRINTF("Kernel : returned from ctx %p (to %p, current %p)\n", thrd_ctx, proc_ctx, current_coroutine);
+	// LIB_DEBUG_PRINTF("Kernel : returned from ctx %p (to %p, current %p)\n", thrd_ctx, proc_ctx, current_coroutine);
 
 	// when CtxSwitch returns we are back in the processor coroutine
@@ -136,5 +136,4 @@
 
 void scheduler_add( thread_h * thrd ) {
-	LIB_DEBUG_PRINTF("Kernel : scheduling %p on core %p (%d spots)\n", thrd, systemProcessor, systemProcessor->thread_count);
 	for(int i = 0; i < systemProcessor->thread_count; i++) {
 		if(systemProcessor->threads[i] == NULL) {
@@ -143,22 +142,15 @@
 		}
 	}
-	assert(false);
+	assertf(false, "Scheduler full");
 }
 
 void scheduler_remove( thread_h * thrd ) {
-	LIB_DEBUG_PRINTF("Kernel : unscheduling %p from core %p\n", thrd, systemProcessor);
 	for(int i = 0; i < systemProcessor->thread_count; i++) {
 		if(systemProcessor->threads[i] == thrd) {
 			systemProcessor->threads[i] = NULL;
-			break;
-		}
-	}
-	for(int i = 0; i < systemProcessor->thread_count; i++) {
-		if(systemProcessor->threads[i] != NULL) {
 			return;
 		}
 	}
-	LIB_DEBUG_PRINTF("Kernel : terminating core %p\n", systemProcessor);	
-	systemProcessor->terminated = true;
+	assertf(false, "Trying to unschedule unkown thread");
 }
 
@@ -229,10 +221,10 @@
 
 	mainThread_info_t ctx;
-	LIB_DEBUG_PRINTF("Kernel :    base : %p\n", ctx.base );
-	LIB_DEBUG_PRINTF("Kernel :     top : %p\n", ctx.top );
-	LIB_DEBUG_PRINTF("Kernel :   limit : %p\n", ctx.limit );
-	LIB_DEBUG_PRINTF("Kernel :    size : %x\n", ctx.size );
-	LIB_DEBUG_PRINTF("Kernel : storage : %p\n", ctx.storage );
-	LIB_DEBUG_PRINTF("Kernel : context : %p\n", ctx.context );
+	// LIB_DEBUG_PRINTF("Kernel :    base : %p\n", ctx.base );
+	// LIB_DEBUG_PRINTF("Kernel :     top : %p\n", ctx.top );
+	// LIB_DEBUG_PRINTF("Kernel :   limit : %p\n", ctx.limit );
+	// LIB_DEBUG_PRINTF("Kernel :    size : %x\n", ctx.size );
+	// LIB_DEBUG_PRINTF("Kernel : storage : %p\n", ctx.storage );
+	// LIB_DEBUG_PRINTF("Kernel : context : %p\n", ctx.context );
 
 	// Start by initializing the main thread
@@ -265,8 +257,10 @@
 	scheduler_remove(mainThread);
 
-	LIB_DEBUG_PRINTF("Suspending main\n");
+	LIB_DEBUG_PRINTF("Kernel : Terminating system processor\n");		
+	systemProcessor->terminated = true;
+
 	suspend();
 
-	LIB_DEBUG_PRINTF("Kernel : Control return to initial process thread\n");
+	LIB_DEBUG_PRINTF("Kernel : Control returned to initial process thread\n");
 
 	^(systemProcessor->ctx){};
Index: src/libcfa/concurrency/threads
===================================================================
--- src/libcfa/concurrency/threads	(revision 35dd180fa5a918887f22a8145dac7984b875d0d4)
+++ src/libcfa/concurrency/threads	(revision 8f49a54ffd2ebee0164eb91c530d7625a9d1f910)
@@ -33,4 +33,6 @@
 	void ^?{}(T*);*/
 };
+
+#define DECL_THREAD(X) static inline thread_h* get_thread(X* this) { return &this->t; } void main(X* this);
 
 forall(otype T | is_thread(T) )
Index: src/libcfa/concurrency/threads.c
===================================================================
--- src/libcfa/concurrency/threads.c	(revision 35dd180fa5a918887f22a8145dac7984b875d0d4)
+++ src/libcfa/concurrency/threads.c	(revision 8f49a54ffd2ebee0164eb91c530d7625a9d1f910)
@@ -46,5 +46,4 @@
 forall(otype T | is_thread(T) )
 void ?{}( thread(T)* this ) {
-	printf("thread() ctor\n");
 	(&this->handle){};
 	start(this);
@@ -89,5 +88,9 @@
 forall(otype T | is_thread(T) )
 void stop( thread(T)* this ) {
-
+	T* handle  = &this->handle;
+	thread_h*  thrd_h = get_thread   (handle);
+	while( thrd_h->c.notHalted ) {
+		suspend();
+	}
 }
 
