Index: src/libcfa/concurrency/CtxSwitch-x86_64.S
===================================================================
--- src/libcfa/concurrency/CtxSwitch-x86_64.S	(revision d9c44c33df429b559731c041d43b7bee1cfcef97)
+++ src/libcfa/concurrency/CtxSwitch-x86_64.S	(revision 5c811054a9b733b08300e7eaa7910d929010469d)
@@ -81,7 +81,6 @@
 .globl	coInvokeStub
 coInvokeStub:
-	movq %rbx, %rdi
-	movq %r12, %rsi 
-	jmp *%r13
+	movq %rbx, %rdi 
+	jmp *%r12
 
 // Local Variables: //
Index: src/libcfa/concurrency/invoke.c
===================================================================
--- src/libcfa/concurrency/invoke.c	(revision d9c44c33df429b559731c041d43b7bee1cfcef97)
+++ src/libcfa/concurrency/invoke.c	(revision 5c811054a9b733b08300e7eaa7910d929010469d)
@@ -7,36 +7,26 @@
 #include "invoke.h"
 
-struct machine_context_t {
-	void *SP;
-	void *FP;
-	void *PC;
-};
-
-extern void coInvokeStub( void );
+#define __CFA_INVOKE_PRIVATE__
+#include "invoke.h"
 
 // magically invoke the "main" of the most derived class
 // Called from the kernel when starting a coroutine or task so must switch back to user mode.
-void __invokeCoroutine__F_P9scoVtablePv__1(struct coVtable *vtable, void* vthis)
+
+void invokeCoroutine(covptr_t* vthis)
 {
-      LIB_DEBUG_PRINTF("Invoke : Received %p (v %p)\n", vthis, vtable);
+      LIB_DEBUG_PRINTF("Invoke : Received %p (v %p)\n", vthis, *vthis);
 
-      struct coroutine* cor = vtable->this_coroutine(vthis);
+      struct coroutine* cor = get_coroutine( vthis );
 
       cor->state = Active;
 
-      vtable->main(vthis);
+      (*vthis)->main( get_object(vthis) );
 }
 
-void __startCoroutine__A0_1_0___this_coroutine__PFP10scoroutine_Pd0___co_main__PF_Pd0___vtable__PFP9scoVtable_Pd0__F_Pd0PF_P9scoVtablePv___1(
-      struct coroutine *(*this_coroutine)(void * ),
-      void (*co_main)(void *),
-      struct coVtable *(*get_vtable)(void *),
-      void *vthis,
-      void (*invoke)(struct coVtable *, void *)
-) {
-      LIB_DEBUG_PRINTF("StartCoroutine : Passing in %p (v %p) to %p\n", vthis, vtable, invoke);
 
-      struct coVtable * vtable = get_vtable( vthis );
-      struct coroutine* this = this_coroutine( vthis );
+void startCoroutine(covptr_t* vthis, void (*invoke)(covptr_t*)) {
+      LIB_DEBUG_PRINTF("StartCoroutine : Passing in %p (v %p) to %p\n", vthis, *vthis, invoke);
+
+      struct coroutine* this = get_coroutine( vthis );
       struct coStack_t* stack = &this->stack;
 
@@ -47,6 +37,6 @@
 	    void *rturn;				      // where to go on return from uSwitch
 	    void *dummyReturn;				// fake return compiler would have pushed on call to uInvoke
-	    void *argument[2];				// for 16-byte ABI, 16-byte alignment starts here
-	    void *padding[2];				// padding to force 16-byte alignment, as "base" is 16-byte aligned
+	    void *argument;				// for 16-byte ABI, 16-byte alignment starts here
+	    void *padding[3];				// padding to force 16-byte alignment, as "base" is 16-byte aligned
 	};
 
@@ -55,6 +45,5 @@
 
 	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->dummyReturn = NULL;
-	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->argument[0] = vtable; // argument to invoke
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->argument[1] = vthis;  // argument to invoke
+	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->argument = vthis;     // argument to invoke
 	((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->rturn = invoke;
 
@@ -72,7 +61,6 @@
       ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->dummyReturn = NULL;
       ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->rturn = coInvokeStub;
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[0] = vtable;
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[1] = vthis;
-      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[2] = invoke;
+      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[0] = vthis;
+      ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fixedRegisters[1] = invoke;
 #else
       #error Only __i386__ and __x86_64__ is supported for threads in cfa
Index: src/libcfa/concurrency/invoke.h
===================================================================
--- src/libcfa/concurrency/invoke.h	(revision d9c44c33df429b559731c041d43b7bee1cfcef97)
+++ src/libcfa/concurrency/invoke.h	(revision 5c811054a9b733b08300e7eaa7910d929010469d)
@@ -1,34 +1,75 @@
+#include <stdbool.h>
+#include <stdint.h>
 
+#ifdef __CFORALL__
+extern "C" {
+#endif
+
+#if ! defined(__CFA_INVOKE_PRIVATE__)
 #ifndef _INVOKE_H_
 #define _INVOKE_H_
 
-struct coVtable {
-      void (*main)(void*);
-      struct coroutine* (*this_coroutine)(void*);
-};
+      #define OFFSET_OF(type, field) ((intptr_t)( &((type*)0)->field))
+      #define VPTR_OFFSET(type, vptr, field) (OFFSET_OF(type, field) - OFFSET_OF(type, vptr))
 
-struct coStack_t {
-      unsigned int size;		// size of stack
-      void *storage;			// pointer to stack
-      void *limit;			// stack grows towards stack limit
-      void *base;				// base of stack
-      void *context;			// address of cfa_context_t
-      void *top;				// address of top of storage
-      bool userStack;	
-};
+      struct coVtable_t { 
+            void (*main)(void*);
+            intptr_t offset_coroutine;
+            intptr_t offset_object;
+      };
 
+      typedef struct coVtable_t* covptr_t;
 
-enum coroutine_state { Start, Inactive, Active, Halt };
+      static inline struct coroutine* get_coroutine(covptr_t* vthis) {
+            return (struct coroutine*) ( ((intptr_t)vthis) + ((intptr_t)(*vthis)->offset_coroutine) ); 
+      }
 
-struct coroutine {
-      struct coStack_t stack;
-      const char *name;			// textual name for coroutine/task, initialized by uC++ generated code
-      int errno_;				// copy of global UNIX variable errno
-      enum coroutine_state state;	      // current execution status for coroutine
-      bool notHalted;			// indicate if execuation state is not halted
+      static inline void* get_object(covptr_t* vthis) {
+            return (void*) ( ((intptr_t)vthis) + ((intptr_t)(*vthis)->offset_object) ); 
+      }
 
-      struct coroutine *starter;		// first coroutine to resume this one
-      struct coroutine *last;			// last coroutine to resume this one
-};
+      struct coStack_t {
+            unsigned int size;		// size of stack
+            void *storage;			// pointer to stack
+            void *limit;			// stack grows towards stack limit
+            void *base;				// base of stack
+            void *context;			// address of cfa_context_t
+            void *top;				// address of top of storage
+            bool userStack;	
+      };
 
+      enum coroutine_state { Start, Inactive, Active, Halt };
+
+      struct coroutine {
+            struct coStack_t stack;
+            const char *name;			// textual name for coroutine/task, initialized by uC++ generated code
+            int errno_;				// copy of global UNIX variable errno
+            enum coroutine_state state;	// current execution status for coroutine
+            bool notHalted;			// indicate if execuation state is not halted
+
+            struct coroutine *starter;	// first coroutine to resume this one
+            struct coroutine *last;		// last coroutine to resume this one
+      };
+
+      void invokeCoroutine(covptr_t* this);
+      void startCoroutine(covptr_t* this, void (*invoke)(covptr_t*));
 #endif //_INVOKE_H_
+#else //! defined(__CFA_INVOKE_PRIVATE__)
+#ifndef _INVOKE_PRIVATE_H_
+#define _INVOKE_PRIVATE_H_
+      
+     struct machine_context_t {
+            void *SP;
+            void *FP;
+            void *PC;
+      };
+
+      // assembler routines that performs the context switch
+      extern void coInvokeStub( void );
+      void CtxSwitch( void *from, void *to ) asm ("CtxSwitch");
+
+#endif //_INVOKE_PRIVATE_H_
+#endif //! defined(__CFA_INVOKE_PRIVATE__)
+#ifdef __CFORALL__
+}
+#endif
Index: src/libcfa/concurrency/threads
===================================================================
--- src/libcfa/concurrency/threads	(revision d9c44c33df429b559731c041d43b7bee1cfcef97)
+++ src/libcfa/concurrency/threads	(revision 5c811054a9b733b08300e7eaa7910d929010469d)
@@ -18,49 +18,15 @@
 #define __THREADS_H__
 
-#include <stdbool.h>
-
-extern "C" {
-      struct coVtable {
-            void (*main)(void*);
-            struct coroutine* (*this_coroutine)(void*);
-      };
-
-      struct coStack_t {
-            unsigned int size;		// size of stack
-            void *storage;			// pointer to stack
-            void *limit;			// stack grows towards stack limit
-            void *base;				// base of stack
-            void *context;			// address of cfa_context_t
-            void *top;				// address of top of storage
-            bool userStack;	
-      };
-
-
-      enum coroutine_state { Start, Inactive, Active, Halt };
-
-      struct coroutine {
-            coStack_t stack;
-            const char *name;			// textual name for coroutine/task, initialized by uC++ generated code
-            int errno_;				// copy of global UNIX variable errno
-            coroutine_state state;	      // current execution status for coroutine
-            bool notHalted;			// indicate if execuation state is not halted
-
-            coroutine *starter;		// first coroutine to resume this one
-            coroutine *last;			// last coroutine to resume this one
-      };
-}
+#include "invoke.h"
 
 void ?{}(coStack_t* this);
 
 void ?{}(coroutine* this);
+void ?{}(coroutine* this, covptr_t* object);
 
 trait coroutine_t(dtype T) {
-      coroutine* this_coroutine(T* this);
       void co_main(T* this);
-      coVtable* vtable(T* this);
+      covptr_t* vtable(T* this);
 };
-
-forall(dtype T | coroutine_t(T))
-void start(T* cor);
 
 void suspend(void);
Index: src/libcfa/concurrency/threads.c
===================================================================
--- src/libcfa/concurrency/threads.c	(revision d9c44c33df429b559731c041d43b7bee1cfcef97)
+++ src/libcfa/concurrency/threads.c	(revision 5c811054a9b733b08300e7eaa7910d929010469d)
@@ -27,23 +27,79 @@
 #include "libhdr.h"
 
-extern "C" { extern void coInvokeStub( void ); }
+#define __CFA_INVOKE_PRIVATE__
+#include "invoke.h"
 
 // minimum feasible stack size in bytes
 #define MinStackSize 1000
+static size_t pageSize = 0;				// architecture pagesize
 
 static coroutine main_coroutine;
 static coroutine* current_coroutine = &main_coroutine;
 
-extern "C" {
-	struct machine_context_t {
-		void *SP;
-		void *FP;
-		void *PC;
-	};
+coroutine* this_coroutine(void) {
+	return current_coroutine;
 }
 
-extern "C" { void CtxSwitch( void *from, void *to ) asm ("CtxSwitch"); }// assembler routine that performs the context switch
+void ctxSwitchDirect(coroutine* src, coroutine* dst);
+void create_stack( coStack_t* this, unsigned int storageSize );	// used by all constructors
 
-static size_t pageSize = 0;				// architecture pagesize
+void ?{}(coStack_t* this) {
+	this->size		= 10240;	// size of stack
+	this->storage	= NULL;	// pointer to stack
+	this->limit		= NULL;	// stack grows towards stack limit
+	this->base		= NULL;	// base of stack
+	this->context	= NULL;	// address of cfa_context_t
+	this->top		= NULL;	// address of top of storage
+	this->userStack	= false;	
+
+	create_stack(this, this->size);
+}
+
+void ?{}(coroutine* this)
+{
+	this->name = "Anonymous Coroutine";
+	this->errno_ = 0;
+	this->state = Start;
+      this->notHalted = true;
+	this->starter = NULL;
+	this->last = NULL;
+}
+
+void ?{}(coroutine* this, covptr_t* object)
+{
+	this{};
+
+	startCoroutine(object, invokeCoroutine);
+}
+
+void suspend() {
+      coroutine* src = this_coroutine();		// optimization
+
+	assertf( src->last != 0, 
+		"Attempt to suspend coroutine %.256s (%p) that has never been resumed.\n"
+		"Possible cause is a suspend executed in a member called by a coroutine user rather than by the coroutine main.",
+		src->name, src );
+	assertf( src->last->notHalted, 
+		"Attempt by coroutine %.256s (%p) to suspend back to terminated coroutine %.256s (%p).\n"
+		"Possible cause is terminated coroutine's main routine has already returned.",
+		src->name, src, src->last->name, src->last );
+
+	ctxSwitchDirect( src, src->last );
+}
+
+forall(dtype T | coroutine_t(T))
+void resume(T* cor) {
+	coroutine* src = this_coroutine();		// optimization
+	coroutine* dst = get_coroutine(vtable(cor));
+
+	if ( src != dst ) {				// not resuming self ?
+		assertf( dst->notHalted , 
+			"Attempt by coroutine %.256s (%p) to resume terminated coroutine %.256s (%p).\n"
+			"Possible cause is terminated coroutine's main routine has already returned.",
+			src->name, src, dst->name, dst );
+		dst->last = src;					// set last resumer
+	} // if
+	ctxSwitchDirect( src, dst );				// always done for performance testing
+}
 
 void ctxSwitchDirect(coroutine* src, coroutine* dst) {
@@ -65,9 +121,4 @@
 	// THREAD_GETMEM( This )->enableInterrupts();
 } //ctxSwitchDirect
-
-void invokeCoroutine(coVtable* vtable, void* this);
-
-forall(dtype T | coroutine_t(T))
-void startCoroutine(T* this, void (*invoke)(coVtable*, void*));
 
 // used by all constructors
@@ -116,64 +167,4 @@
 }
 
-coroutine* this_coroutine() {
-	return current_coroutine;
-}
-
-void ?{}(coStack_t* this) {
-	this->size		= 10240;	// size of stack
-	this->storage	= NULL;	// pointer to stack
-	this->limit		= NULL;	// stack grows towards stack limit
-	this->base		= NULL;	// base of stack
-	this->context	= NULL;	// address of cfa_context_t
-	this->top		= NULL;	// address of top of storage
-	this->userStack	= false;	
-	create_stack(this, this->size);
-}
-
-void ?{}(coroutine* this)
-{
-	this->name = "Anonymous Coroutine";
-	this->errno_ = 0;
-	this->state = Start;
-      this->notHalted = true;
-	this->starter = NULL;
-	this->last = NULL;
-}
-
-forall(dtype T | coroutine_t(T))
-void start(T* this) {
-	startCoroutine(this, invokeCoroutine);
-}
-
-void suspend() {
-      coroutine* src = this_coroutine();		// optimization
-
-	assertf( src->last != 0, 
-		"Attempt to suspend coroutine %.256s (%p) that has never been resumed.\n"
-		"Possible cause is a suspend executed in a member called by a coroutine user rather than by the coroutine main.",
-		src->name, src );
-	assertf( src->last->notHalted, 
-		"Attempt by coroutine %.256s (%p) to suspend back to terminated coroutine %.256s (%p).\n"
-		"Possible cause is terminated coroutine's main routine has already returned.",
-		src->name, src, src->last->name, src->last );
-
-	ctxSwitchDirect( src, src->last );
-}
-
-forall(dtype T | coroutine_t(T))
-void resume(T* cor) {
-	coroutine* src = this_coroutine();		// optimization
-	coroutine* dst = this_coroutine(cor);
-
-	if ( src != dst ) {				// not resuming self ?
-		assertf( dst->notHalted , 
-			"Attempt by coroutine %.256s (%p) to resume terminated coroutine %.256s (%p).\n"
-			"Possible cause is terminated coroutine's main routine has already returned.",
-			src->name, src, dst->name, dst );
-		dst->last = src;					// set last resumer
-	} // if
-	ctxSwitchDirect( src, dst );				// always done for performance testing
-}
-
 // Local Variables: //
 // mode: c //
Index: src/tests/coroutine.c
===================================================================
--- src/tests/coroutine.c	(revision d9c44c33df429b559731c041d43b7bee1cfcef97)
+++ src/tests/coroutine.c	(revision 5c811054a9b733b08300e7eaa7910d929010469d)
@@ -3,26 +3,28 @@
 
 struct Fibonacci {
+      int fn; // used for communication
+      covptr_t v;
       coroutine c;
-      coVtable v;
-      int fn; // used for communication
 };
 
-coroutine* this_coroutine(Fibonacci* this);
 void co_main(Fibonacci* this);
-coVtable* vtable(Fibonacci* this);
+covptr_t* vtable(Fibonacci* this);
 
+//GENERATED in proposal for virtuals
 void co_main_fib(void* this) {
       co_main( (Fibonacci*) this );
 }
 
-coroutine* this_coroutine_fib(void* this) {
-      return this_coroutine( (Fibonacci*) this);
-}
+//GENERATED in proposal for virtuals
+static coVtable_t FibonacciVtable = {
+      co_main_fib,
+      VPTR_OFFSET(Fibonacci, v, c),
+      VPTR_OFFSET(Fibonacci, v, fn)      
+};
 
 void ?{}(Fibonacci* this) {
       this->fn = 0;
-      this->v.main = co_main_fib;
-      this->v.this_coroutine = this_coroutine_fib;
-      start(this);
+      this->v = &FibonacciVtable;  //GENERATED in proposal for virtuals
+      (&this->c) { &this->v };
 }
 
@@ -30,5 +32,5 @@
 #ifdef MORE_DEBUG
       sout | "Starting main of coroutine " | this | endl;
-      sout | "Started from " | this_coroutine(this)->last | endl;
+      sout | "Started from " | this->c.last | endl;
 #endif
       int fn1, fn2; 		// retained between resumes
@@ -55,9 +57,5 @@
 }
 
-coroutine* this_coroutine(Fibonacci* this) {
-      return &this->c;
-}
-
-coVtable* vtable(Fibonacci* this) {
+covptr_t* vtable(Fibonacci* this) {
       return &this->v;
 }
@@ -66,5 +64,15 @@
       Fibonacci f1, f2;
 #ifdef MORE_DEBUG      
-      sout | "User coroutines : " | &f1 | ' ' | &f1 | endl;
+      Fibonacci *pf1 = &f1, *pf2 = &f2;
+      coroutine *cf1 = &f1.c, *cf2 = &f2.c;
+      covptr_t  *vf1 = vtable(pf1), *vf2 = vtable(pf2);
+      coroutine *cv1 = get_coroutine(vf1), *cv2 = get_coroutine(vf2);
+      Fibonacci *ov1 = (Fibonacci *)get_object(vf1), *ov2 = (Fibonacci *)get_object(vf2);
+
+      sout | "User coroutines : " | pf1 | ' ' | pf2 | endl;
+      sout | "Coroutine data  : " | cf1 | ' ' | cf2 | endl;
+      sout | "Vptr address    : " | vf1 | ' ' | vf2 | endl;
+      sout | "Vptr obj data   : " | ov1 | ' ' | ov2 | endl;
+      sout | "Vptr cor data   : " | cv1 | ' ' | cv2 | endl;
 #endif
       for ( int i = 1; i <= 10; i += 1 ) {
