Index: libcfa/src/bitmanip.hfa
===================================================================
--- libcfa/src/bitmanip.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bitmanip.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -100,5 +100,5 @@
 	unsigned long long int floor2( unsigned long long int n, unsigned long long int align ) { verify( is_pow2( align ) ); return n & -align; }
 
-	// forall( otype T | { T ?&?( T, T ); T -?( T ); } )
+	// forall( T | { T ?&?( T, T ); T -?( T ); } )
 	// T floor2( T n, T align ) { verify( is_pow2( align ) ); return n & -align; }
 
@@ -115,5 +115,5 @@
 	unsigned long long int ceiling2( unsigned long long int n, unsigned long long int align ) { verify( is_pow2( align ) ); return -floor2( -n, align ); }
 
-	// forall( otype T | { T floor2( T, T ); T -?( T ); } )
+	// forall( T | { T floor2( T, T ); T -?( T ); } )
 	// T ceiling2( T n, T align ) { verify( is_pow2( align ) ); return -floor2( -n, align ); }
 } // distribution
Index: libcfa/src/bits/algorithm.hfa
===================================================================
--- libcfa/src/bits/algorithm.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bits/algorithm.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -17,12 +17,12 @@
 
 #ifdef SAFE_SORT
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort2( T * arr );
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort3( T * arr );
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort4( T * arr );
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort5( T * arr );
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort6( T * arr );
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sortN( T * arr, size_t dim );
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort2( T * arr );
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort3( T * arr );
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort4( T * arr );
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort5( T * arr );
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sort6( T * arr );
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } ) static inline void __libcfa_small_sortN( T * arr, size_t dim );
 
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } )
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
 static inline void __libcfa_small_sort( T * arr, size_t dim ) {
 	switch( dim ) {
@@ -41,10 +41,10 @@
 #define SWAP(x,y) { T a = min(arr[x], arr[y]); T b = max(arr[x], arr[y]); arr[x] = a; arr[y] = b;}
 
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } )
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
 static inline void __libcfa_small_sort2( T * arr ) {
 	SWAP(0, 1);
 }
 
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } )
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
 static inline void __libcfa_small_sort3( T * arr ) {
 	SWAP(1, 2);
@@ -53,5 +53,5 @@
 }
 
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } )
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
 static inline void __libcfa_small_sort4( T * arr ) {
 	SWAP(0, 1);
@@ -62,5 +62,5 @@
 }
 
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } )
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
 static inline void __libcfa_small_sort5( T * arr ) {
 	SWAP(0, 1);
@@ -75,5 +75,5 @@
 }
 
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } )
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
 static inline void __libcfa_small_sort6( T * arr ) {
 	SWAP(1, 2);
@@ -91,5 +91,5 @@
 }
 
-forall( otype T | {  int ?<?( T, T ); int ?>?( T, T ); } )
+forall( T | {  int ?<?( T, T ); int ?>?( T, T ); } )
 static inline void __libcfa_small_sortN( T * arr, size_t dim ) {
 	int i, j;
@@ -112,5 +112,5 @@
 static inline void __libcfa_small_sortN( void* * arr, size_t dim );
 
-forall( dtype T )
+forall( T & )
 static inline void __libcfa_small_sort( T* * arr, size_t dim ) {
 	switch( dim ) {
Index: libcfa/src/bits/collection.hfa
===================================================================
--- libcfa/src/bits/collection.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bits/collection.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -31,5 +31,5 @@
 
 	// // wrappers to make Collection have T
-	// forall( dtype T ) {
+	// forall( T & ) {
 	// 	T *& Next( T * n ) {
 	// 		return (T *)Next( (Colable *)n );
@@ -38,5 +38,5 @@
 } // distribution
 
-forall( dtype T | { T *& Next ( T * ); } ) {
+static inline forall( T & | { T *& Next ( T * ); } ) {
 	bool listed( T * n ) {
 		return Next( n ) != 0p;
@@ -76,5 +76,5 @@
 	} // post: elts = null
 
-	forall( dtype T ) {
+	forall( T & ) {
 		T * Curr( ColIter & ci ) with( ci ) {
 			return (T *)curr;
Index: libcfa/src/bits/containers.hfa
===================================================================
--- libcfa/src/bits/containers.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bits/containers.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -23,5 +23,5 @@
 
 #ifdef __cforall
-	forall(dtype T)
+	forall(T &)
 #else
 	#define T void
@@ -40,23 +40,23 @@
 
 #ifdef __cforall
-	// forall(otype T | sized(T))
+	// forall(T | sized(T))
 	// static inline void ?{}(__small_array(T) & this) {}
 
-	forall(dtype T | sized(T))
+	forall(T & | sized(T))
 	static inline T & ?[?]( __small_array(T) & this, __lock_size_t idx ) {
 		return ((typeof(this.data))this.data)[idx];
 	}
 
-	forall(dtype T | sized(T))
+	forall(T & | sized(T))
 	static inline T & ?[?]( const __small_array(T) & this, __lock_size_t idx ) {
 		return ((typeof(this.data))this.data)[idx];
 	}
 
-	forall(dtype T)
+	forall(T &)
 	static inline T * begin( const __small_array(T) & this ) {
 		return ((typeof(this.data))this.data);
 	}
 
-	forall(dtype T | sized(T))
+	forall(T & | sized(T))
 	static inline T * end( const __small_array(T) & this ) {
 		return ((typeof(this.data))this.data) + this.size;
@@ -69,5 +69,5 @@
 
 #ifdef __cforall
-	trait is_node(dtype T) {
+	trait is_node(T &) {
 		T *& get_next( T & );
 	};
@@ -78,5 +78,5 @@
 //-----------------------------------------------------------------------------
 #ifdef __cforall
-	forall(dtype TYPE)
+	forall(TYPE &)
 	#define T TYPE
 #else
@@ -95,10 +95,10 @@
 
 #ifdef __cforall
-	forall(dtype T)
+	forall(T &)
 	static inline void ?{}( __stack(T) & this ) {
 		(this.top){ 0p };
 	}
 
-	static inline forall( dtype T | is_node(T) ) {
+	static inline forall( T & | is_node(T) ) {
 		void push( __stack(T) & this, T * val ) {
 			verify( !get_next( *val ) );
@@ -126,5 +126,5 @@
 //-----------------------------------------------------------------------------
 #ifdef __cforall
-	forall(dtype TYPE)
+	forall(TYPE &)
 	#define T TYPE
 #else
@@ -144,5 +144,5 @@
 
 #ifdef __cforall
-	static inline forall( dtype T | is_node(T) ) {
+	static inline forall( T & | is_node(T) ) {
 		void ?{}( __queue(T) & this ) with( this ) {
 			(this.head){ 1p };
@@ -215,5 +215,5 @@
 //-----------------------------------------------------------------------------
 #ifdef __cforall
-	forall(dtype TYPE)
+	forall(TYPE &)
 	#define T TYPE
 	#define __getter_t * [T * & next, T * & prev] ( T & )
@@ -237,5 +237,5 @@
 
 #ifdef __cforall
-	forall(dtype T )
+	forall(T & )
 	static inline [void] ?{}( __dllist(T) & this, * [T * & next, T * & prev] ( T & ) __get ) {
 		(this.head){ 0p };
@@ -245,5 +245,5 @@
 	#define next 0
 	#define prev 1
-	static inline forall(dtype T) {
+	static inline forall(T &) {
 		void push_front( __dllist(T) & this, T & node ) with( this ) {
 			verify(__get);
Index: libcfa/src/bits/defs.hfa
===================================================================
--- libcfa/src/bits/defs.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bits/defs.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -5,5 +5,8 @@
 // file "LICENCE" distributed with Cforall.
 //
-// defs.hfa --
+// defs.hfa -- Commen macros, functions and typedefs
+// Most files depend on them and they are always useful to have.
+//
+//  *** Must not contain code specific to libcfathread ***
 //
 // Author           : Thierry Delisle
@@ -62,2 +65,11 @@
 	#endif
 }
+
+// pause to prevent excess processor bus usage
+#if defined( __i386 ) || defined( __x86_64 )
+	#define Pause() __asm__ __volatile__ ( "pause" : : : )
+#elif defined( __ARM_ARCH )
+	#define Pause() __asm__ __volatile__ ( "YIELD" : : : )
+#else
+	#error unsupported architecture
+#endif
Index: libcfa/src/bits/locks.hfa
===================================================================
--- libcfa/src/bits/locks.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bits/locks.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -5,5 +5,8 @@
 // file "LICENCE" distributed with Cforall.
 //
-// bits/locks.hfa -- Fast internal locks.
+// bits/locks.hfa -- Basic spinlocks that are reused in the system.
+// Used for locks that aren't specific to cforall threads and can be used anywhere
+//
+//  *** Must not contain code specific to libcfathread ***
 //
 // Author           : Thierry Delisle
@@ -19,19 +22,4 @@
 #include "bits/defs.hfa"
 #include <assert.h>
-
-#ifdef __cforall
-	extern "C" {
-		#include <pthread.h>
-	}
-#endif
-
-// pause to prevent excess processor bus usage
-#if defined( __i386 ) || defined( __x86_64 )
-	#define Pause() __asm__ __volatile__ ( "pause" : : : )
-#elif defined( __ARM_ARCH )
-	#define Pause() __asm__ __volatile__ ( "YIELD" : : : )
-#else
-	#error unsupported architecture
-#endif
 
 struct __spinlock_t {
@@ -104,320 +92,3 @@
 		enable_interrupts_noPoll();
 	}
-
-
-	#ifdef __CFA_WITH_VERIFY__
-		extern bool __cfaabi_dbg_in_kernel();
-	#endif
-
-	extern "C" {
-		char * strerror(int);
-	}
-	#define CHECKED(x) { int err = x; if( err != 0 ) abort("KERNEL ERROR: Operation \"" #x "\" return error %d - %s\n", err, strerror(err)); }
-
-	struct __bin_sem_t {
-		pthread_mutex_t 	lock;
-		pthread_cond_t  	cond;
-		int     		val;
-	};
-
-	static inline void ?{}(__bin_sem_t & this) with( this ) {
-		// Create the mutex with error checking
-		pthread_mutexattr_t mattr;
-		pthread_mutexattr_init( &mattr );
-		pthread_mutexattr_settype( &mattr, PTHREAD_MUTEX_ERRORCHECK_NP);
-		pthread_mutex_init(&lock, &mattr);
-
-		pthread_cond_init (&cond, (const pthread_condattr_t *)0p);  // workaround trac#208: cast should not be required
-		val = 0;
-	}
-
-	static inline void ^?{}(__bin_sem_t & this) with( this ) {
-		CHECKED( pthread_mutex_destroy(&lock) );
-		CHECKED( pthread_cond_destroy (&cond) );
-	}
-
-	static inline void wait(__bin_sem_t & this) with( this ) {
-		verify(__cfaabi_dbg_in_kernel());
-		CHECKED( pthread_mutex_lock(&lock) );
-			while(val < 1) {
-				pthread_cond_wait(&cond, &lock);
-			}
-			val -= 1;
-		CHECKED( pthread_mutex_unlock(&lock) );
-	}
-
-	static inline bool post(__bin_sem_t & this) with( this ) {
-		bool needs_signal = false;
-
-		CHECKED( pthread_mutex_lock(&lock) );
-			if(val < 1) {
-				val += 1;
-				pthread_cond_signal(&cond);
-				needs_signal = true;
-			}
-		CHECKED( pthread_mutex_unlock(&lock) );
-
-		return needs_signal;
-	}
-
-	#undef CHECKED
-
-	struct $thread;
-	extern void park( void );
-	extern void unpark( struct $thread * this );
-	static inline struct $thread * active_thread ();
-
-	// Semaphore which only supports a single thread
-	struct single_sem {
-		struct $thread * volatile ptr;
-	};
-
-	static inline {
-		void  ?{}(single_sem & this) {
-			this.ptr = 0p;
-		}
-
-		void ^?{}(single_sem &) {}
-
-		bool wait(single_sem & this) {
-			for() {
-				struct $thread * expected = this.ptr;
-				if(expected == 1p) {
-					if(__atomic_compare_exchange_n(&this.ptr, &expected, 0p, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
-						return false;
-					}
-				}
-				else {
-					/* paranoid */ verify( expected == 0p );
-					if(__atomic_compare_exchange_n(&this.ptr, &expected, active_thread(), false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
-						park();
-						return true;
-					}
-				}
-
-			}
-		}
-
-		bool post(single_sem & this) {
-			for() {
-				struct $thread * expected = this.ptr;
-				if(expected == 1p) return false;
-				if(expected == 0p) {
-					if(__atomic_compare_exchange_n(&this.ptr, &expected, 1p, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
-						return false;
-					}
-				}
-				else {
-					if(__atomic_compare_exchange_n(&this.ptr, &expected, 0p, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
-						unpark( expected );
-						return true;
-					}
-				}
-			}
-		}
-	}
-
-	// Synchronozation primitive which only supports a single thread and one post
-	// Similar to a binary semaphore with a 'one shot' semantic
-	// is expected to be discarded after each party call their side
-	struct oneshot {
-		// Internal state :
-		//     0p     : is initial state (wait will block)
-		//     1p     : fulfilled (wait won't block)
-		// any thread : a thread is currently waiting
-		struct $thread * volatile ptr;
-	};
-
-	static inline {
-		void  ?{}(oneshot & this) {
-			this.ptr = 0p;
-		}
-
-		void ^?{}(oneshot &) {}
-
-		// Wait for the post, return immidiately if it already happened.
-		// return true if the thread was parked
-		bool wait(oneshot & this) {
-			for() {
-				struct $thread * expected = this.ptr;
-				if(expected == 1p) return false;
-				/* paranoid */ verify( expected == 0p );
-				if(__atomic_compare_exchange_n(&this.ptr, &expected, active_thread(), false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
-					park();
-					/* paranoid */ verify( this.ptr == 1p );
-					return true;
-				}
-			}
-		}
-
-		// Mark as fulfilled, wake thread if needed
-		// return true if a thread was unparked
-		bool post(oneshot & this) {
-			struct $thread * got = __atomic_exchange_n( &this.ptr, 1p, __ATOMIC_SEQ_CST);
-			if( got == 0p ) return false;
-			unpark( got );
-			return true;
-		}
-	}
-
-	// base types for future to build upon
-	// It is based on the 'oneshot' type to allow multiple futures
-	// to block on the same instance, permitting users to block a single
-	// thread on "any of" [a given set of] futures.
-	// does not support multiple threads waiting on the same future
-	struct future_t {
-		// Internal state :
-		//     0p      : is initial state (wait will block)
-		//     1p      : fulfilled (wait won't block)
-		//     2p      : in progress ()
-		//     3p      : abandoned, server should delete
-		// any oneshot : a context has been setup to wait, a thread could wait on it
-		struct oneshot * volatile ptr;
-	};
-
-	static inline {
-		void  ?{}(future_t & this) {
-			this.ptr = 0p;
-		}
-
-		void ^?{}(future_t &) {}
-
-		void reset(future_t & this) {
-			// needs to be in 0p or 1p
-			__atomic_exchange_n( &this.ptr, 0p, __ATOMIC_SEQ_CST);
-		}
-
-		// check if the future is available
-		bool available( future_t & this ) {
-			return this.ptr == 1p;
-		}
-
-		// Prepare the future to be waited on
-		// intented to be use by wait, wait_any, waitfor, etc. rather than used directly
-		bool setup( future_t & this, oneshot & wait_ctx ) {
-			/* paranoid */ verify( wait_ctx.ptr == 0p );
-			// The future needs to set the wait context
-			for() {
-				struct oneshot * expected = this.ptr;
-				// Is the future already fulfilled?
-				if(expected == 1p) return false; // Yes, just return false (didn't block)
-
-				// The future is not fulfilled, try to setup the wait context
-				/* paranoid */ verify( expected == 0p );
-				if(__atomic_compare_exchange_n(&this.ptr, &expected, &wait_ctx, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
-					return true;
-				}
-			}
-		}
-
-		// Stop waiting on a future
-		// When multiple futures are waited for together in "any of" pattern
-		// futures that weren't fulfilled before the thread woke up
-		// should retract the wait ctx
-		// intented to be use by wait, wait_any, waitfor, etc. rather than used directly
-		void retract( future_t & this, oneshot & wait_ctx ) {
-			// Remove the wait context
-			struct oneshot * got = __atomic_exchange_n( &this.ptr, 0p, __ATOMIC_SEQ_CST);
-
-			// got == 0p: future was never actually setup, just return
-			if( got == 0p ) return;
-
-			// got == wait_ctx: since fulfil does an atomic_swap,
-			// if we got back the original then no one else saw context
-			// It is safe to delete (which could happen after the return)
-			if( got == &wait_ctx ) return;
-
-			// got == 1p: the future is ready and the context was fully consumed
-			// the server won't use the pointer again
-			// It is safe to delete (which could happen after the return)
-			if( got == 1p ) return;
-
-			// got == 2p: the future is ready but the context hasn't fully been consumed
-			// spin until it is safe to move on
-			if( got == 2p ) {
-				while( this.ptr != 1p ) Pause();
-				return;
-			}
-
-			// got == any thing else, something wen't wrong here, abort
-			abort("Future in unexpected state");
-		}
-
-		// Mark the future as abandoned, meaning it will be deleted by the server
-		bool abandon( future_t & this ) {
-			/* paranoid */ verify( this.ptr != 3p );
-
-			// Mark the future as abandonned
-			struct oneshot * got = __atomic_exchange_n( &this.ptr, 3p, __ATOMIC_SEQ_CST);
-
-			// If the future isn't already fulfilled, let the server delete it
-			if( got == 0p ) return false;
-
-			// got == 2p: the future is ready but the context hasn't fully been consumed
-			// spin until it is safe to move on
-			if( got == 2p ) {
-				while( this.ptr != 1p ) Pause();
-				got = 1p;
-			}
-
-			// The future is completed delete it now
-			/* paranoid */ verify( this.ptr != 1p );
-			free( &this );
-			return true;
-		}
-
-		// from the server side, mark the future as fulfilled
-		// delete it if needed
-		bool fulfil( future_t & this ) {
-			for() {
-				struct oneshot * expected = this.ptr;
-				// was this abandoned?
-				#if defined(__GNUC__) && __GNUC__ >= 7
-					#pragma GCC diagnostic push
-					#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
-				#endif
-					if( expected == 3p ) { free( &this ); return false; }
-				#if defined(__GNUC__) && __GNUC__ >= 7
-					#pragma GCC diagnostic pop
-				#endif
-
-				/* paranoid */ verify( expected != 1p ); // Future is already fulfilled, should not happen
-				/* paranoid */ verify( expected != 2p ); // Future is bein fulfilled by someone else, this is even less supported then the previous case.
-
-				// If there is a wait context, we need to consume it and mark it as consumed after
-				// If there is no context then we can skip the in progress phase
-				struct oneshot * want = expected == 0p ? 1p : 2p;
-				if(__atomic_compare_exchange_n(&this.ptr, &expected, want, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
-					if( expected == 0p ) { /* paranoid */ verify( this.ptr == 1p); return false; }
-					bool ret = post( *expected );
-					__atomic_store_n( &this.ptr, 1p, __ATOMIC_SEQ_CST);
-					return ret;
-				}
-			}
-
-		}
-
-		// Wait for the future to be fulfilled
-		bool wait( future_t & this ) {
-			oneshot temp;
-			if( !setup(this, temp) ) return false;
-
-			// Wait context is setup, just wait on it
-			bool ret = wait( temp );
-
-			// Wait for the future to tru
-			while( this.ptr == 2p ) Pause();
-			// Make sure the state makes sense
-			// Should be fulfilled, could be in progress but it's out of date if so
-			// since if that is the case, the oneshot was fulfilled (unparking this thread)
-			// and the oneshot should not be needed any more
-			__attribute__((unused)) struct oneshot * was = this.ptr;
-			/* paranoid */ verifyf( was == 1p, "Expected this.ptr to be 1p, was %p\n", was );
-
-			// Mark the future as fulfilled, to be consistent
-			// with potential calls to avail
-			// this.ptr = 1p;
-			return ret;
-		}
-	}
 #endif
Index: libcfa/src/bits/queue.hfa
===================================================================
--- libcfa/src/bits/queue.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bits/queue.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -9,5 +9,5 @@
 // instead of being null.
 
-forall( dtype T | { T *& Next ( T * ); } ) {
+forall( T & | { T *& Next ( T * ); } ) {
 	struct Queue {
 		inline Collection;								// Plan 9 inheritance
@@ -151,5 +151,5 @@
 } // distribution
 
-forall( dtype T | { T *& Next ( T * ); } ) {
+forall( T & | { T *& Next ( T * ); } ) {
 	struct QueueIter {
 		inline ColIter;									// Plan 9 inheritance
Index: libcfa/src/bits/sequence.hfa
===================================================================
--- libcfa/src/bits/sequence.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bits/sequence.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -29,5 +29,5 @@
 
 	// // wrappers to make Collection have T
-	// forall( dtype T ) {
+	// forall( T & ) {
 	// 	T *& Back( T * n ) {
 	// 		return (T *)Back( (Seqable *)n );
@@ -43,5 +43,5 @@
 // and the back field of the last node points at the first node (circular).
 
-forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) {
+forall( T & | { T *& Back ( T * ); T *& Next ( T * ); } ) {
 	struct Sequence {
 		inline Collection;								// Plan 9 inheritance
@@ -231,5 +231,5 @@
 } // distribution
 
-forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) {
+forall( T & | { T *& Back ( T * ); T *& Next ( T * ); } ) {
 	// SeqIter(T) is used to iterate over a Sequence(T) in head-to-tail order.
 	struct SeqIter {
Index: libcfa/src/bits/stack.hfa
===================================================================
--- libcfa/src/bits/stack.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/bits/stack.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -9,5 +9,5 @@
 // instead of being null.
 
-forall( dtype T | { T *& Next ( T * ); } ) {
+forall( T & | { T *& Next ( T * ); } ) {
 	struct Stack {
 		inline Collection;								// Plan 9 inheritance
@@ -67,5 +67,5 @@
 // order returned by drop().
 
-forall( dtype T | { T *& Next ( T * ); } ) {
+forall( T & | { T *& Next ( T * ); } ) {
 	struct StackIter {
 		inline ColIter;									// Plan 9 inheritance
Index: libcfa/src/common.cfa
===================================================================
--- libcfa/src/common.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/common.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -23,5 +23,5 @@
 [ long int, long int ] div( long int num, long int denom ) { ldiv_t qr = ldiv( num, denom ); return [ qr.quot, qr.rem ]; }
 [ long long int, long long int ] div( long long int num, long long int denom ) { lldiv_t qr = lldiv( num, denom ); return [ qr.quot, qr.rem ]; }
-forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
+forall( T | { T ?/?( T, T ); T ?%?( T, T ); } )
 [ T, T ] div( T num, T denom ) { return [ num / denom, num % denom ]; }
 
Index: libcfa/src/common.hfa
===================================================================
--- libcfa/src/common.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/common.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -21,5 +21,5 @@
 [ long int, long int ] div( long int num, long int denom );
 [ long long int, long long int ] div( long long int num, long long int denom );
-forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
+forall( T | { T ?/?( T, T ); T ?%?( T, T ); } )
 [ T, T ] div( T num, T demon );
 
@@ -61,5 +61,5 @@
 } // distribution
 
-forall( otype T | { void ?{}( T &, zero_t ); int ?<?( T, T ); T -?( T ); } )
+forall( T | { void ?{}( T &, zero_t ); int ?<?( T, T ); T -?( T ); } )
 T abs( T );
 
@@ -70,5 +70,5 @@
 	intptr_t min( intptr_t t1, intptr_t t2 ) { return t1 < t2 ? t1 : t2; } // optimization
 	uintptr_t min( uintptr_t t1, uintptr_t t2 ) { return t1 < t2 ? t1 : t2; } // optimization
-	forall( otype T | { int ?<?( T, T ); } )
+	forall( T | { int ?<?( T, T ); } )
 	T min( T t1, T t2 ) { return t1 < t2 ? t1 : t2; }
 
@@ -76,11 +76,11 @@
 	intptr_t max( intptr_t t1, intptr_t t2 ) { return t1 > t2 ? t1 : t2; } // optimization
 	uintptr_t max( uintptr_t t1, uintptr_t t2 ) { return t1 > t2 ? t1 : t2; } // optimization
-	forall( otype T | { int ?>?( T, T ); } )
+	forall( T | { int ?>?( T, T ); } )
 	T max( T t1, T t2 ) { return t1 > t2 ? t1 : t2; }
 
-	forall( otype T | { T min( T, T ); T max( T, T ); } )
+	forall( T | { T min( T, T ); T max( T, T ); } )
 	T clamp( T value, T min_val, T max_val ) { return max( min_val, min( value, max_val ) ); }
 
-	forall( otype T )
+	forall( T )
 	void swap( T & v1, T & v2 ) { T temp = v1; v1 = v2; v2 = temp; }
 } // distribution
Index: libcfa/src/concurrency/coroutine.cfa
===================================================================
--- libcfa/src/concurrency/coroutine.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/coroutine.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -46,10 +46,10 @@
 
 //-----------------------------------------------------------------------------
-FORALL_DATA_INSTANCE(CoroutineCancelled, (dtype coroutine_t), (coroutine_t))
-
-forall(dtype T)
+FORALL_DATA_INSTANCE(CoroutineCancelled, (coroutine_t &), (coroutine_t))
+
+forall(T &)
 void mark_exception(CoroutineCancelled(T) *) {}
 
-forall(dtype T)
+forall(T &)
 void copy(CoroutineCancelled(T) * dst, CoroutineCancelled(T) * src) {
 	dst->virtual_table = src->virtual_table;
@@ -58,5 +58,5 @@
 }
 
-forall(dtype T)
+forall(T &)
 const char * msg(CoroutineCancelled(T) *) {
 	return "CoroutineCancelled(...)";
@@ -64,5 +64,5 @@
 
 // This code should not be inlined. It is the error path on resume.
-forall(dtype T | is_coroutine(T))
+forall(T & | is_coroutine(T))
 void __cfaehm_cancelled_coroutine( T & cor, $coroutine * desc ) {
 	verify( desc->cancellation );
@@ -148,5 +148,5 @@
 // Part of the Public API
 // Not inline since only ever called once per coroutine
-forall(dtype T | is_coroutine(T))
+forall(T & | is_coroutine(T))
 void prime(T& cor) {
 	$coroutine* this = get_coroutine(cor);
Index: libcfa/src/concurrency/coroutine.hfa
===================================================================
--- libcfa/src/concurrency/coroutine.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/coroutine.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -22,13 +22,13 @@
 //-----------------------------------------------------------------------------
 // Exception thrown from resume when a coroutine stack is cancelled.
-FORALL_DATA_EXCEPTION(CoroutineCancelled, (dtype coroutine_t), (coroutine_t)) (
+FORALL_DATA_EXCEPTION(CoroutineCancelled, (coroutine_t &), (coroutine_t)) (
 	coroutine_t * the_coroutine;
 	exception_t * the_exception;
 );
 
-forall(dtype T)
+forall(T &)
 void copy(CoroutineCancelled(T) * dst, CoroutineCancelled(T) * src);
 
-forall(dtype T)
+forall(T &)
 const char * msg(CoroutineCancelled(T) *);
 
@@ -37,5 +37,5 @@
 // Anything that implements this trait can be resumed.
 // Anything that is resumed is a coroutine.
-trait is_coroutine(dtype T | IS_RESUMPTION_EXCEPTION(CoroutineCancelled, (T))) {
+trait is_coroutine(T & | IS_RESUMPTION_EXCEPTION(CoroutineCancelled, (T))) {
 	void main(T & this);
 	$coroutine * get_coroutine(T & this);
@@ -60,5 +60,5 @@
 //-----------------------------------------------------------------------------
 // Public coroutine API
-forall(dtype T | is_coroutine(T))
+forall(T & | is_coroutine(T))
 void prime(T & cor);
 
@@ -72,5 +72,5 @@
 	void __cfactx_invoke_coroutine(void (*main)(void *), void * this);
 
-	forall(dtype T)
+	forall(T &)
 	void __cfactx_start(void (*main)(T &), struct $coroutine * cor, T & this, void (*invoke)(void (*main)(void *), void *));
 
@@ -129,9 +129,9 @@
 }
 
-forall(dtype T | is_coroutine(T))
+forall(T & | is_coroutine(T))
 void __cfaehm_cancelled_coroutine( T & cor, $coroutine * desc );
 
 // Resume implementation inlined for performance
-forall(dtype T | is_coroutine(T))
+forall(T & | is_coroutine(T))
 static inline T & resume(T & cor) {
 	// optimization : read TLS once and reuse it
Index: libcfa/src/concurrency/future.hfa
===================================================================
--- libcfa/src/concurrency/future.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/future.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -19,5 +19,5 @@
 #include "monitor.hfa"
 
-forall( otype T ) {
+forall( T ) {
 	struct future {
 		inline future_t;
@@ -58,5 +58,5 @@
 }
 
-forall( otype T ) {
+forall( T ) {
 	monitor multi_future {
 		inline future_t;
Index: libcfa/src/concurrency/io/types.hfa
===================================================================
--- libcfa/src/concurrency/io/types.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/io/types.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -5,5 +5,6 @@
 // file "LICENCE" distributed with Cforall.
 //
-// io/types.hfa --
+// io/types.hfa -- PRIVATE
+// Types used by the I/O subsystem
 //
 // Author           : Thierry Delisle
@@ -21,4 +22,5 @@
 
 #include "bits/locks.hfa"
+#include "kernel/fwd.hfa"
 
 #if defined(CFA_HAVE_LINUX_IO_URING_H)
Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/kernel.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -224,5 +224,5 @@
 	}
 
-	V( this->terminated );
+	post( this->terminated );
 
 	if(this == mainProcessor) {
@@ -624,30 +624,6 @@
 // Unexpected Terminating logic
 //=============================================================================================
-
-extern "C" {
-	extern void __cfaabi_real_abort(void);
-}
-static volatile bool kernel_abort_called = false;
-
-void * kernel_abort(void) __attribute__ ((__nothrow__)) {
-	// abort cannot be recursively entered by the same or different processors because all signal handlers return when
-	// the globalAbort flag is true.
-	bool first = !__atomic_test_and_set( &kernel_abort_called, __ATOMIC_SEQ_CST);
-
-	// first task to abort ?
-	if ( !first ) {
-		// We aren't the first to abort.
-		// I give up, just let C handle it
-		__cfaabi_real_abort();
-	}
-
-	// disable interrupts, it no longer makes sense to try to interrupt this processor
-	disable_interrupts();
-
-	return __cfaabi_tls.this_thread;
-}
-
-void kernel_abort_msg( void * kernel_data, char * abort_text, int abort_text_size ) {
-	$thread * thrd = ( $thread * ) kernel_data;
+void __kernel_abort_msg( char * abort_text, int abort_text_size ) {
+	$thread * thrd = __cfaabi_tls.this_thread;
 
 	if(thrd) {
@@ -669,6 +645,6 @@
 }
 
-int kernel_abort_lastframe( void ) __attribute__ ((__nothrow__)) {
-	return get_coroutine(kernelTLS().this_thread) == get_coroutine(mainThread) ? 4 : 2;
+int __kernel_abort_lastframe( void ) __attribute__ ((__nothrow__)) {
+	return get_coroutine(__cfaabi_tls.this_thread) == get_coroutine(mainThread) ? 4 : 2;
 }
 
@@ -688,62 +664,4 @@
 // Kernel Utilities
 //=============================================================================================
-//-----------------------------------------------------------------------------
-// Locks
-void  ?{}( semaphore & this, int count = 1 ) {
-	(this.lock){};
-	this.count = count;
-	(this.waiting){};
-}
-void ^?{}(semaphore & this) {}
-
-bool P(semaphore & this) with( this ){
-	lock( lock __cfaabi_dbg_ctx2 );
-	count -= 1;
-	if ( count < 0 ) {
-		// queue current task
-		append( waiting, active_thread() );
-
-		// atomically release spin lock and block
-		unlock( lock );
-		park();
-		return true;
-	}
-	else {
-	    unlock( lock );
-	    return false;
-	}
-}
-
-bool V(semaphore & this) with( this ) {
-	$thread * thrd = 0p;
-	lock( lock __cfaabi_dbg_ctx2 );
-	count += 1;
-	if ( count <= 0 ) {
-		// remove task at head of waiting list
-		thrd = pop_head( waiting );
-	}
-
-	unlock( lock );
-
-	// make new owner
-	unpark( thrd );
-
-	return thrd != 0p;
-}
-
-bool V(semaphore & this, unsigned diff) with( this ) {
-	$thread * thrd = 0p;
-	lock( lock __cfaabi_dbg_ctx2 );
-	int release = max(-count, (int)diff);
-	count += diff;
-	for(release) {
-		unpark( pop_head( waiting ) );
-	}
-
-	unlock( lock );
-
-	return thrd != 0p;
-}
-
 //-----------------------------------------------------------------------------
 // Debug
Index: libcfa/src/concurrency/kernel.hfa
===================================================================
--- libcfa/src/concurrency/kernel.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/kernel.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// kernel --
+// kernel -- Header containing the core of the kernel API
 //
 // Author           : Thierry Delisle
@@ -24,20 +24,66 @@
 extern "C" {
 	#include <bits/pthreadtypes.h>
+	#include <pthread.h>
 	#include <linux/types.h>
 }
 
 //-----------------------------------------------------------------------------
-// Locks
-struct semaphore {
-	__spinlock_t lock;
-	int count;
-	__queue_t($thread) waiting;
-};
-
-void  ?{}(semaphore & this, int count = 1);
-void ^?{}(semaphore & this);
-bool   P (semaphore & this);
-bool   V (semaphore & this);
-bool   V (semaphore & this, unsigned count);
+// Underlying Locks
+#ifdef __CFA_WITH_VERIFY__
+	extern bool __cfaabi_dbg_in_kernel();
+#endif
+
+extern "C" {
+	char * strerror(int);
+}
+#define CHECKED(x) { int err = x; if( err != 0 ) abort("KERNEL ERROR: Operation \"" #x "\" return error %d - %s\n", err, strerror(err)); }
+
+struct __bin_sem_t {
+	pthread_mutex_t 	lock;
+	pthread_cond_t  	cond;
+	int     		val;
+};
+
+static inline void ?{}(__bin_sem_t & this) with( this ) {
+	// Create the mutex with error checking
+	pthread_mutexattr_t mattr;
+	pthread_mutexattr_init( &mattr );
+	pthread_mutexattr_settype( &mattr, PTHREAD_MUTEX_ERRORCHECK_NP);
+	pthread_mutex_init(&lock, &mattr);
+
+	pthread_cond_init (&cond, (const pthread_condattr_t *)0p);  // workaround trac#208: cast should not be required
+	val = 0;
+}
+
+static inline void ^?{}(__bin_sem_t & this) with( this ) {
+	CHECKED( pthread_mutex_destroy(&lock) );
+	CHECKED( pthread_cond_destroy (&cond) );
+}
+
+static inline void wait(__bin_sem_t & this) with( this ) {
+	verify(__cfaabi_dbg_in_kernel());
+	CHECKED( pthread_mutex_lock(&lock) );
+		while(val < 1) {
+			pthread_cond_wait(&cond, &lock);
+		}
+		val -= 1;
+	CHECKED( pthread_mutex_unlock(&lock) );
+}
+
+static inline bool post(__bin_sem_t & this) with( this ) {
+	bool needs_signal = false;
+
+	CHECKED( pthread_mutex_lock(&lock) );
+		if(val < 1) {
+			val += 1;
+			pthread_cond_signal(&cond);
+			needs_signal = true;
+		}
+	CHECKED( pthread_mutex_unlock(&lock) );
+
+	return needs_signal;
+}
+
+#undef CHECKED
 
 
@@ -91,5 +137,5 @@
 
 	// Termination synchronisation (user semaphore)
-	semaphore terminated;
+	oneshot terminated;
 
 	// pthread Stack
Index: libcfa/src/concurrency/kernel/fwd.hfa
===================================================================
--- libcfa/src/concurrency/kernel/fwd.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/kernel/fwd.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -5,5 +5,6 @@
 // file "LICENCE" distributed with Cforall.
 //
-// kernel/fwd.hfa --
+// kernel/fwd.hfa -- PUBLIC
+// Fundamental code needed to implement threading M.E.S. algorithms.
 //
 // Author           : Thierry Delisle
@@ -134,4 +135,258 @@
 		extern uint64_t thread_rand();
 
+		// Semaphore which only supports a single thread
+		struct single_sem {
+			struct $thread * volatile ptr;
+		};
+
+		static inline {
+			void  ?{}(single_sem & this) {
+				this.ptr = 0p;
+			}
+
+			void ^?{}(single_sem &) {}
+
+			bool wait(single_sem & this) {
+				for() {
+					struct $thread * expected = this.ptr;
+					if(expected == 1p) {
+						if(__atomic_compare_exchange_n(&this.ptr, &expected, 0p, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
+							return false;
+						}
+					}
+					else {
+						/* paranoid */ verify( expected == 0p );
+						if(__atomic_compare_exchange_n(&this.ptr, &expected, active_thread(), false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
+							park();
+							return true;
+						}
+					}
+
+				}
+			}
+
+			bool post(single_sem & this) {
+				for() {
+					struct $thread * expected = this.ptr;
+					if(expected == 1p) return false;
+					if(expected == 0p) {
+						if(__atomic_compare_exchange_n(&this.ptr, &expected, 1p, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
+							return false;
+						}
+					}
+					else {
+						if(__atomic_compare_exchange_n(&this.ptr, &expected, 0p, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
+							unpark( expected );
+							return true;
+						}
+					}
+				}
+			}
+		}
+
+		// Synchronozation primitive which only supports a single thread and one post
+		// Similar to a binary semaphore with a 'one shot' semantic
+		// is expected to be discarded after each party call their side
+		struct oneshot {
+			// Internal state :
+			//     0p     : is initial state (wait will block)
+			//     1p     : fulfilled (wait won't block)
+			// any thread : a thread is currently waiting
+			struct $thread * volatile ptr;
+		};
+
+		static inline {
+			void  ?{}(oneshot & this) {
+				this.ptr = 0p;
+			}
+
+			void ^?{}(oneshot &) {}
+
+			// Wait for the post, return immidiately if it already happened.
+			// return true if the thread was parked
+			bool wait(oneshot & this) {
+				for() {
+					struct $thread * expected = this.ptr;
+					if(expected == 1p) return false;
+					/* paranoid */ verify( expected == 0p );
+					if(__atomic_compare_exchange_n(&this.ptr, &expected, active_thread(), false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
+						park();
+						/* paranoid */ verify( this.ptr == 1p );
+						return true;
+					}
+				}
+			}
+
+			// Mark as fulfilled, wake thread if needed
+			// return true if a thread was unparked
+			bool post(oneshot & this) {
+				struct $thread * got = __atomic_exchange_n( &this.ptr, 1p, __ATOMIC_SEQ_CST);
+				if( got == 0p ) return false;
+				unpark( got );
+				return true;
+			}
+		}
+
+		// base types for future to build upon
+		// It is based on the 'oneshot' type to allow multiple futures
+		// to block on the same instance, permitting users to block a single
+		// thread on "any of" [a given set of] futures.
+		// does not support multiple threads waiting on the same future
+		struct future_t {
+			// Internal state :
+			//     0p      : is initial state (wait will block)
+			//     1p      : fulfilled (wait won't block)
+			//     2p      : in progress ()
+			//     3p      : abandoned, server should delete
+			// any oneshot : a context has been setup to wait, a thread could wait on it
+			struct oneshot * volatile ptr;
+		};
+
+		static inline {
+			void  ?{}(future_t & this) {
+				this.ptr = 0p;
+			}
+
+			void ^?{}(future_t &) {}
+
+			void reset(future_t & this) {
+				// needs to be in 0p or 1p
+				__atomic_exchange_n( &this.ptr, 0p, __ATOMIC_SEQ_CST);
+			}
+
+			// check if the future is available
+			bool available( future_t & this ) {
+				return this.ptr == 1p;
+			}
+
+			// Prepare the future to be waited on
+			// intented to be use by wait, wait_any, waitfor, etc. rather than used directly
+			bool setup( future_t & this, oneshot & wait_ctx ) {
+				/* paranoid */ verify( wait_ctx.ptr == 0p );
+				// The future needs to set the wait context
+				for() {
+					struct oneshot * expected = this.ptr;
+					// Is the future already fulfilled?
+					if(expected == 1p) return false; // Yes, just return false (didn't block)
+
+					// The future is not fulfilled, try to setup the wait context
+					/* paranoid */ verify( expected == 0p );
+					if(__atomic_compare_exchange_n(&this.ptr, &expected, &wait_ctx, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
+						return true;
+					}
+				}
+			}
+
+			// Stop waiting on a future
+			// When multiple futures are waited for together in "any of" pattern
+			// futures that weren't fulfilled before the thread woke up
+			// should retract the wait ctx
+			// intented to be use by wait, wait_any, waitfor, etc. rather than used directly
+			void retract( future_t & this, oneshot & wait_ctx ) {
+				// Remove the wait context
+				struct oneshot * got = __atomic_exchange_n( &this.ptr, 0p, __ATOMIC_SEQ_CST);
+
+				// got == 0p: future was never actually setup, just return
+				if( got == 0p ) return;
+
+				// got == wait_ctx: since fulfil does an atomic_swap,
+				// if we got back the original then no one else saw context
+				// It is safe to delete (which could happen after the return)
+				if( got == &wait_ctx ) return;
+
+				// got == 1p: the future is ready and the context was fully consumed
+				// the server won't use the pointer again
+				// It is safe to delete (which could happen after the return)
+				if( got == 1p ) return;
+
+				// got == 2p: the future is ready but the context hasn't fully been consumed
+				// spin until it is safe to move on
+				if( got == 2p ) {
+					while( this.ptr != 1p ) Pause();
+					return;
+				}
+
+				// got == any thing else, something wen't wrong here, abort
+				abort("Future in unexpected state");
+			}
+
+			// Mark the future as abandoned, meaning it will be deleted by the server
+			bool abandon( future_t & this ) {
+				/* paranoid */ verify( this.ptr != 3p );
+
+				// Mark the future as abandonned
+				struct oneshot * got = __atomic_exchange_n( &this.ptr, 3p, __ATOMIC_SEQ_CST);
+
+				// If the future isn't already fulfilled, let the server delete it
+				if( got == 0p ) return false;
+
+				// got == 2p: the future is ready but the context hasn't fully been consumed
+				// spin until it is safe to move on
+				if( got == 2p ) {
+					while( this.ptr != 1p ) Pause();
+					got = 1p;
+				}
+
+				// The future is completed delete it now
+				/* paranoid */ verify( this.ptr != 1p );
+				free( &this );
+				return true;
+			}
+
+			// from the server side, mark the future as fulfilled
+			// delete it if needed
+			bool fulfil( future_t & this ) {
+				for() {
+					struct oneshot * expected = this.ptr;
+					// was this abandoned?
+					#if defined(__GNUC__) && __GNUC__ >= 7
+						#pragma GCC diagnostic push
+						#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
+					#endif
+						if( expected == 3p ) { free( &this ); return false; }
+					#if defined(__GNUC__) && __GNUC__ >= 7
+						#pragma GCC diagnostic pop
+					#endif
+
+					/* paranoid */ verify( expected != 1p ); // Future is already fulfilled, should not happen
+					/* paranoid */ verify( expected != 2p ); // Future is bein fulfilled by someone else, this is even less supported then the previous case.
+
+					// If there is a wait context, we need to consume it and mark it as consumed after
+					// If there is no context then we can skip the in progress phase
+					struct oneshot * want = expected == 0p ? 1p : 2p;
+					if(__atomic_compare_exchange_n(&this.ptr, &expected, want, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
+						if( expected == 0p ) { /* paranoid */ verify( this.ptr == 1p); return false; }
+						bool ret = post( *expected );
+						__atomic_store_n( &this.ptr, 1p, __ATOMIC_SEQ_CST);
+						return ret;
+					}
+				}
+
+			}
+
+			// Wait for the future to be fulfilled
+			bool wait( future_t & this ) {
+				oneshot temp;
+				if( !setup(this, temp) ) return false;
+
+				// Wait context is setup, just wait on it
+				bool ret = wait( temp );
+
+				// Wait for the future to tru
+				while( this.ptr == 2p ) Pause();
+				// Make sure the state makes sense
+				// Should be fulfilled, could be in progress but it's out of date if so
+				// since if that is the case, the oneshot was fulfilled (unparking this thread)
+				// and the oneshot should not be needed any more
+				__attribute__((unused)) struct oneshot * was = this.ptr;
+				/* paranoid */ verifyf( was == 1p, "Expected this.ptr to be 1p, was %p\n", was );
+
+				// Mark the future as fulfilled, to be consistent
+				// with potential calls to avail
+				// this.ptr = 1p;
+				return ret;
+			}
+		}
+
 		//-----------------------------------------------------------------------
 		// Statics call at the end of each thread to register statistics
Index: libcfa/src/concurrency/kernel/startup.cfa
===================================================================
--- libcfa/src/concurrency/kernel/startup.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/kernel/startup.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -199,5 +199,5 @@
 	void ?{}(processor & this) with( this ) {
 		( this.idle ){};
-		( this.terminated ){ 0 };
+		( this.terminated ){};
 		( this.runner ){};
 		init( this, "Main Processor", *mainCluster );
@@ -528,5 +528,5 @@
 void ?{}(processor & this, const char name[], cluster & _cltr) {
 	( this.idle ){};
-	( this.terminated ){ 0 };
+	( this.terminated ){};
 	( this.runner ){};
 
@@ -549,5 +549,5 @@
 		__wake_proc( &this );
 
-		P( terminated );
+		wait( terminated );
 		/* paranoid */ verify( active_processor() != &this);
 	}
Index: libcfa/src/concurrency/locks.cfa
===================================================================
--- libcfa/src/concurrency/locks.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/locks.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -7,5 +7,5 @@
 //-----------------------------------------------------------------------------
 // info_thread
-forall(dtype L | is_blocking_lock(L)) {
+forall(L & | is_blocking_lock(L)) {
 	struct info_thread {
 		// used to put info_thread on a dl queue (aka sequence)
@@ -195,5 +195,5 @@
 //-----------------------------------------------------------------------------
 // alarm node wrapper
-forall(dtype L | is_blocking_lock(L)) {
+forall(L & | is_blocking_lock(L)) {
 	struct alarm_node_wrap {
 		alarm_node_t alarm_node;
@@ -239,5 +239,5 @@
 //-----------------------------------------------------------------------------
 // condition variable
-forall(dtype L | is_blocking_lock(L)) {
+forall(L & | is_blocking_lock(L)) {
 
 	void ?{}( condition_variable(L) & this ){
@@ -356,2 +356,60 @@
 	bool wait( condition_variable(L) & this, L & l, uintptr_t info, Time time         ) with(this) { WAIT_TIME( info, &l , time ) }
 }
+
+//-----------------------------------------------------------------------------
+// Semaphore
+void  ?{}( semaphore & this, int count = 1 ) {
+	(this.lock){};
+	this.count = count;
+	(this.waiting){};
+}
+void ^?{}(semaphore & this) {}
+
+bool P(semaphore & this) with( this ){
+	lock( lock __cfaabi_dbg_ctx2 );
+	count -= 1;
+	if ( count < 0 ) {
+		// queue current task
+		append( waiting, active_thread() );
+
+		// atomically release spin lock and block
+		unlock( lock );
+		park();
+		return true;
+	}
+	else {
+	    unlock( lock );
+	    return false;
+	}
+}
+
+bool V(semaphore & this) with( this ) {
+	$thread * thrd = 0p;
+	lock( lock __cfaabi_dbg_ctx2 );
+	count += 1;
+	if ( count <= 0 ) {
+		// remove task at head of waiting list
+		thrd = pop_head( waiting );
+	}
+
+	unlock( lock );
+
+	// make new owner
+	unpark( thrd );
+
+	return thrd != 0p;
+}
+
+bool V(semaphore & this, unsigned diff) with( this ) {
+	$thread * thrd = 0p;
+	lock( lock __cfaabi_dbg_ctx2 );
+	int release = max(-count, (int)diff);
+	count += diff;
+	for(release) {
+		unpark( pop_head( waiting ) );
+	}
+
+	unlock( lock );
+
+	return thrd != 0p;
+}
Index: libcfa/src/concurrency/locks.hfa
===================================================================
--- libcfa/src/concurrency/locks.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/locks.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -13,5 +13,5 @@
 //-----------------------------------------------------------------------------
 // is_blocking_lock
-trait is_blocking_lock(dtype L | sized(L)) {
+trait is_blocking_lock(L & | sized(L)) {
 	// For synchronization locks to use when acquiring
 	void on_notify( L &, struct $thread * );
@@ -31,5 +31,5 @@
 // the info thread is a wrapper around a thread used
 // to store extra data for use in the condition variable
-forall(dtype L | is_blocking_lock(L)) {
+forall(L & | is_blocking_lock(L)) {
 	struct info_thread;
 
@@ -120,5 +120,5 @@
 //-----------------------------------------------------------------------------
 // Synchronization Locks
-forall(dtype L | is_blocking_lock(L)) {
+forall(L & | is_blocking_lock(L)) {
 	struct condition_variable {
 		// Spin lock used for mutual exclusion
@@ -157,2 +157,16 @@
 	bool wait( condition_variable(L) & this, L & l, uintptr_t info, Time time );
 }
+
+//-----------------------------------------------------------------------------
+// Semaphore
+struct semaphore {
+	__spinlock_t lock;
+	int count;
+	__queue_t($thread) waiting;
+};
+
+void  ?{}(semaphore & this, int count = 1);
+void ^?{}(semaphore & this);
+bool   P (semaphore & this);
+bool   V (semaphore & this);
+bool   V (semaphore & this, unsigned count);
Index: libcfa/src/concurrency/monitor.cfa
===================================================================
--- libcfa/src/concurrency/monitor.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/monitor.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -50,5 +50,5 @@
 static inline [$thread *, int] search_entry_queue( const __waitfor_mask_t &, $monitor * monitors [], __lock_size_t count );
 
-forall(dtype T | sized( T ))
+forall(T & | sized( T ))
 static inline __lock_size_t insert_unique( T * array [], __lock_size_t & size, T * val );
 static inline __lock_size_t count_max    ( const __waitfor_mask_t & mask );
@@ -949,5 +949,5 @@
 }
 
-forall(dtype T | sized( T ))
+forall(T & | sized( T ))
 static inline __lock_size_t insert_unique( T * array [], __lock_size_t & size, T * val ) {
 	if( !val ) return size;
Index: libcfa/src/concurrency/monitor.hfa
===================================================================
--- libcfa/src/concurrency/monitor.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/monitor.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -22,5 +22,5 @@
 #include "stdlib.hfa"
 
-trait is_monitor(dtype T) {
+trait is_monitor(T &) {
 	$monitor * get_monitor( T & );
 	void ^?{}( T & mutex );
@@ -59,5 +59,5 @@
 void ^?{}( monitor_dtor_guard_t & this );
 
-static inline forall( dtype T | sized(T) | { void ^?{}( T & mutex ); } )
+static inline forall( T & | sized(T) | { void ^?{}( T & mutex ); } )
 void delete( T * th ) {
 	^(*th){};
Index: libcfa/src/concurrency/mutex.cfa
===================================================================
--- libcfa/src/concurrency/mutex.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/mutex.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -164,5 +164,5 @@
 }
 
-forall(dtype L | is_lock(L))
+forall(L & | is_lock(L))
 void wait(condition_variable & this, L & l) {
 	lock( this.lock __cfaabi_dbg_ctx2 );
@@ -176,5 +176,5 @@
 //-----------------------------------------------------------------------------
 // Scopes
-forall(dtype L | is_lock(L))
+forall(L & | is_lock(L))
 void lock_all  ( L * locks[], size_t count) {
 	// Sort locks based on addresses
@@ -188,5 +188,5 @@
 }
 
-forall(dtype L | is_lock(L))
+forall(L & | is_lock(L))
 void unlock_all( L * locks[], size_t count) {
 	// Lock all
Index: libcfa/src/concurrency/mutex.hfa
===================================================================
--- libcfa/src/concurrency/mutex.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/mutex.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -70,5 +70,5 @@
 void unlock(recursive_mutex_lock & this) __attribute__((deprecated("use concurrency/locks.hfa instead")));
 
-trait is_lock(dtype L | sized(L)) {
+trait is_lock(L & | sized(L)) {
 	void lock  (L &);
 	void unlock(L &);
@@ -94,10 +94,10 @@
 void wait(condition_variable & this) __attribute__((deprecated("use concurrency/locks.hfa instead")));
 
-forall(dtype L | is_lock(L))
+forall(L & | is_lock(L))
 void wait(condition_variable & this, L & l) __attribute__((deprecated("use concurrency/locks.hfa instead")));
 
 //-----------------------------------------------------------------------------
 // Scopes
-forall(dtype L | is_lock(L)) {
+forall(L & | is_lock(L)) {
 	#if !defined( __TUPLE_ARRAYS_EXIST__ )
 	void lock  ( L * locks [], size_t count);
Index: libcfa/src/concurrency/preemption.cfa
===================================================================
--- libcfa/src/concurrency/preemption.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/preemption.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -616,4 +616,9 @@
 }
 
+// Prevent preemption since we are about to start terminating things
+void __kernel_abort_lock(void) {
+	signal_block( SIGUSR1 );
+}
+
 // Raii ctor/dtor for the preemption_scope
 // Used by thread to control when they want to receive preemption signals
Index: libcfa/src/concurrency/thread.cfa
===================================================================
--- libcfa/src/concurrency/thread.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/thread.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -62,7 +62,7 @@
 }
 
-FORALL_DATA_INSTANCE(ThreadCancelled, (dtype thread_t), (thread_t))
+FORALL_DATA_INSTANCE(ThreadCancelled, (thread_t &), (thread_t))
 
-forall(dtype T)
+forall(T &)
 void copy(ThreadCancelled(T) * dst, ThreadCancelled(T) * src) {
 	dst->virtual_table = src->virtual_table;
@@ -71,23 +71,23 @@
 }
 
-forall(dtype T)
+forall(T &)
 const char * msg(ThreadCancelled(T) *) {
 	return "ThreadCancelled";
 }
 
-forall(dtype T)
+forall(T &)
 static void default_thread_cancel_handler(ThreadCancelled(T) & ) {
 	abort( "Unhandled thread cancellation.\n" );
 }
 
-forall(dtype T | is_thread(T) | IS_EXCEPTION(ThreadCancelled, (T)))
+forall(T & | is_thread(T) | IS_EXCEPTION(ThreadCancelled, (T)))
 void ?{}( thread_dtor_guard_t & this,
-		T & thrd, void(*defaultResumptionHandler)(ThreadCancelled(T) &)) {
-	$monitor * m = get_monitor(thrd);
+		T & thrd, void(*cancelHandler)(ThreadCancelled(T) &)) {
+ 	$monitor * m = get_monitor(thrd);
 	$thread * desc = get_thread(thrd);
 
 	// Setup the monitor guard
 	void (*dtor)(T& mutex this) = ^?{};
-	bool join = defaultResumptionHandler != (void(*)(ThreadCancelled(T)&))0;
+	bool join = cancelHandler != (void(*)(ThreadCancelled(T)&))0;
 	(this.mg){&m, (void(*)())dtor, join};
 
@@ -103,7 +103,6 @@
 	}
 	desc->state = Cancelled;
-	if (!join) {
-		defaultResumptionHandler = default_thread_cancel_handler;
-	}
+	void(*defaultResumptionHandler)(ThreadCancelled(T) &) = 
+		join ? cancelHandler : default_thread_cancel_handler;
 
 	ThreadCancelled(T) except;
@@ -125,5 +124,5 @@
 //-----------------------------------------------------------------------------
 // Starting and stopping threads
-forall( dtype T | is_thread(T) )
+forall( T & | is_thread(T) )
 void __thrd_start( T & this, void (*main_p)(T &) ) {
 	$thread * this_thrd = get_thread(this);
@@ -141,5 +140,5 @@
 //-----------------------------------------------------------------------------
 // Support for threads that don't ues the thread keyword
-forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T&); } )
+forall( T & | sized(T) | is_thread(T) | { void ?{}(T&); } )
 void ?{}( scoped(T)& this ) with( this ) {
 	handle{};
@@ -147,5 +146,5 @@
 }
 
-forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T&, P); } )
+forall( T &, P... | sized(T) | is_thread(T) | { void ?{}(T&, P); } )
 void ?{}( scoped(T)& this, P params ) with( this ) {
 	handle{ params };
@@ -153,5 +152,5 @@
 }
 
-forall( dtype T | sized(T) | is_thread(T) )
+forall( T & | sized(T) | is_thread(T) )
 void ^?{}( scoped(T)& this ) with( this ) {
 	^handle{};
@@ -159,5 +158,5 @@
 
 //-----------------------------------------------------------------------------
-forall(dtype T | is_thread(T) | IS_RESUMPTION_EXCEPTION(ThreadCancelled, (T)))
+forall(T & | is_thread(T) | IS_RESUMPTION_EXCEPTION(ThreadCancelled, (T)))
 T & join( T & this ) {
 	thread_dtor_guard_t guard = { this, defaultResumptionHandler };
Index: libcfa/src/concurrency/thread.hfa
===================================================================
--- libcfa/src/concurrency/thread.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/concurrency/thread.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -26,5 +26,5 @@
 //-----------------------------------------------------------------------------
 // thread trait
-trait is_thread(dtype T) {
+trait is_thread(T &) {
 	void ^?{}(T& mutex this);
 	void main(T& this);
@@ -32,13 +32,13 @@
 };
 
-FORALL_DATA_EXCEPTION(ThreadCancelled, (dtype thread_t), (thread_t)) (
+FORALL_DATA_EXCEPTION(ThreadCancelled, (thread_t &), (thread_t)) (
 	thread_t * the_thread;
 	exception_t * the_exception;
 );
 
-forall(dtype T)
+forall(T &)
 void copy(ThreadCancelled(T) * dst, ThreadCancelled(T) * src);
 
-forall(dtype T)
+forall(T &)
 const char * msg(ThreadCancelled(T) *);
 
@@ -47,8 +47,8 @@
 
 // Inline getters for threads/coroutines/monitors
-forall( dtype T | is_thread(T) )
+forall( T & | is_thread(T) )
 static inline $coroutine* get_coroutine(T & this) __attribute__((const)) { return &get_thread(this)->self_cor; }
 
-forall( dtype T | is_thread(T) )
+forall( T & | is_thread(T) )
 static inline $monitor  * get_monitor  (T & this) __attribute__((const)) { return &get_thread(this)->self_mon; }
 
@@ -60,5 +60,5 @@
 extern struct cluster * mainCluster;
 
-forall( dtype T | is_thread(T) )
+forall( T & | is_thread(T) )
 void __thrd_start( T & this, void (*)(T &) );
 
@@ -82,5 +82,5 @@
 };
 
-forall( dtype T | is_thread(T) | IS_EXCEPTION(ThreadCancelled, (T)) )
+forall( T & | is_thread(T) | IS_EXCEPTION(ThreadCancelled, (T)) )
 void ?{}( thread_dtor_guard_t & this, T & thrd, void(*)(ThreadCancelled(T) &) );
 void ^?{}( thread_dtor_guard_t & this );
@@ -89,16 +89,16 @@
 // thread runner
 // Structure that actually start and stop threads
-forall( dtype T | sized(T) | is_thread(T) )
+forall( T & | sized(T) | is_thread(T) )
 struct scoped {
 	T handle;
 };
 
-forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T&); } )
+forall( T & | sized(T) | is_thread(T) | { void ?{}(T&); } )
 void ?{}( scoped(T)& this );
 
-forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T&, P); } )
+forall( T &, P... | sized(T) | is_thread(T) | { void ?{}(T&, P); } )
 void ?{}( scoped(T)& this, P params );
 
-forall( dtype T | sized(T) | is_thread(T) )
+forall( T & | sized(T) | is_thread(T) )
 void ^?{}( scoped(T)& this );
 
@@ -115,5 +115,5 @@
 void unpark( $thread * this );
 
-forall( dtype T | is_thread(T) )
+forall( T & | is_thread(T) )
 static inline void unpark( T & this ) { if(!&this) return; unpark( get_thread( this ) );}
 
@@ -128,5 +128,5 @@
 //----------
 // join
-forall( dtype T | is_thread(T) | IS_RESUMPTION_EXCEPTION(ThreadCancelled, (T)) )
+forall( T & | is_thread(T) | IS_RESUMPTION_EXCEPTION(ThreadCancelled, (T)) )
 T & join( T & this );
 
Index: libcfa/src/containers/list.hfa
===================================================================
--- libcfa/src/containers/list.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/list.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -66,5 +66,5 @@
 #define __DLISTED_MGD_JUSTIMPL(STRUCT)
 
-forall( dtype tE ) {
+forall( tE & ) {
 	struct $mgd_link {
 		tE *elem;
@@ -83,5 +83,5 @@
 		(this.is_terminator){ 1 };
 	}
-	forall ( otype tInit | { void ?{}( $mgd_link(tE) &, tInit); } )
+	forall ( tInit | { void ?{}( $mgd_link(tE) &, tInit); } )
 	static inline void ?=?( $mgd_link(tE) &this, tInit i ) {
 		^?{}( this );
@@ -115,5 +115,5 @@
   __DLISTED_MGD_COMMON(STRUCT, STRUCT, $links)
 
-trait $dlistable(dtype Tnode, dtype Telem) {
+trait $dlistable(Tnode &, Telem &) {
 	$mgd_link(Telem) & $prev_link(Tnode &);
 	$mgd_link(Telem) & $next_link(Tnode &);
@@ -125,5 +125,5 @@
 };
 
-forall (dtype Tnode, dtype Telem | $dlistable(Tnode, Telem)) {
+forall (Tnode &, Telem & | $dlistable(Tnode, Telem)) {
 
 	// implemented as a sentinel item in an underlying cicrular list
Index: libcfa/src/containers/maybe.cfa
===================================================================
--- libcfa/src/containers/maybe.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/maybe.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -18,10 +18,10 @@
 
 
-forall(otype T)
+forall(T)
 void ?{}(maybe(T) & this) {
 	this.has_value = false;
 }
 
-forall(otype T)
+forall(T)
 void ?{}(maybe(T) & this, T value) {
 	this.has_value = true;
@@ -29,5 +29,5 @@
 }
 
-forall(otype T)
+forall(T)
 void ?{}(maybe(T) & this, maybe(T) other) {
 	this.has_value = other.has_value;
@@ -37,5 +37,5 @@
 }
 
-forall(otype T)
+forall(T)
 maybe(T) ?=?(maybe(T) & this, maybe(T) that) {
 	if (this.has_value && that.has_value) {
@@ -51,5 +51,5 @@
 }
 
-forall(otype T)
+forall(T)
 void ^?{}(maybe(T) & this) {
 	if (this.has_value) {
@@ -58,25 +58,25 @@
 }
 
-forall(otype T)
+forall(T)
 bool ?!=?(maybe(T) this, zero_t) {
 	return this.has_value;
 }
 
-forall(otype T)
+forall(T)
 maybe(T) maybe_value(T value) {
 	return (maybe(T)){value};
 }
 
-forall(otype T)
+forall(T)
 maybe(T) maybe_none() {
 	return (maybe(T)){};
 }
 
-forall(otype T)
+forall(T)
 bool has_value(maybe(T) * this) {
 	return this->has_value;
 }
 
-forall(otype T)
+forall(T)
 T get(maybe(T) * this) {
 	assertf(this->has_value, "attempt to get from maybe without value");
@@ -84,5 +84,5 @@
 }
 
-forall(otype T)
+forall(T)
 void set(maybe(T) * this, T value) {
 	if (this->has_value) {
@@ -94,5 +94,5 @@
 }
 
-forall(otype T)
+forall(T)
 void set_none(maybe(T) * this) {
 	if (this->has_value) {
Index: libcfa/src/containers/maybe.hfa
===================================================================
--- libcfa/src/containers/maybe.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/maybe.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -19,5 +19,5 @@
 
 // DO NOT USE DIRECTLY!
-forall(otype T)
+forall(T)
 struct maybe {
     bool has_value;
@@ -26,40 +26,40 @@
 
 
-forall(otype T)
+forall(T)
 void ?{}(maybe(T) & this);
 
-forall(otype T)
+forall(T)
 void ?{}(maybe(T) & this, T value);
 
-forall(otype T)
+forall(T)
 void ?{}(maybe(T) & this, maybe(T) other);
 
-forall(otype T)
+forall(T)
 void ^?{}(maybe(T) & this);
 
-forall(otype T)
+forall(T)
 maybe(T) ?=?(maybe(T) & this, maybe(T) other);
 
-forall(otype T)
+forall(T)
 bool ?!=?(maybe(T) this, zero_t);
 
 /* Waiting for bug#11 to be fixed.
-forall(otype T)
+forall(T)
 maybe(T) maybe_value(T value);
 
-forall(otype T)
+forall(T)
 maybe(T) maybe_none();
 */
 
-forall(otype T)
+forall(T)
 bool has_value(maybe(T) * this);
 
-forall(otype T)
+forall(T)
 T get(maybe(T) * this);
 
-forall(otype T)
+forall(T)
 void set(maybe(T) * this, T value);
 
-forall(otype T)
+forall(T)
 void set_none(maybe(T) * this);
 
Index: libcfa/src/containers/pair.cfa
===================================================================
--- libcfa/src/containers/pair.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/pair.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -13,5 +13,5 @@
 #include <containers/pair.hfa>
 
-forall(otype R, otype S
+forall(R, S
 	| { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); })
 int ?<?(pair(R, S) p, pair(R, S) q) {
@@ -19,5 +19,5 @@
 }
 
-forall(otype R, otype S
+forall(R, S
 	| { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); })
 int ?<=?(pair(R, S) p, pair(R, S) q) {
@@ -25,15 +25,15 @@
 }
 
-forall(otype R, otype S | { int ?==?(R, R); int ?==?(S, S); })
+forall(R, S | { int ?==?(R, R); int ?==?(S, S); })
 int ?==?(pair(R, S) p, pair(R, S) q) {
 	return p.first == q.first && p.second == q.second;
 }
 
-forall(otype R, otype S | { int ?!=?(R, R); int ?!=?(S, S); })
+forall(R, S | { int ?!=?(R, R); int ?!=?(S, S); })
 int ?!=?(pair(R, S) p, pair(R, S) q) {
 	return p.first != q.first || p.second != q.second;
 }
 
-forall(otype R, otype S
+forall(R, S
 	| { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); })
 int ?>?(pair(R, S) p, pair(R, S) q) {
@@ -41,5 +41,5 @@
 }
 
-forall(otype R, otype S
+forall(R, S
 	| { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); })
 int ?>=?(pair(R, S) p, pair(R, S) q) {
Index: libcfa/src/containers/pair.hfa
===================================================================
--- libcfa/src/containers/pair.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/pair.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -16,28 +16,28 @@
 #pragma once
 
-forall(otype R, otype S) struct pair {
+forall(R, S) struct pair {
 	R first;
 	S second;
 };
 
-forall(otype R, otype S 
+forall(R, S 
 	| { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); })
 int ?<?(pair(R, S) p, pair(R, S) q);
 
-forall(otype R, otype S 
+forall(R, S 
 	| { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); })
 int ?<=?(pair(R, S) p, pair(R, S) q);
 
-forall(otype R, otype S | { int ?==?(R, R); int ?==?(S, S); })
+forall(R, S | { int ?==?(R, R); int ?==?(S, S); })
 int ?==?(pair(R, S) p, pair(R, S) q);
 
-forall(otype R, otype S | { int ?!=?(R, R); int ?!=?(S, S); })
+forall(R, S | { int ?!=?(R, R); int ?!=?(S, S); })
 int ?!=?(pair(R, S) p, pair(R, S) q);
 
-forall(otype R, otype S 
+forall(R, S 
 	| { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); })
 int ?>?(pair(R, S) p, pair(R, S) q);
 
-forall(otype R, otype S 
+forall(R, S 
 	| { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); })
 int ?>=?(pair(R, S) p, pair(R, S) q);
Index: libcfa/src/containers/result.cfa
===================================================================
--- libcfa/src/containers/result.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/result.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -18,5 +18,5 @@
 
 
-forall(otype T, otype E)
+forall(T, E)
 void ?{}(result(T, E) & this) {
 	this.has_value = false;
@@ -24,5 +24,5 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 void ?{}(result(T, E) & this, one_t, T value) {
 	this.has_value = true;
@@ -30,5 +30,5 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 void ?{}(result(T, E) & this, zero_t, E error) {
 	this.has_value = false;
@@ -36,5 +36,5 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 void ?{}(result(T, E) & this, result(T, E) other) {
 	this.has_value = other.has_value;
@@ -46,5 +46,5 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 result(T, E) ?=?(result(T, E) & this, result(T, E) that) {
 	if (this.has_value && that.has_value) {
@@ -63,5 +63,5 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 void ^?{}(result(T, E) & this) {
 	if (this.has_value) {
@@ -72,25 +72,25 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 bool ?!=?(result(T, E) this, zero_t) {
 	return this.has_value;
 }
 
-forall(otype T, otype E)
+forall(T, E)
 result(T, E) result_value(T value) {
 	return (result(T, E)){1, value};
 }
 
-forall(otype T, otype E)
+forall(T, E)
 result(T, E) result_error(E error) {
 	return (result(T, E)){0, error};
 }
 
-forall(otype T, otype E)
+forall(T, E)
 bool has_value(result(T, E) * this) {
 	return this->has_value;
 }
 
-forall(otype T, otype E)
+forall(T, E)
 T get(result(T, E) * this) {
 	assertf(this->has_value, "attempt to get from result without value");
@@ -98,5 +98,5 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 E get_error(result(T, E) * this) {
 	assertf(!this->has_value, "attempt to get from result without error");
@@ -104,5 +104,5 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 void set(result(T, E) * this, T value) {
 	if (this->has_value) {
@@ -115,5 +115,5 @@
 }
 
-forall(otype T, otype E)
+forall(T, E)
 void set_error(result(T, E) * this, E error) {
 	if (this->has_value) {
Index: libcfa/src/containers/result.hfa
===================================================================
--- libcfa/src/containers/result.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/result.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -19,5 +19,5 @@
 
 // DO NOT USE DIRECTLY!
-forall(otype T, otype E)
+forall(T, E)
 union inner_result{
 	T value;
@@ -25,5 +25,5 @@
 };
 
-forall(otype T, otype E)
+forall(T, E)
 struct result {
 	bool has_value;
@@ -32,46 +32,46 @@
 
 
-forall(otype T, otype E)
+forall(T, E)
 void ?{}(result(T, E) & this);
 
-forall(otype T, otype E)
+forall(T, E)
 void ?{}(result(T, E) & this, one_t, T value);
 
-forall(otype T, otype E)
+forall(T, E)
 void ?{}(result(T, E) & this, zero_t, E error);
 
-forall(otype T, otype E)
+forall(T, E)
 void ?{}(result(T, E) & this, result(T, E) other);
 
-forall(otype T, otype E)
+forall(T, E)
 void ^?{}(result(T, E) & this);
 
-forall(otype T, otype E)
+forall(T, E)
 result(T, E) ?=?(result(T, E) & this, result(T, E) other);
 
-forall(otype T, otype E)
+forall(T, E)
 bool ?!=?(result(T, E) this, zero_t);
 
 /* Wating for bug#11 to be fixed.
-forall(otype T, otype E)
+forall(T, E)
 result(T, E) result_value(T value);
 
-forall(otype T, otype E)
+forall(T, E)
 result(T, E) result_error(E error);
 */
 
-forall(otype T, otype E)
+forall(T, E)
 bool has_value(result(T, E) * this);
 
-forall(otype T, otype E)
+forall(T, E)
 T get(result(T, E) * this);
 
-forall(otype T, otype E)
+forall(T, E)
 E get_error(result(T, E) * this);
 
-forall(otype T, otype E)
+forall(T, E)
 void set(result(T, E) * this, T value);
 
-forall(otype T, otype E)
+forall(T, E)
 void set_error(result(T, E) * this, E error);
 
Index: libcfa/src/containers/stackLockFree.hfa
===================================================================
--- libcfa/src/containers/stackLockFree.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/stackLockFree.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -9,6 +9,6 @@
 // Created On       : Wed May 13 20:58:58 2020
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Jun 14 13:25:09 2020
-// Update Count     : 64
+// Last Modified On : Wed Jan 20 20:40:03 2021
+// Update Count     : 67
 //
 
@@ -17,5 +17,5 @@
 #include <stdint.h>
 
-forall( dtype T )
+forall( T & )
 union Link {
 	struct {											// 32/64-bit x 2
@@ -31,5 +31,5 @@
 }; // Link
 
-forall( otype T | sized(T) | { Link(T) * ?`next( T * ); } ) {
+forall( T | sized(T) | { Link(T) * ?`next( T * ); } ) {
 	struct StackLF {
 		Link(T) stack;
@@ -42,5 +42,5 @@
 
 		void push( StackLF(T) & this, T & n ) with(this) {
-			*( &n )`next = stack;					// atomic assignment unnecessary, or use CAA
+			*( &n )`next = stack;						// atomic assignment unnecessary, or use CAA
 			for () {									// busy wait
 			  if ( __atomic_compare_exchange_n( &stack.atom, &( &n )`next->atom, (Link(T))@{ {&n, ( &n )`next->count + 1} }.atom, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST ) ) break; // attempt to update top node
@@ -65,5 +65,5 @@
 				}
 				if( next == 0p ) return false;
-				link = (next)`next;
+				link = ( next )`next;
 			}
 		}
Index: libcfa/src/containers/vector.cfa
===================================================================
--- libcfa/src/containers/vector.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/vector.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -18,10 +18,10 @@
 #include <stdlib.hfa>
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void copy_internal(vector(T, allocator_t)* this, vector(T, allocator_t)* other);
 
 //------------------------------------------------------------------------------
 //Initialization
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void ?{}(vector(T, allocator_t)& this)
 {
@@ -30,5 +30,5 @@
 }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void ?{}(vector(T, allocator_t)& this, vector(T, allocator_t) rhs)
 {
@@ -37,5 +37,5 @@
 }
 
-// forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+// forall(T, allocator_t | allocator_c(T, allocator_t))
 // vector(T, allocator_t) ?=?(vector(T, allocator_t)* this, vector(T, allocator_t) rhs)
 // {
@@ -45,5 +45,5 @@
 // }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void ^?{}(vector(T, allocator_t)& this)
 {
@@ -54,5 +54,5 @@
 //------------------------------------------------------------------------------
 //Modifiers
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void push_back(vector(T, allocator_t)* this, T value)
 {
@@ -62,5 +62,5 @@
 }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void pop_back(vector(T, allocator_t)* this)
 {
@@ -69,5 +69,5 @@
 }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void clear(vector(T, allocator_t)* this)
 {
@@ -82,5 +82,5 @@
 //Internal Helpers
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void copy_internal(vector(T, allocator_t)* this, vector(T, allocator_t)* other)
 {
@@ -93,5 +93,5 @@
 //------------------------------------------------------------------------------
 //Allocator
-forall(otype T)
+forall(T)
 void ?{}(heap_allocator(T)& this)
 {
@@ -100,5 +100,5 @@
 }
 
-forall(otype T)
+forall(T)
 void ?{}(heap_allocator(T)& this, heap_allocator(T) rhs)
 {
@@ -107,5 +107,5 @@
 }
 
-forall(otype T)
+forall(T)
 heap_allocator(T) ?=?(heap_allocator(T)& this, heap_allocator(T) rhs)
 {
@@ -115,5 +115,5 @@
 }
 
-forall(otype T)
+forall(T)
 void ^?{}(heap_allocator(T)& this)
 {
@@ -121,5 +121,5 @@
 }
 
-forall(otype T)
+forall(T)
 inline void realloc_storage(heap_allocator(T)* this, size_t size)
 {
Index: libcfa/src/containers/vector.hfa
===================================================================
--- libcfa/src/containers/vector.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/containers/vector.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -20,5 +20,5 @@
 //------------------------------------------------------------------------------
 //Allocator
-forall(otype T)
+forall(T)
 struct heap_allocator
 {
@@ -27,20 +27,20 @@
 };
 
-forall(otype T)
+forall(T)
 void ?{}(heap_allocator(T)& this);
 
-forall(otype T)
+forall(T)
 void ?{}(heap_allocator(T)& this, heap_allocator(T) rhs);
 
-forall(otype T)
+forall(T)
 heap_allocator(T) ?=?(heap_allocator(T)& this, heap_allocator(T) rhs);
 
-forall(otype T)
+forall(T)
 void ^?{}(heap_allocator(T)& this);
 
-forall(otype T)
+forall(T)
 void realloc_storage(heap_allocator(T)* this, size_t size);
 
-forall(otype T)
+forall(T)
 static inline T* data(heap_allocator(T)* this)
 {
@@ -50,5 +50,5 @@
 //------------------------------------------------------------------------------
 //Declaration
-trait allocator_c(otype T, otype allocator_t)
+trait allocator_c(T, allocator_t)
 {
 	void realloc_storage(allocator_t*, size_t);
@@ -56,22 +56,22 @@
 };
 
-forall(otype T, otype allocator_t = heap_allocator(T) | allocator_c(T, allocator_t))
+forall(T, allocator_t = heap_allocator(T) | allocator_c(T, allocator_t))
 struct vector;
 
 //------------------------------------------------------------------------------
 //Initialization
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void ?{}(vector(T, allocator_t)& this);
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void ?{}(vector(T, allocator_t)& this, vector(T, allocator_t) rhs);
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 vector(T, allocator_t) ?=?(vector(T, allocator_t)& this, vector(T, allocator_t) rhs);
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void ^?{}(vector(T, allocator_t)& this);
 
-forall(otype T, otype allocator_t = heap_allocator(T) | allocator_c(T, allocator_t))
+forall(T, allocator_t = heap_allocator(T) | allocator_c(T, allocator_t))
 struct vector
 {
@@ -82,5 +82,5 @@
 //------------------------------------------------------------------------------
 //Capacity
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline bool empty(vector(T, allocator_t)* this)
 {
@@ -88,5 +88,5 @@
 }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline size_t size(vector(T, allocator_t)* this)
 {
@@ -94,5 +94,5 @@
 }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline void reserve(vector(T, allocator_t)* this, size_t size)
 {
@@ -102,5 +102,5 @@
 //------------------------------------------------------------------------------
 //Element access
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline T at(vector(T, allocator_t)* this, size_t index)
 {
@@ -108,5 +108,5 @@
 }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline T ?[?](vector(T, allocator_t)* this, size_t index)
 {
@@ -114,5 +114,5 @@
 }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline T front(vector(T, allocator_t)* this)
 {
@@ -120,5 +120,5 @@
 }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline T back(vector(T, allocator_t)* this)
 {
@@ -128,16 +128,16 @@
 //------------------------------------------------------------------------------
 //Modifiers
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void push_back(vector(T, allocator_t)* this, T value);
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void pop_back(vector(T, allocator_t)* this);
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 void clear(vector(T, allocator_t)* this);
 
 //------------------------------------------------------------------------------
 //Iterators
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline T* begin(vector(T, allocator_t)* this)
 {
@@ -145,5 +145,5 @@
 }
 
-// forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+// forall(T, allocator_t | allocator_c(T, allocator_t))
 // static inline const T* cbegin(const vector(T, allocator_t)* this)
 // {
@@ -151,5 +151,5 @@
 // }
 
-forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+forall(T, allocator_t | allocator_c(T, allocator_t))
 static inline T* end(vector(T, allocator_t)* this)
 {
@@ -157,5 +157,5 @@
 }
 
-// forall(otype T, otype allocator_t | allocator_c(T, allocator_t))
+// forall(T, allocator_t | allocator_c(T, allocator_t))
 // static inline const T* cend(const vector(T, allocator_t)* this)
 // {
Index: libcfa/src/exception.h
===================================================================
--- libcfa/src/exception.h	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/exception.h	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -101,5 +101,5 @@
 // implemented in the .c file either so they all have to be inline.
 
-trait is_exception(dtype exceptT, dtype virtualT) {
+trait is_exception(exceptT &, virtualT &) {
 	/* The first field must be a pointer to a virtual table.
 	 * That virtual table must be a decendent of the base exception virtual table.
@@ -109,13 +109,13 @@
 };
 
-trait is_termination_exception(dtype exceptT, dtype virtualT | is_exception(exceptT, virtualT)) {
+trait is_termination_exception(exceptT &, virtualT & | is_exception(exceptT, virtualT)) {
 	void defaultTerminationHandler(exceptT &);
 };
 
-trait is_resumption_exception(dtype exceptT, dtype virtualT | is_exception(exceptT, virtualT)) {
+trait is_resumption_exception(exceptT &, virtualT & | is_exception(exceptT, virtualT)) {
 	void defaultResumptionHandler(exceptT &);
 };
 
-forall(dtype exceptT, dtype virtualT | is_termination_exception(exceptT, virtualT))
+forall(exceptT &, virtualT & | is_termination_exception(exceptT, virtualT))
 static inline void $throw(exceptT & except) {
 	__cfaehm_throw_terminate(
@@ -125,5 +125,5 @@
 }
 
-forall(dtype exceptT, dtype virtualT | is_resumption_exception(exceptT, virtualT))
+forall(exceptT &, virtualT & | is_resumption_exception(exceptT, virtualT))
 static inline void $throwResume(exceptT & except) {
 	__cfaehm_throw_resume(
@@ -133,15 +133,15 @@
 }
 
-forall(dtype exceptT, dtype virtualT | is_exception(exceptT, virtualT))
+forall(exceptT &, virtualT & | is_exception(exceptT, virtualT))
 static inline void cancel_stack(exceptT & except) __attribute__((noreturn)) {
 	__cfaehm_cancel_stack( (exception_t *)&except );
 }
 
-forall(dtype exceptT, dtype virtualT | is_exception(exceptT, virtualT))
+forall(exceptT &, virtualT & | is_exception(exceptT, virtualT))
 static inline void defaultTerminationHandler(exceptT & except) {
 	return cancel_stack( except );
 }
 
-forall(dtype exceptT, dtype virtualT | is_exception(exceptT, virtualT))
+forall(exceptT &, virtualT & | is_exception(exceptT, virtualT))
 static inline void defaultResumptionHandler(exceptT & except) {
 	throw except;
Index: libcfa/src/executor.cfa
===================================================================
--- libcfa/src/executor.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/executor.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -7,5 +7,5 @@
 #include <containers/list.hfa>
 
-forall( dtype T | $dlistable(T, T) ) {
+forall( T & | $dlistable(T, T) ) {
 	monitor Buffer {									// unbounded buffer
 		dlist( T, T ) queue;							// unbounded list of work requests
Index: libcfa/src/gmp.hfa
===================================================================
--- libcfa/src/gmp.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/gmp.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -255,5 +255,5 @@
 
 	// I/O
-	forall( dtype istype | istream( istype ) )
+	forall( istype & | istream( istype ) )
 		istype & ?|?( istype & is, Int & mp ) {
 		gmp_scanf( "%Zd", &mp );
@@ -261,5 +261,5 @@
 	} // ?|?
 
-	forall( dtype ostype | ostream( ostype ) ) {
+	forall( ostype & | ostream( ostype ) ) {
 		ostype & ?|?( ostype & os, Int mp ) {
 			if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) );
Index: libcfa/src/interpose.cfa
===================================================================
--- libcfa/src/interpose.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/interpose.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -125,12 +125,17 @@
 
 		// Failure handler
-		__cfaabi_sigaction( SIGSEGV, sigHandler_segv, SA_SIGINFO | SA_ONSTACK );
-		__cfaabi_sigaction( SIGBUS , sigHandler_segv, SA_SIGINFO | SA_ONSTACK );
-		__cfaabi_sigaction( SIGILL , sigHandler_ill , SA_SIGINFO | SA_ONSTACK );
-		__cfaabi_sigaction( SIGFPE , sigHandler_fpe , SA_SIGINFO | SA_ONSTACK );
-		__cfaabi_sigaction( SIGTERM, sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND ); // one shot handler, return to default
-		__cfaabi_sigaction( SIGINT , sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND );
-		__cfaabi_sigaction( SIGABRT, sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND );
-		__cfaabi_sigaction( SIGHUP , sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND ); // terminal hangup
+		 // internal errors
+		__cfaabi_sigaction( SIGSEGV, sigHandler_segv, SA_SIGINFO | SA_ONSTACK ); // Invalid memory reference (default: Core)
+		__cfaabi_sigaction( SIGBUS , sigHandler_segv, SA_SIGINFO | SA_ONSTACK ); // Bus error, bad memory access (default: Core)
+		__cfaabi_sigaction( SIGILL , sigHandler_ill , SA_SIGINFO | SA_ONSTACK ); // Illegal Instruction (default: Core)
+		__cfaabi_sigaction( SIGFPE , sigHandler_fpe , SA_SIGINFO | SA_ONSTACK ); // Floating-point exception (default: Core)
+
+ 		// handlers to outside errors
+		// reset in-case they insist and send it over and over
+		__cfaabi_sigaction( SIGTERM, sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND ); // Termination signal (default: Term)
+		__cfaabi_sigaction( SIGINT , sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND ); // Interrupt from keyboard (default: Term)
+		__cfaabi_sigaction( SIGHUP , sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND ); // Hangup detected on controlling terminal or death of controlling process (default: Term)
+		__cfaabi_sigaction( SIGQUIT, sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND ); // Quit from keyboard (default: Core)
+		__cfaabi_sigaction( SIGABRT, sigHandler_term, SA_SIGINFO | SA_ONSTACK | SA_RESETHAND ); // Abort signal from abort(3) (default: Core)
 	}
 }
@@ -163,8 +168,8 @@
 }
 
-void * kernel_abort( void ) __attribute__(( __nothrow__, __leaf__, __weak__ )) { return 0p; }
-void kernel_abort_msg( void * data, char buffer[], int size ) __attribute__(( __nothrow__, __leaf__, __weak__ )) {}
-// See concurrency/kernel.cfa for strong definition used in multi-processor mode.
-int kernel_abort_lastframe( void ) __attribute__(( __nothrow__, __leaf__, __weak__ )) { return 4; }
+// See concurrency/kernel.cfa and concurrency/preemption.cfa for strong definition used in multi-processor mode.
+void __kernel_abort_lock( void ) __attribute__(( __nothrow__, __leaf__, __weak__ )) {}
+void __kernel_abort_msg( char buffer[], int size ) __attribute__(( __nothrow__, __leaf__, __weak__ )) {}
+int __kernel_abort_lastframe( void ) __attribute__(( __nothrow__, __leaf__, __weak__ )) { return 4; }
 
 enum { abort_text_size = 1024 };
@@ -173,5 +178,5 @@
 static void __cfaabi_backtrace( int start ) {
 	enum { Frames = 50, };								// maximum number of stack frames
-	int last = kernel_abort_lastframe();				// skip last N stack frames
+	int last = __kernel_abort_lastframe();				// skip last N stack frames
 
 	void * array[Frames];
@@ -220,50 +225,44 @@
 }
 
-static volatile int __abort_stage = 0;
+static volatile bool __abort_first = 0;
 
 // Cannot forward va_list.
 void __abort( bool signalAbort, const char fmt[], va_list args ) {
-	int stage = __atomic_add_fetch( &__abort_stage, 1, __ATOMIC_SEQ_CST );
-
-	// First stage: stop the cforall kernel and print
-	if(stage == 1) {
-		// increment stage
-		stage = __atomic_add_fetch( &__abort_stage, 1, __ATOMIC_SEQ_CST );
-
-		// must be done here to lock down kernel
-		void * kernel_data = kernel_abort();
-		int len;
-
-		signal( SIGABRT, SIG_DFL );							// prevent final "real" abort from recursing to handler
-
-		len = snprintf( abort_text, abort_text_size, "Cforall Runtime error (UNIX pid:%ld) ", (long int)getpid() ); // use UNIX pid (versus getPid)
-		__cfaabi_bits_write( STDERR_FILENO, abort_text, len );
-
-		assert( fmt );
-		len = vsnprintf( abort_text, abort_text_size, fmt, args );
-		__cfaabi_bits_write( STDERR_FILENO, abort_text, len );
-
-		// add optional newline if missing at the end of the format text
-		if ( fmt[strlen( fmt ) - 1] != '\n' ) {
-			__cfaabi_bits_write( STDERR_FILENO, "\n", 1 );
-		} // if
-		kernel_abort_msg( kernel_data, abort_text, abort_text_size );
-	}
-
-	// Second stage: print the backtrace
-	if(stage == 2) {
-		// increment stage
-		stage = __atomic_add_fetch( &__abort_stage, 1, __ATOMIC_SEQ_CST );
-
-		// print stack trace in handler
-		__cfaabi_backtrace( signalAbort ? 4 : 2 );
-	}
-
-	do {
-		// Finally call abort
+	// Multiple threads can come here from multiple paths
+	// To make sure this is safe any concurrent/subsequent call to abort is redirected to libc-abort
+	bool first = ! __atomic_test_and_set( &__abort_first, __ATOMIC_SEQ_CST);
+
+	// Prevent preemption from kicking-in and messing with the abort
+	__kernel_abort_lock();
+
+	// first to abort ?
+	if ( !first ) {
+		// We aren't the first to abort just let C handle it
+		signal( SIGABRT, SIG_DFL );	// restore default in case we came here through the function.
 		__cabi_libc.abort();
-
-		// Loop so that we never return
-	} while(true);
+	}
+
+	int len = snprintf( abort_text, abort_text_size, "Cforall Runtime error (UNIX pid:%ld) ", (long int)getpid() ); // use UNIX pid (versus getPid)
+	__cfaabi_bits_write( STDERR_FILENO, abort_text, len );
+
+	// print the cause of the error
+	assert( fmt );
+	len = vsnprintf( abort_text, abort_text_size, fmt, args );
+	__cfaabi_bits_write( STDERR_FILENO, abort_text, len );
+
+	// add optional newline if missing at the end of the format text
+	if ( fmt[strlen( fmt ) - 1] != '\n' ) {
+		__cfaabi_bits_write( STDERR_FILENO, "\n", 1 );
+	} // if
+
+	// Give the kernel the chance to add some data in here
+	__kernel_abort_msg( abort_text, abort_text_size );
+
+	// print stack trace in handler
+	__cfaabi_backtrace( signalAbort ? 4 : 2 );
+
+	// Finally call abort
+	__cabi_libc.abort();
+
 }
 
@@ -282,10 +281,4 @@
     // CONTROL NEVER REACHES HERE!
     va_end( args );
-}
-
-extern "C" {
-	void __cfaabi_real_abort(void) {
-		__cabi_libc.abort();
-	}
 }
 
Index: libcfa/src/iostream.cfa
===================================================================
--- libcfa/src/iostream.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/iostream.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -36,5 +36,5 @@
 
 
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, bool b ) {
 		if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) );
@@ -402,5 +402,5 @@
 
 // tuples
-forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
+forall( ostype &, T, Params... | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
 	ostype & ?|?( ostype & os, T arg, Params rest ) {
 		(ostype &)(os | arg);							// print first argument
@@ -421,5 +421,5 @@
 
 // writes the range [begin, end) to the given stream
-forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) {
+forall( ostype &, elt_type | writeable( elt_type, ostype ), iterator_type | iterator( iterator_type, elt_type ) ) {
 	void write( iterator_type begin, iterator_type end, ostype & os ) {
 		void print( elt_type i ) { os | i; }
@@ -442,5 +442,5 @@
 // Default prefix for non-decimal prints is 0b, 0, 0x.
 #define IntegralFMTImpl( T, IFMTNP, IFMTP ) \
-forall( dtype ostype | ostream( ostype ) ) { \
+forall( ostype & | ostream( ostype ) ) { \
 	ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
 		if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) ); \
@@ -535,5 +535,5 @@
 // Default prefix for non-decimal prints is 0b, 0, 0x.
 #define IntegralFMTImpl128( T, SIGNED, CODE, IFMTNP, IFMTP ) \
-forall( dtype ostype | ostream( ostype ) ) \
+forall( ostype & | ostream( ostype ) ) \
 static void base10_128( ostype & os, _Ostream_Manip(T) f ) { \
 	if ( f.val > UINT64_MAX ) { \
@@ -552,5 +552,5 @@
 	} /* if */ \
 } /* base10_128 */ \
-forall( dtype ostype | ostream( ostype ) ) { \
+forall( ostype & | ostream( ostype ) ) { \
 	ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
 		if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) ); \
@@ -654,5 +654,5 @@
 #if defined( __SIZEOF_INT128__ )
 // Default prefix for non-decimal prints is 0b, 0, 0x.
-forall( dtype ostype | ostream( ostype ) )
+forall( ostype & | ostream( ostype ) )
 static inline void base_128( ostype & os, unsigned int128 val, unsigned int128 power, _Ostream_Manip(uint64_t) & f, unsigned int maxdig, unsigned int bits, unsigned int cnt = 0 ) {
 	int wd = 1;											// f.wd is never 0 because 0 implies left-pad
@@ -719,5 +719,5 @@
 
 #define IntegralFMTImpl128( T ) \
-forall( dtype ostype | ostream( ostype ) ) { \
+forall( ostype & | ostream( ostype ) ) { \
 	ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
 		_Ostream_Manip(uint64_t) fmt; \
@@ -767,5 +767,5 @@
 
 #define FloatingPointFMTImpl( T, DFMTNP, DFMTP ) \
-forall( dtype ostype | ostream( ostype ) ) { \
+forall( ostype & | ostream( ostype ) ) { \
 	ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
 		if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) ); \
@@ -801,5 +801,5 @@
 // *********************************** character ***********************************
 
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, _Ostream_Manip(char) f ) {
 		if ( f.base != 'c' ) {							// bespoke binary/octal/hex format
@@ -834,5 +834,5 @@
 // *********************************** C string ***********************************
 
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, _Ostream_Manip(const char *) f ) {
 		if ( ! f.val ) return os;						// null pointer ?
@@ -882,5 +882,5 @@
 
 
-forall( dtype istype | istream( istype ) ) {
+forall( istype & | istream( istype ) ) {
 	istype & ?|?( istype & is, bool & b ) {
 		char val[6];
@@ -1048,5 +1048,5 @@
 // *********************************** manipulators ***********************************
 
-forall( dtype istype | istream( istype ) )
+forall( istype & | istream( istype ) )
 istype & ?|?( istype & is, _Istream_Cstr f ) {
 	// skip xxx
@@ -1083,5 +1083,5 @@
 } // ?|?
 
-forall( dtype istype | istream( istype ) )
+forall( istype & | istream( istype ) )
 istype & ?|?( istype & is, _Istream_Char f ) {
 	fmt( is, "%*c" );									// argument variable unused
@@ -1090,5 +1090,5 @@
 
 #define InputFMTImpl( T, CODE ) \
-forall( dtype istype | istream( istype ) ) \
+forall( istype & | istream( istype ) ) \
 istype & ?|?( istype & is, _Istream_Manip(T) f ) { \
 	enum { size = 16 }; \
@@ -1119,5 +1119,5 @@
 InputFMTImpl( long double, "Lf" )
 
-forall( dtype istype | istream( istype ) )
+forall( istype & | istream( istype ) )
 istype & ?|?( istype & is, _Istream_Manip(float _Complex) fc ) {
 	float re, im;
@@ -1130,5 +1130,5 @@
 } // ?|?
 
-forall( dtype istype | istream( istype ) )
+forall( istype & | istream( istype ) )
 istype & ?|?( istype & is, _Istream_Manip(double _Complex) dc ) {
 	double re, im;
@@ -1141,5 +1141,5 @@
 } // ?|?
 
-forall( dtype istype | istream( istype ) )
+forall( istype & | istream( istype ) )
 istype & ?|?( istype & is, _Istream_Manip(long double _Complex) ldc ) {
 	long double re, im;
Index: libcfa/src/iostream.hfa
===================================================================
--- libcfa/src/iostream.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/iostream.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -22,5 +22,5 @@
 
 
-trait ostream( dtype ostype ) {
+trait ostream( ostype & ) {
 	// private
 	bool $sepPrt( ostype & );							// get separator state (on/off)
@@ -56,9 +56,9 @@
 }; // ostream
 
-// trait writeable( otype T ) {
-// 	forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype &, T );
+// trait writeable( T ) {
+// 	forall( ostype & | ostream( ostype ) ) ostype & ?|?( ostype &, T );
 // }; // writeable
 
-trait writeable( otype T, dtype ostype | ostream( ostype ) ) {
+trait writeable( T, ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype &, T );
 }; // writeable
@@ -66,5 +66,5 @@
 // implement writable for intrinsic types
 
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype &, bool );
 	void ?|?( ostype &, bool );
@@ -140,5 +140,5 @@
 
 // tuples
-forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
+forall( ostype &, T, Params... | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
 	ostype & ?|?( ostype & os, T arg, Params rest );
 	void ?|?( ostype & os, T arg, Params rest );
@@ -146,5 +146,5 @@
 
 // writes the range [begin, end) to the given stream
-forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) {
+forall( ostype &, elt_type | writeable( elt_type, ostype ), iterator_type | iterator( iterator_type, elt_type ) ) {
 	void write( iterator_type begin, iterator_type end, ostype & os );
 	void write_reverse( iterator_type begin, iterator_type end, ostype & os );
@@ -153,5 +153,5 @@
 // *********************************** manipulators ***********************************
 
-forall( otype T )
+forall( T )
 struct _Ostream_Manip {
 	T val;												// polymorphic base-type
@@ -193,5 +193,5 @@
 	_Ostream_Manip(T) & sign( _Ostream_Manip(T) & fmt ) { fmt.flags.sign = true; return fmt; } \
 } /* distribution */ \
-forall( dtype ostype | ostream( ostype ) ) { \
+forall( ostype & | ostream( ostype ) ) { \
 	ostype & ?|?( ostype & os, _Ostream_Manip(T) f ); \
 	void ?|?( ostype & os, _Ostream_Manip(T) f ); \
@@ -234,5 +234,5 @@
 	_Ostream_Manip(T) & nodp( _Ostream_Manip(T) & fmt ) { fmt.flags.nobsdp = true; return fmt; } \
 } /* distribution */ \
-forall( dtype ostype | ostream( ostype ) ) { \
+forall( ostype & | ostream( ostype ) ) { \
 	ostype & ?|?( ostype & os, _Ostream_Manip(T) f ); \
 	void ?|?( ostype & os, _Ostream_Manip(T) f ); \
@@ -254,5 +254,5 @@
 	_Ostream_Manip(char) & nobase( _Ostream_Manip(char) & fmt ) { fmt.flags.nobsdp = true; return fmt; }
 } // distribution
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, _Ostream_Manip(char) f );
 	void ?|?( ostype & os, _Ostream_Manip(char) f );
@@ -272,5 +272,5 @@
 	_Ostream_Manip(const char *) & nobase( _Ostream_Manip(const char *) & fmt ) { fmt.flags.nobsdp = true; return fmt; }
 } // distribution
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, _Ostream_Manip(const char *) f );
 	void ?|?( ostype & os, _Ostream_Manip(const char *) f );
@@ -281,5 +281,5 @@
 
 
-trait istream( dtype istype ) {
+trait istream( istype & ) {
 	void nlOn( istype & );								// read newline
 	void nlOff( istype & );								// scan newline
@@ -294,9 +294,9 @@
 }; // istream
 
-trait readable( otype T ) {
-	forall( dtype istype | istream( istype ) ) istype & ?|?( istype &, T );
+trait readable( T ) {
+	forall( istype & | istream( istype ) ) istype & ?|?( istype &, T );
 }; // readable
 
-forall( dtype istype | istream( istype ) ) {
+forall( istype & | istream( istype ) ) {
 	istype & ?|?( istype &, bool & );
 
@@ -363,5 +363,5 @@
 	_Istream_Cstr & wdi( unsigned int w, _Istream_Cstr & fmt ) { fmt.wd = w; return fmt; }
 } // distribution
-forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Cstr f );
+forall( istype & | istream( istype ) ) istype & ?|?( istype & is, _Istream_Cstr f );
 
 struct _Istream_Char {
@@ -373,7 +373,7 @@
 	_Istream_Char & ignore( _Istream_Char & fmt ) { fmt.ignore = true; return fmt; }
 } // distribution
-forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Char f );
-
-forall( dtype T | sized( T ) )
+forall( istype & | istream( istype ) ) istype & ?|?( istype & is, _Istream_Char f );
+
+forall( T & | sized( T ) )
 struct _Istream_Manip {
 	T & val;											// polymorphic base-type
@@ -389,5 +389,5 @@
 	_Istream_Manip(T) & wdi( unsigned int w, _Istream_Manip(T) & fmt ) { fmt.wd = w; return fmt; } \
 } /* distribution */ \
-forall( dtype istype | istream( istype ) ) { \
+forall( istype & | istream( istype ) ) { \
 	istype & ?|?( istype & is, _Istream_Manip(T) f ); \
 } // ?|?
@@ -418,5 +418,5 @@
 #include <time_t.hfa>									// Duration (constructors) / Time (constructors)
 
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, Duration dur );
 	void ?|?( ostype & os, Duration dur );
Index: libcfa/src/iterator.cfa
===================================================================
--- libcfa/src/iterator.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/iterator.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -16,5 +16,5 @@
 #include "iterator.hfa"
 
-forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
+forall( iterator_type, elt_type | iterator( iterator_type, elt_type ) )
 void for_each( iterator_type begin, iterator_type end, void (* func)( elt_type ) ) {
 	for ( iterator_type i = begin; i != end; ++i ) {
@@ -23,5 +23,5 @@
 } // for_each
 
-forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
+forall( iterator_type, elt_type | iterator( iterator_type, elt_type ) )
 void for_each_reverse( iterator_type begin, iterator_type end, void (* func)( elt_type ) ) {
 	for ( iterator_type i = end; i != begin; ) {
Index: libcfa/src/iterator.hfa
===================================================================
--- libcfa/src/iterator.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/iterator.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -17,5 +17,5 @@
 
 // An iterator can be used to traverse a data structure.
-trait iterator( otype iterator_type, otype elt_type ) {
+trait iterator( iterator_type, elt_type ) {
 	// point to the next element
 //	iterator_type ?++( iterator_type & );
@@ -31,5 +31,5 @@
 };
 
-trait iterator_for( otype iterator_type, otype collection_type, otype elt_type | iterator( iterator_type, elt_type ) ) {
+trait iterator_for( iterator_type, collection_type, elt_type | iterator( iterator_type, elt_type ) ) {
 //	[ iterator_type begin, iterator_type end ] get_iterators( collection_type );
 	iterator_type begin( collection_type );
@@ -37,8 +37,8 @@
 };
 
-forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
+forall( iterator_type, elt_type | iterator( iterator_type, elt_type ) )
 void for_each( iterator_type begin, iterator_type end, void (* func)( elt_type ) );
 
-forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
+forall( iterator_type, elt_type | iterator( iterator_type, elt_type ) )
 void for_each_reverse( iterator_type begin, iterator_type end, void (* func)( elt_type ) );
 
Index: libcfa/src/math.hfa
===================================================================
--- libcfa/src/math.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/math.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -286,5 +286,5 @@
 	unsigned long long int floor( unsigned long long int n, unsigned long long int align ) { return n / align * align; }
 
-	// forall( otype T | { T ?/?( T, T ); T ?*?( T, T ); } )
+	// forall( T | { T ?/?( T, T ); T ?*?( T, T ); } )
 	// T floor( T n, T align ) { return n / align * align; }
 
@@ -300,5 +300,5 @@
 	unsigned long long int ceiling_div( unsigned long long int n, unsigned long long int align ) { return (n + (align - 1)) / align; }
 
-	// forall( otype T | { T ?+?( T, T ); T ?-?( T, T ); T ?%?( T, T ); } )
+	// forall( T | { T ?+?( T, T ); T ?-?( T, T ); T ?%?( T, T ); } )
 	// T ceiling_div( T n, T align ) { verify( is_pow2( align ) );return (n + (align - 1)) / align; }
 	
@@ -315,5 +315,5 @@
 	unsigned long long int ceiling( unsigned long long int n, unsigned long long int align ) { return floor( n + (n % align != 0 ? align - 1 : 0), align ); }
 
-	// forall( otype T | { void ?{}( T &, one_t ); T ?+?( T, T ); T ?-?( T, T ); T ?/?( T, T ); } )
+	// forall( T | { void ?{}( T &, one_t ); T ?+?( T, T ); T ?-?( T, T ); T ?/?( T, T ); } )
 	// T ceiling( T n, T align ) { return return floor( n + (n % align != 0 ? align - 1 : 0), align ); *}
 
@@ -414,11 +414,11 @@
 
 static inline {
-	forall( otype T | { void ?{}( T &, one_t ); T ?+?( T, T ); T ?-?( T, T );T ?*?( T, T ); } )
+	forall( T | { void ?{}( T &, one_t ); T ?+?( T, T ); T ?-?( T, T );T ?*?( T, T ); } )
 	T lerp( T x, T y, T a ) { return x * ((T){1} - a) + y * a; }
 
-	forall( otype T | { void ?{}( T &, zero_t ); void ?{}( T &, one_t ); int ?<?( T, T ); } )
+	forall( T | { void ?{}( T &, zero_t ); void ?{}( T &, one_t ); int ?<?( T, T ); } )
 	T step( T edge, T x ) { return x < edge ? (T){0} : (T){1}; }
 
-	forall( otype T | { void ?{}( T &, int ); T clamp( T, T, T ); T ?-?( T, T ); T ?*?( T, T ); T ?/?( T, T ); } )
+	forall( T | { void ?{}( T &, int ); T clamp( T, T, T ); T ?-?( T, T ); T ?*?( T, T ); T ?/?( T, T ); } )
 	T smoothstep( T edge0, T edge1, T x ) { T t = clamp( (x - edge0) / (edge1 - edge0), (T){0}, (T){1} ); return t * t * ((T){3} - (T){2} * t); }
 } // distribution
Index: libcfa/src/memory.cfa
===================================================================
--- libcfa/src/memory.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/memory.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -18,5 +18,5 @@
 
 // Internal data object.
-forall(dtype T | sized(T), ttype Args | { void ?{}(T &, Args); })
+forall(T & | sized(T), Args... | { void ?{}(T &, Args); })
 void ?{}(counter_data(T) & this, Args args) {
 	(this.counter){1};
@@ -24,5 +24,5 @@
 }
 
-forall(dtype T | sized(T) | { void ^?{}(T &); })
+forall(T & | sized(T) | { void ^?{}(T &); })
 void ^?{}(counter_data(T) & this) {
 	assert(0 == this.counter);
@@ -31,15 +31,15 @@
 
 // This is one of many pointers keeping this alive.
-forall(dtype T | sized(T))
+forall(T & | sized(T))
 void ?{}(counter_ptr(T) & this) {
 	this.data = 0p;
 }
 
-forall(dtype T | sized(T))
+forall(T & | sized(T))
 void ?{}(counter_ptr(T) & this, zero_t) {
 	this.data = 0p;
 }
 
-forall(dtype T | sized(T) | { void ^?{}(T &); })
+forall(T & | sized(T) | { void ^?{}(T &); })
 static void internal_decrement(counter_ptr(T) & this) {
 	if (this.data && 0 == --this.data->counter) {
@@ -48,5 +48,5 @@
 }
 
-forall(dtype T | sized(T))
+forall(T & | sized(T))
 static void internal_copy(counter_ptr(T) & this, counter_ptr(T) & that) {
 	this.data = that.data;
@@ -56,5 +56,5 @@
 }
 
-forall(dtype T | sized(T) | { void ^?{}(T &); })
+forall(T & | sized(T) | { void ^?{}(T &); })
 void ?{}(counter_ptr(T) & this, counter_ptr(T) that) {
 	// `that` is a copy but it should have neither a constructor
@@ -64,20 +64,20 @@
 }
 
-forall(dtype T | sized(T), ttype Args | { void ?{}(T&, Args); })
+forall(T & | sized(T), Args... | { void ?{}(T&, Args); })
 void ?{}(counter_ptr(T) & this, Args args) {
 	this.data = (counter_data(T)*)new(args);
 }
 
-forall(dtype T | sized(T) | { void ^?{}(T &); })
+forall(T & | sized(T) | { void ^?{}(T &); })
 void ^?{}(counter_ptr(T) & this) {
 	internal_decrement(this);
 }
 
-forall(dtype T | sized(T))
+forall(T & | sized(T))
 T & *?(counter_ptr(T) & this) {
 	return *((this.data) ? &this.data->object : 0p);
 }
 
-forall(dtype T | sized(T) | { void ^?{}(T &); })
+forall(T & | sized(T) | { void ^?{}(T &); })
 void ?=?(counter_ptr(T) & this, counter_ptr(T) that) {
 	if (this.data != that.data) {
@@ -87,5 +87,5 @@
 }
 
-forall(dtype T | sized(T) | { void ^?{}(T &); })
+forall(T & | sized(T) | { void ^?{}(T &); })
 void ?=?(counter_ptr(T) & this, zero_t) {
 	internal_decrement(this);
@@ -93,20 +93,20 @@
 }
 
-forall(dtype T | sized(T))
+forall(T & | sized(T))
 int ?==?(counter_ptr(T) const & this, counter_ptr(T) const & that) {
 	return this.data == that.data;
 }
 
-forall(dtype T | sized(T))
+forall(T & | sized(T))
 int ?!=?(counter_ptr(T) const & this, counter_ptr(T) const & that) {
 	return !?==?(this, that);
 }
 
-forall(dtype T | sized(T))
+forall(T & | sized(T))
 int ?==?(counter_ptr(T) const & this, zero_t) {
 	return this.data == 0;
 }
 
-forall(dtype T | sized(T))
+forall(T & | sized(T))
 int ?!=?(counter_ptr(T) const & this, zero_t) {
 	return !?==?(this, (zero_t)0);
@@ -114,30 +114,30 @@
 
 // This is the only pointer that keeps this alive.
-forall(dtype T)
+forall(T &)
 void ?{}(unique_ptr(T) & this) {
 	this.data = 0p;
 }
 
-forall(dtype T)
+forall(T &)
 void ?{}(unique_ptr(T) & this, zero_t) {
 	this.data = 0p;
 }
 
-forall(dtype T | sized(T), ttype Args | { void ?{}(T &, Args); })
+forall(T & | sized(T), Args... | { void ?{}(T &, Args); })
 void ?{}(unique_ptr(T) & this, Args args) {
 	this.data = (T *)new(args);
 }
 
-forall(dtype T | { void ^?{}(T &); })
+forall(T & | { void ^?{}(T &); })
 void ^?{}(unique_ptr(T) & this) {
 	delete(this.data);
 }
 
-forall(dtype T)
+forall(T &)
 T & *?(unique_ptr(T) & this) {
 	return *this.data;
 }
 
-forall(dtype T | { void ^?{}(T &); })
+forall(T & | { void ^?{}(T &); })
 void ?=?(unique_ptr(T) & this, zero_t) {
 	delete(this.data);
@@ -145,5 +145,5 @@
 }
 
-forall(dtype T | { void ^?{}(T &); })
+forall(T & | { void ^?{}(T &); })
 void move(unique_ptr(T) & this, unique_ptr(T) & that) {
 	delete(this.data);
@@ -152,20 +152,20 @@
 }
 
-forall(dtype T)
+forall(T &)
 int ?==?(unique_ptr(T) const & this, unique_ptr(T) const & that) {
 	return this.data == that.data;
 }
 
-forall(dtype T)
+forall(T &)
 int ?!=?(unique_ptr(T) const & this, unique_ptr(T) const & that) {
 	return !?==?(this, that);
 }
 
-forall(dtype T)
+forall(T &)
 int ?==?(unique_ptr(T) const & this, zero_t) {
 	return this.data == 0;
 }
 
-forall(dtype T)
+forall(T &)
 int ?!=?(unique_ptr(T) const & this, zero_t) {
 	return !?==?(this, (zero_t)0);
Index: libcfa/src/memory.hfa
===================================================================
--- libcfa/src/memory.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/memory.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -17,5 +17,5 @@
 
 // Internal data object.
-forall(dtype T | sized(T)) {
+forall(T & | sized(T)) {
 	struct counter_data {
 		unsigned int counter;
@@ -23,5 +23,5 @@
 	};
 
-	forall(ttype Args | { void ?{}(T &, Args); })
+	forall(Args... | { void ?{}(T &, Args); })
 	void ?{}(counter_data(T) & this, Args args);
 
@@ -31,5 +31,5 @@
 
 // This is one of many pointers keeping this alive.
-forall(dtype T | sized(T)) {
+forall(T & | sized(T)) {
 	struct counter_ptr {
 		counter_data(T) * data;
@@ -40,5 +40,5 @@
 	forall( | { void ^?{}(T &); })
 	void ?{}(counter_ptr(T) & this, counter_ptr(T) that);
-	forall(ttype Args | { void ?{}(T&, Args); })
+	forall(Args... | { void ?{}(T&, Args); })
 	void ?{}(counter_ptr(T) & this, Args args);
 
@@ -60,5 +60,5 @@
 
 // This is the only pointer that keeps this alive.
-forall(dtype T) {
+forall(T &) {
 	struct unique_ptr {
 		T * data;
@@ -68,5 +68,5 @@
 	void ?{}(unique_ptr(T) & this, zero_t);
 	void ?{}(unique_ptr(T) & this, unique_ptr(T) that) = void;
-	forall( | sized(T), ttype Args | { void ?{}(T &, Args); })
+	forall( | sized(T), Args... | { void ?{}(T &, Args); })
 	void ?{}(unique_ptr(T) & this, Args args);
 
Index: libcfa/src/parseargs.hfa
===================================================================
--- libcfa/src/parseargs.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/parseargs.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -14,5 +14,5 @@
 static inline void ?{}( cfa_option & this ) {}
 
-forall(dtype T | { bool parse(const char *, T & ); })
+forall(T & | { bool parse(const char *, T & ); })
 static inline void ?{}( cfa_option & this, char short_name, const char * long_name, const char * help, T & variable ) {
       this.val        = 0;
@@ -24,5 +24,5 @@
 }
 
-forall(dtype T)
+forall(T &)
 static inline void ?{}( cfa_option & this, char short_name, const char * long_name, const char * help, T & variable, bool (*parse)(const char *, T & )) {
       this.val        = 0;
Index: libcfa/src/rational.cfa
===================================================================
--- libcfa/src/rational.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/rational.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -18,5 +18,5 @@
 #include "stdlib.hfa"
 
-forall( otype RationalImpl | arithmetic( RationalImpl ) ) {
+forall( RationalImpl | arithmetic( RationalImpl ) ) {
 	// helper routines
 
@@ -159,5 +159,5 @@
 	// I/O
 
-	forall( dtype istype | istream( istype ) | { istype & ?|?( istype &, RationalImpl & ); } )
+	forall( istype & | istream( istype ) | { istype & ?|?( istype &, RationalImpl & ); } )
 	istype & ?|?( istype & is, Rational(RationalImpl) & r ) {
 		is | r.numerator | r.denominator;
@@ -168,5 +168,5 @@
 	} // ?|?
 
-	forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) {
+	forall( ostype & | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) {
 		ostype & ?|?( ostype & os, Rational(RationalImpl) r ) {
 			return os | r.numerator | '/' | r.denominator;
@@ -179,5 +179,5 @@
 } // distribution
 
-forall( otype RationalImpl | arithmetic( RationalImpl ) | { RationalImpl ?\?( RationalImpl, unsigned long ); } )
+forall( RationalImpl | arithmetic( RationalImpl ) | { RationalImpl ?\?( RationalImpl, unsigned long ); } )
 Rational(RationalImpl) ?\?( Rational(RationalImpl) x, long int y ) {
 	if ( y < 0 ) {
@@ -190,10 +190,10 @@
 // conversion
 
-forall( otype RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl ); } )
+forall( RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl ); } )
 double widen( Rational(RationalImpl) r ) {
  	return convert( r.numerator ) / convert( r.denominator );
 } // widen
 
-forall( otype RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl ); RationalImpl convert( double ); } )
+forall( RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl ); RationalImpl convert( double ); } )
 Rational(RationalImpl) narrow( double f, RationalImpl md ) {
 	// http://www.ics.uci.edu/~eppstein/numth/frap.c
Index: libcfa/src/rational.hfa
===================================================================
--- libcfa/src/rational.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/rational.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -20,8 +20,8 @@
 #include "iostream.hfa"
 
-trait scalar( otype T ) {
+trait scalar( T ) {
 };
 
-trait arithmetic( otype T | scalar( T ) ) {
+trait arithmetic( T | scalar( T ) ) {
 	int !?( T );
 	int ?==?( T, T );
@@ -46,5 +46,5 @@
 // implementation
 
-forall( otype RationalImpl | arithmetic( RationalImpl ) ) {
+forall( RationalImpl | arithmetic( RationalImpl ) ) {
 	struct Rational {
 		RationalImpl numerator, denominator;			// invariant: denominator > 0
@@ -89,8 +89,8 @@
 
 	// I/O
-	forall( dtype istype | istream( istype ) | { istype & ?|?( istype &, RationalImpl & ); } )
+	forall( istype & | istream( istype ) | { istype & ?|?( istype &, RationalImpl & ); } )
 	istype & ?|?( istype &, Rational(RationalImpl) & );
 
-	forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) {
+	forall( ostype & | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) {
 		ostype & ?|?( ostype &, Rational(RationalImpl) );
 		void ?|?( ostype &, Rational(RationalImpl) );
@@ -98,11 +98,11 @@
 } // distribution
 
-forall( otype RationalImpl | arithmetic( RationalImpl ) |{RationalImpl ?\?( RationalImpl, unsigned long );} )
+forall( RationalImpl | arithmetic( RationalImpl ) |{RationalImpl ?\?( RationalImpl, unsigned long );} )
 Rational(RationalImpl) ?\?( Rational(RationalImpl) x, long int y );
 
 // conversion
-forall( otype RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl ); } )
+forall( RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl ); } )
 double widen( Rational(RationalImpl) r );
-forall( otype RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl );  RationalImpl convert( double );} )
+forall( RationalImpl | arithmetic( RationalImpl ) | { double convert( RationalImpl );  RationalImpl convert( double );} )
 Rational(RationalImpl) narrow( double f, RationalImpl md );
 
Index: libcfa/src/stdlib.cfa
===================================================================
--- libcfa/src/stdlib.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/stdlib.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -28,5 +28,5 @@
 // Cforall allocation/deallocation and constructor/destructor, array types
 
-forall( dtype T | sized(T), ttype TT | { void ?{}( T &, TT ); } )
+forall( T & | sized(T), TT... | { void ?{}( T &, TT ); } )
 T * anew( size_t dim, TT p ) {
 	T * arr = alloc( dim );
@@ -37,5 +37,5 @@
 } // anew
 
-forall( dtype T | sized(T) | { void ^?{}( T & ); } )
+forall( T & | sized(T) | { void ^?{}( T & ); } )
 void adelete( T arr[] ) {
 	if ( arr ) {										// ignore null
@@ -48,5 +48,5 @@
 } // adelete
 
-forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype TT | { void adelete( TT ); } )
+forall( T & | sized(T) | { void ^?{}( T & ); }, TT... | { void adelete( TT ); } )
 void adelete( T arr[], TT rest ) {
 	if ( arr ) {										// ignore null
@@ -97,5 +97,5 @@
 //---------------------------------------
 
-forall( otype E | { int ?<?( E, E ); } ) {
+forall( E | { int ?<?( E, E ); } ) {
 	E * bsearch( E key, const E * vals, size_t dim ) {
 		int cmp( const void * t1, const void * t2 ) {
@@ -156,5 +156,5 @@
 
 
-forall( otype K, otype E | { int ?<?( K, K ); K getKey( const E & ); } ) {
+forall( K, E | { int ?<?( K, K ); K getKey( const E & ); } ) {
 	E * bsearch( K key, const E * vals, size_t dim ) {
 		int cmp( const void * t1, const void * t2 ) {
Index: libcfa/src/stdlib.hfa
===================================================================
--- libcfa/src/stdlib.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/stdlib.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Dec 12 13:52:34 2020
-// Update Count     : 536
+// Last Modified On : Mon Jan 18 21:51:13 2021
+// Update Count     : 569
 //
 
@@ -48,5 +48,5 @@
 	else return (T *)alignment( _Alignof(T), dim, sizeof(T) )
 
-static inline forall( dtype T | sized(T) ) {
+static inline forall( T & | sized(T) ) {
 	// CFA safe equivalents, i.e., implicit size specification
 
@@ -108,5 +108,5 @@
 
 	1. Replace the current forall-block that contains defintions of S_fill and S_realloc with following:
-		forall( dtype T | sized(T) ) {
+		forall( T & | sized(T) ) {
 			union  U_fill 		{ char c; T * a; T t; };
 			struct S_fill 		{ char tag; U_fill(T) fill; };
@@ -151,5 +151,5 @@
 typedef struct S_resize			{ inline void *;  }	T_resize;
 
-forall( dtype T ) {
+forall( T & ) {
 	struct S_fill 		{ char tag; char c; size_t size; T * at; char t[50]; };
 	struct S_realloc	{ inline T *; };
@@ -159,9 +159,11 @@
 static inline T_resize 	?`resize  ( void * a )	{ return (T_resize){a}; }
 
-static inline forall( dtype T | sized(T) ) {
+static inline forall( T & | sized(T) ) {
 	S_fill(T) ?`fill ( T t ) {
 		S_fill(T) ret = { 't' };
 		size_t size = sizeof(T);
-		if(size > sizeof(ret.t)) { printf("ERROR: const object of size greater than 50 bytes given for dynamic memory fill\n"); exit(1); }
+		if ( size > sizeof(ret.t) ) {
+			abort( "ERROR: const object of size greater than 50 bytes given for dynamic memory fill\n" );
+		} // if
 		memcpy( &ret.t, &t, size );
 		return ret;
@@ -173,5 +175,5 @@
 	S_realloc(T) 	?`realloc ( T * a )				{ return (S_realloc(T)){a}; }
 
-	T * $alloc_internal( void * Resize, T * Realloc, size_t Align, size_t Dim, S_fill(T) Fill) {
+	T * $alloc_internal( void * Resize, T * Realloc, size_t Align, size_t Dim, S_fill(T) Fill ) {
 		T * ptr = NULL;
 		size_t size = sizeof(T);
@@ -181,28 +183,23 @@
 			ptr = (T*) (void *) resize( (void *)Resize, Align, Dim * size );
 		} else if ( Realloc ) {
-			if (Fill.tag != '0') copy_end = min(malloc_size( Realloc ), Dim * size);
-			ptr = (T*) (void *) realloc( (void *)Realloc, Align, Dim * size );
+			if ( Fill.tag != '0' ) copy_end = min(malloc_size( Realloc ), Dim * size );
+			ptr = (T *) (void *) realloc( (void *)Realloc, Align, Dim * size );
 		} else {
-			ptr = (T*) (void *) memalign( Align, Dim * size );
-		}
-
-		if(Fill.tag == 'c') {
+			ptr = (T *) (void *) memalign( Align, Dim * size );
+		}
+
+		if ( Fill.tag == 'c' ) {
 			memset( (char *)ptr + copy_end, (int)Fill.c, Dim * size - copy_end );
-		} else if(Fill.tag == 't') {
+		} else if ( Fill.tag == 't' ) {
 			for ( int i = copy_end; i < Dim * size; i += size ) {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Warray-bounds"
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wstringop-overflow="
-				memcpy( (char *)ptr + i, &Fill.t, size );
-#pragma GCC diagnostic pop
-#pragma GCC diagnostic pop
+				#pragma GCC diagnostic push
+				#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+				memcpy( (char *)ptr + i, &Fill.t, sizeof(Fill.t) );
+				#pragma GCC diagnostic pop
 			}
-		} else if(Fill.tag == 'a') {
+		} else if ( Fill.tag == 'a' ) {
 			memcpy( (char *)ptr + copy_end, Fill.at, min(Dim * size - copy_end, Fill.size) );
-		} else if(Fill.tag == 'T') {
-			for ( int i = copy_end; i < Dim * size; i += size ) {
-				memcpy( (char *)ptr + i, Fill.at, size );
-			}
+		} else if ( Fill.tag == 'T' ) {
+			memcpy( (char *)ptr + copy_end, Fill.at, Dim * size );
 		}
 
@@ -210,5 +207,5 @@
 	} // $alloc_internal
 
-	forall( ttype TT | { T * $alloc_internal( void *, T *, size_t, size_t, S_fill(T), TT ); } ) {
+	forall( TT... | { T * $alloc_internal( void *, T *, size_t, size_t, S_fill(T), TT ); } ) {
 
 		T * $alloc_internal( void *       , T * Realloc, size_t Align, size_t Dim, S_fill(T) Fill, T_resize Resize, TT rest) {
@@ -239,5 +236,5 @@
 } // distribution T
 
-static inline forall( dtype T | sized(T) ) {
+static inline forall( T & | sized(T) ) {
 	// CFA safe initialization/copy, i.e., implicit size specification, non-array types
 	T * memset( T * dest, char fill ) {
@@ -260,9 +257,9 @@
 
 // CFA deallocation for multiple objects
-static inline forall( dtype T )							// FIX ME, problems with 0p in list
+static inline forall( T & )							// FIX ME, problems with 0p in list
 void free( T * ptr ) {
 	free( (void *)ptr );								// C free
 } // free
-static inline forall( dtype T, ttype TT | { void free( TT ); } )
+static inline forall( T &, TT... | { void free( TT ); } )
 void free( T * ptr, TT rest ) {
 	free( ptr );
@@ -271,10 +268,10 @@
 
 // CFA allocation/deallocation and constructor/destructor, non-array types
-static inline forall( dtype T | sized(T), ttype TT | { void ?{}( T &, TT ); } )
+static inline forall( T & | sized(T), TT... | { void ?{}( T &, TT ); } )
 T * new( TT p ) {
-	return &(*(T *)malloc()){ p };							// run constructor
+	return &(*(T *)malloc()){ p };						// run constructor
 } // new
 
-static inline forall( dtype T | { void ^?{}( T & ); } )
+static inline forall( T & | { void ^?{}( T & ); } )
 void delete( T * ptr ) {
 	// special case for 0-sized object => always call destructor
@@ -284,5 +281,5 @@
 	free( ptr );										// always call free
 } // delete
-static inline forall( dtype T, ttype TT | { void ^?{}( T & ); void delete( TT ); } )
+static inline forall( T &, TT... | { void ^?{}( T & ); void delete( TT ); } )
 void delete( T * ptr, TT rest ) {
 	delete( ptr );
@@ -291,7 +288,7 @@
 
 // CFA allocation/deallocation and constructor/destructor, array types
-forall( dtype T | sized(T), ttype TT | { void ?{}( T &, TT ); } ) T * anew( size_t dim, TT p );
-forall( dtype T | sized(T) | { void ^?{}( T & ); } ) void adelete( T arr[] );
-forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype TT | { void adelete( TT ); } ) void adelete( T arr[], TT rest );
+forall( T & | sized(T), TT... | { void ?{}( T &, TT ); } ) T * anew( size_t dim, TT p );
+forall( T & | sized(T) | { void ^?{}( T & ); } ) void adelete( T arr[] );
+forall( T & | sized(T) | { void ^?{}( T & ); }, TT... | { void adelete( TT ); } ) void adelete( T arr[], TT rest );
 
 //---------------------------------------
@@ -333,5 +330,5 @@
 //---------------------------------------
 
-forall( otype E | { int ?<?( E, E ); } ) {
+forall( E | { int ?<?( E, E ); } ) {
 	E * bsearch( E key, const E * vals, size_t dim );
 	size_t bsearch( E key, const E * vals, size_t dim );
@@ -342,5 +339,5 @@
 } // distribution
 
-forall( otype K, otype E | { int ?<?( K, K ); K getKey( const E & ); } ) {
+forall( K, E | { int ?<?( K, K ); K getKey( const E & ); } ) {
 	E * bsearch( K key, const E * vals, size_t dim );
 	size_t bsearch( K key, const E * vals, size_t dim );
@@ -351,5 +348,5 @@
 } // distribution
 
-forall( otype E | { int ?<?( E, E ); } ) {
+forall( E | { int ?<?( E, E ); } ) {
 	void qsort( E * vals, size_t dim );
 } // distribution
Index: libcfa/src/time.cfa
===================================================================
--- libcfa/src/time.cfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/time.cfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -31,5 +31,5 @@
 
 
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, Duration dur ) with( dur ) {
 		(ostype &)(os | tn / TIMEGRAN);					// print seconds
@@ -136,5 +136,5 @@
 } // strftime
 
-forall( dtype ostype | ostream( ostype ) ) {
+forall( ostype & | ostream( ostype ) ) {
 	ostype & ?|?( ostype & os, Time time ) with( time ) {
 		char buf[32];									// at least 26
Index: libcfa/src/vec/vec.hfa
===================================================================
--- libcfa/src/vec/vec.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/vec/vec.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -18,35 +18,35 @@
 #include <math.hfa>
 
-trait fromint(otype T) {
+trait fromint(T) {
     void ?{}(T&, int);
 };
-trait zeroinit(otype T) {
+trait zeroinit(T) {
     void ?{}(T&, zero_t);
 };
-trait zero_assign(otype T) {
+trait zero_assign(T) {
     T ?=?(T&, zero_t);
 };
-trait subtract(otype T) {
+trait subtract(T) {
     T ?-?(T, T);
 };
-trait negate(otype T) {
+trait negate(T) {
     T -?(T);
 };
-trait add(otype T) {
+trait add(T) {
     T ?+?(T, T);
 };
-trait multiply(otype T) {
+trait multiply(T) {
     T ?*?(T, T);
 };
-trait divide(otype T) {
+trait divide(T) {
     T ?/?(T, T);
 };
-trait lessthan(otype T) {
+trait lessthan(T) {
     int ?<?(T, T);
 };
-trait equality(otype T) {
+trait equality(T) {
     int ?==?(T, T);
 };
-trait sqrt(otype T) {
+trait sqrt(T) {
     T sqrt(T);
 };
@@ -68,5 +68,5 @@
 }
 
-trait dottable(otype V, otype T) {
+trait dottable(V, T) {
     T dot(V, V);
 };
@@ -74,20 +74,20 @@
 static inline {
 
-forall(otype T | sqrt(T), otype V | dottable(V, T))
+forall(T | sqrt(T), V | dottable(V, T))
 T length(V v) {
    return sqrt(dot(v, v));
 }
 
-forall(otype T, otype V | dottable(V, T))
+forall(T, V | dottable(V, T))
 T length_squared(V v) {
    return dot(v, v);
 }
 
-forall(otype T, otype V | { T length(V); } | subtract(V))
+forall(T, V | { T length(V); } | subtract(V))
 T distance(V v1, V v2) {
     return length(v1 - v2);
 }
 
-forall(otype T, otype V | { T length(V); V ?/?(V, T); })
+forall(T, V | { T length(V); V ?/?(V, T); })
 V normalize(V v) {
     return v / length(v);
@@ -95,5 +95,5 @@
 
 // Project vector u onto vector v
-forall(otype T, otype V | dottable(V, T) | { V normalize(V); V ?*?(V, T); })
+forall(T, V | dottable(V, T) | { V normalize(V); V ?*?(V, T); })
 V project(V u, V v) {
     V v_norm = normalize(v);
@@ -102,5 +102,5 @@
 
 // Reflect incident vector v with respect to surface with normal n
-forall(otype T | fromint(T), otype V | { V project(V, V); V ?*?(T, V); V ?-?(V,V); })
+forall(T | fromint(T), V | { V project(V, V); V ?*?(T, V); V ?-?(V,V); })
 V reflect(V v, V n) {
     return v - (T){2} * project(v, n);
@@ -111,6 +111,6 @@
 // entering material (i.e., from air to water, eta = 1/1.33)
 // v and n must already be normalized
-forall(otype T | fromint(T) | subtract(T) | multiply(T) | add(T) | lessthan(T) | sqrt(T),
-       otype V | dottable(V, T) | { V ?*?(T, V); V ?-?(V,V); void ?{}(V&, zero_t); })
+forall(T | fromint(T) | subtract(T) | multiply(T) | add(T) | lessthan(T) | sqrt(T),
+       V | dottable(V, T) | { V ?*?(T, V); V ?-?(V,V); void ?{}(V&, zero_t); })
 V refract(V v, V n, T eta) {
     T dotValue = dot(n, v);
@@ -128,5 +128,5 @@
 // i is the incident vector
 // ng is the geometric normal of the surface
-forall(otype T | lessthan(T) | zeroinit(T), otype V | dottable(V, T) | negate(V))
+forall(T | lessthan(T) | zeroinit(T), V | dottable(V, T) | negate(V))
 V faceforward(V n, V i, V ng) {
     return dot(ng, i) < (T){0} ? n : -n;
Index: libcfa/src/vec/vec2.hfa
===================================================================
--- libcfa/src/vec/vec2.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/vec/vec2.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -19,5 +19,5 @@
 #include "vec.hfa"
 
-forall (otype T) {
+forall (T) {
     struct vec2 {
         T x, y;
@@ -25,5 +25,5 @@
 }
 
-forall (otype T) {
+forall (T) {
     static inline {
 
@@ -279,5 +279,5 @@
 }
 
-forall(dtype ostype, otype T | writeable(T, ostype)) {
+forall(ostype &, T | writeable(T, ostype)) {
     ostype & ?|?(ostype & os, vec2(T) v) with (v) {
         return os | '<' | x | ',' | y | '>';
Index: libcfa/src/vec/vec3.hfa
===================================================================
--- libcfa/src/vec/vec3.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/vec/vec3.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -19,5 +19,5 @@
 #include "vec.hfa"
 
-forall (otype T) {
+forall (T) {
     struct vec3 {
         T x, y, z;
@@ -25,5 +25,5 @@
 }
 
-forall (otype T) {
+forall (T) {
     static inline {
 
@@ -288,5 +288,5 @@
 }
 
-forall(dtype ostype, otype T | writeable(T, ostype)) {
+forall(ostype &, T | writeable(T, ostype)) {
     ostype & ?|?(ostype & os, vec3(T) v) with (v) {
         return os | '<' | x | ',' | y | ',' | z | '>';
Index: libcfa/src/vec/vec4.hfa
===================================================================
--- libcfa/src/vec/vec4.hfa	(revision 2fab24e3bfb7b64299dc6bb1b6e45ef4248410cc)
+++ libcfa/src/vec/vec4.hfa	(revision 761a2467835175a5da87d3c9dbcec0dfda257378)
@@ -19,5 +19,5 @@
 #include "vec.hfa"
 
-forall (otype T) {
+forall (T) {
     struct vec4 {
         T x, y, z, w;
@@ -25,5 +25,5 @@
 }
 
-forall (otype T) {
+forall (T) {
     static inline {
 
@@ -283,5 +283,5 @@
 }
 
-forall(dtype ostype, otype T | writeable(T, ostype)) {
+forall(ostype &, T | writeable(T, ostype)) {
     ostype & ?|?(ostype & os, vec4(T) v) with (v) {
         return os | '<' | x | ',' | y | ',' | z | ',' | w | '>';
