Index: src/Concurrency/Keywords.cc
===================================================================
--- src/Concurrency/Keywords.cc	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/Concurrency/Keywords.cc	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -291,5 +291,5 @@
 			LinkageSpec::Cforall,
 			nullptr,
-			new PointerType(
+			new ReferenceType(
 				noQualifiers,
 				new StructInstType(
@@ -447,11 +447,11 @@
 
 		//Makes sure it's not a copy
-		PointerType* pty = dynamic_cast< PointerType * >( ty );
 		ReferenceType* rty = dynamic_cast< ReferenceType * >( ty );
-		if( ! pty && ! rty ) throw SemanticError( "Mutex argument must be of pointer/reference type ", arg );
+		if( ! rty ) throw SemanticError( "Mutex argument must be of reference type ", arg );
 
 		//Make sure the we are pointing directly to a type
-		Type* base = pty ? pty->get_base() : rty->get_base();
-		if(  dynamic_cast< PointerType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
+		Type* base = rty->get_base();
+		if( dynamic_cast< ReferenceType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
+		if( dynamic_cast< PointerType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
 
 		//Make sure that typed isn't mutex
Index: src/libcfa/concurrency/coroutine
===================================================================
--- src/libcfa/concurrency/coroutine	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/libcfa/concurrency/coroutine	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -26,9 +26,9 @@
 // Anything that is resumed is a coroutine.
 trait is_coroutine(dtype T) {
-      void main(T * this);
-      coroutine_desc * get_coroutine(T * this);
+      void main(T & this);
+      coroutine_desc * get_coroutine(T & this);
 };
 
-#define DECL_COROUTINE(X) static inline coroutine_desc* get_coroutine(X* this) { return &this->__cor; } void main(X* this)
+#define DECL_COROUTINE(X) static inline coroutine_desc* get_coroutine(X& this) { return &this.__cor; } void main(X& this)
 
 //-----------------------------------------------------------------------------
@@ -45,8 +45,8 @@
 
 forall(dtype T | is_coroutine(T))
-static inline void resume(T * cor);
+static inline void resume(T & cor);
 
 forall(dtype T | is_coroutine(T))
-void prime(T * cor);
+void prime(T & cor);
 
 //-----------------------------------------------------------------------------
@@ -87,5 +87,5 @@
 // Resume implementation inlined for performance
 forall(dtype T | is_coroutine(T))
-static inline void resume(T * cor) {
+static inline void resume(T & cor) {
 	coroutine_desc * src = this_coroutine;		// optimization
 	coroutine_desc * dst = get_coroutine(cor);
@@ -93,5 +93,5 @@
 	if( unlikely(!dst->stack.base) ) {
 		create_stack(&dst->stack, dst->stack.size);
-		CtxStart(cor, CtxInvokeCoroutine);
+		CtxStart(&cor, CtxInvokeCoroutine);
 	}
 
Index: src/libcfa/concurrency/coroutine.c
===================================================================
--- src/libcfa/concurrency/coroutine.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/libcfa/concurrency/coroutine.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -93,5 +93,5 @@
 // Not inline since only ever called once per coroutine
 forall(dtype T | is_coroutine(T))
-void prime(T* cor) {
+void prime(T& cor) {
 	coroutine_desc* this = get_coroutine(cor);
 	assert(this->state == Start);
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/libcfa/concurrency/kernel.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -139,5 +139,5 @@
 }
 
-void ?{}(processor & this, cluster * cltr, processorCtx_t * runner) {
+void ?{}(processor & this, cluster * cltr, processorCtx_t & runner) {
 	this.cltr = cltr;
 	(this.terminated){ 0 };
@@ -148,12 +148,12 @@
 	this.kernel_thread = pthread_self();
 
-	this.runner = runner;
-	LIB_DEBUG_PRINT_SAFE("Kernel : constructing system processor context %p\n", runner);
-	(*runner){ &this };
+	this.runner = &runner;
+	LIB_DEBUG_PRINT_SAFE("Kernel : constructing system processor context %p\n", &runner);
+	runner{ &this };
 }
 
 LIB_DEBUG_DO( bool validate( alarm_list_t * this ); )
 
-void ?{}(system_proc_t & this, cluster * cltr, processorCtx_t * runner) {
+void ?{}(system_proc_t & this, cluster * cltr, processorCtx_t & runner) {
 	(this.alarms){};
 	(this.alarm_lock){};
@@ -187,6 +187,6 @@
 //=============================================================================================
 //Main of the processor contexts
-void main(processorCtx_t * runner) {
-	processor * this = runner->proc;
+void main(processorCtx_t & runner) {
+	processor * this = runner.proc;
 
 	LIB_DEBUG_PRINT_SAFE("Kernel : core %p starting\n", this);
@@ -233,5 +233,5 @@
 // from the processor coroutine to the target thread
 void runThread(processor * this, thread_desc * dst) {
-	coroutine_desc * proc_cor = get_coroutine(this->runner);
+	coroutine_desc * proc_cor = get_coroutine(*this->runner);
 	coroutine_desc * thrd_cor = get_coroutine(dst);
 
@@ -315,5 +315,5 @@
 	// appropriate stack.
 	proc_cor_storage.__cor.state = Active;
-	main( &proc_cor_storage );
+	main( proc_cor_storage );
 	proc_cor_storage.__cor.state = Halted;
 
@@ -455,5 +455,5 @@
 	mainThread = (thread_desc *)&mainThreadStorage;
 	current_stack_info_t info;
-	mainThread{ &info };
+	(*mainThread){ &info };
 
 	LIB_DEBUG_PRINT_SAFE("Kernel : Main thread ready\n");
@@ -461,5 +461,5 @@
 	// Initialize the system cluster
 	systemCluster = (cluster *)&systemClusterStorage;
-	systemCluster{};
+	(*systemCluster){};
 
 	LIB_DEBUG_PRINT_SAFE("Kernel : System cluster ready\n");
@@ -468,5 +468,5 @@
 	// (the coroutine that contains the processing control flow)
 	systemProcessor = (system_proc_t *)&systemProcessorStorage;
-	(*systemProcessor){ systemCluster, (processorCtx_t *)&systemProcessorCtxStorage };
+	(*systemProcessor){ systemCluster, *(processorCtx_t *)&systemProcessorCtxStorage };
 
 	// Add the main thread to the ready queue
@@ -486,5 +486,5 @@
 	// context. Hence, the main thread does not begin through CtxInvokeThread, like all other threads. The trick here is that
 	// mainThread is on the ready queue when this call is made.
-	resume( systemProcessor->proc.runner );
+	resume( *systemProcessor->proc.runner );
 
 
@@ -514,5 +514,5 @@
 	// Destroy the system processor and its context in reverse order of construction
 	// These were manually constructed so we need manually destroy them
-	^(systemProcessor->proc.runner){};
+	^(*systemProcessor->proc.runner){};
 	^(systemProcessor){};
 
Index: src/libcfa/concurrency/thread
===================================================================
--- src/libcfa/concurrency/thread	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/libcfa/concurrency/thread	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -30,17 +30,17 @@
 trait is_thread(dtype T) {
       void ^?{}(T& mutex this);
-      void main(T* this);
-      thread_desc* get_thread(T* this);
+      void main(T& this);
+      thread_desc* get_thread(T& this);
 };
 
-#define DECL_THREAD(X) thread_desc* get_thread(X* this) { return &this->__thrd; } void main(X* this)
+#define DECL_THREAD(X) thread_desc* get_thread(X& this) { return &this.__thrd; } void main(X& this)
 
 forall( dtype T | is_thread(T) )
-static inline coroutine_desc* get_coroutine(T* this) {
+static inline coroutine_desc* get_coroutine(T & this) {
 	return &get_thread(this)->cor;
 }
 
 forall( dtype T | is_thread(T) )
-static inline monitor_desc* get_monitor(T * this) {
+static inline monitor_desc* get_monitor(T & this) {
 	return &get_thread(this)->mon;
 }
@@ -57,5 +57,5 @@
 
 forall( dtype T | is_thread(T) )
-void __thrd_start( T* this );
+void __thrd_start( T & this );
 
 //-----------------------------------------------------------------------------
Index: src/libcfa/concurrency/thread.c
===================================================================
--- src/libcfa/concurrency/thread.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/libcfa/concurrency/thread.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -51,5 +51,5 @@
 void ?{}( scoped(T)& this ) {
 	(this.handle){};
-	__thrd_start(&this.handle);
+	__thrd_start(this.handle);
 }
 
@@ -57,5 +57,5 @@
 void ?{}( scoped(T)& this, P params ) {
 	(this.handle){ params };
-	__thrd_start(&this.handle);
+	__thrd_start(this.handle);
 }
 
@@ -68,5 +68,5 @@
 // Starting and stopping threads
 forall( dtype T | is_thread(T) )
-void __thrd_start( T* this ) {
+void __thrd_start( T& this ) {
 	coroutine_desc* thrd_c = get_coroutine(this);
 	thread_desc*  thrd_h = get_thread   (this);
@@ -78,5 +78,5 @@
 	create_stack(&thrd_c->stack, thrd_c->stack.size);
 	this_coroutine = thrd_c;
-	CtxStart(this, CtxInvokeThread);
+	CtxStart(&this, CtxInvokeThread);
 	assert( thrd_c->last->stack.context );
 	CtxSwitch( thrd_c->last->stack.context, thrd_c->stack.context );
Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/libcfa/stdlib	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -135,6 +135,6 @@
 // allocation/deallocation and constructor/destructor, non-array types
 forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } ) T * new( Params p );
-forall( dtype T | { void ^?{}( T & ); } ) void delete( T * ptr );
-forall( dtype T, ttype Params | { void ^?{}( T & ); void delete( Params ); } ) void delete( T * ptr, Params rest );
+forall( dtype T | sized(T) | { void ^?{}( T & ); } ) void delete( T * ptr );
+forall( dtype T, ttype Params | sized(T) | { void ^?{}( T & ); void delete( Params ); } ) void delete( T * ptr, Params rest );
 
 // allocation/deallocation and constructor/destructor, array types
Index: src/libcfa/stdlib.c
===================================================================
--- src/libcfa/stdlib.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/libcfa/stdlib.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -44,16 +44,16 @@
 } // new
 
-forall( dtype T | { void ^?{}( T & ); } )
+forall( dtype T | sized(T) | { void ^?{}( T & ); } )
 void delete( T * ptr ) {
 	if ( ptr ) {										// ignore null
-		^ptr{};											// run destructor
+		^(*ptr){};											// run destructor
 		free( ptr );
 	} // if
 } // delete
 
-forall( dtype T, ttype Params | { void ^?{}( T & ); void delete( Params ); } )
+forall( dtype T, ttype Params | sized(T) | { void ^?{}( T & ); void delete( Params ); } )
 void delete( T * ptr, Params rest ) {
 	if ( ptr ) {										// ignore null
-		^ptr{};											// run destructor
+		^(*ptr){};											// run destructor
 		free( ptr );
 	} // if
Index: src/tests/coroutine.c
===================================================================
--- src/tests/coroutine.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/coroutine.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -25,26 +25,26 @@
 }
 
-void main( Fibonacci * this ) {
+void main( Fibonacci & this ) {
 	int fn1, fn2;					// retained between resumes
-	this->fn = 0;					// case 0
-	fn1 = this->fn;
+	this.fn = 0;					// case 0
+	fn1 = this.fn;
 	suspend();						// return to last resume
 
-	this->fn = 1;					// case 1
+	this.fn = 1;					// case 1
 	fn2 = fn1;
-	fn1 = this->fn;
+	fn1 = this.fn;
 	suspend();						// return to last resume
 
 	for ( ;; ) {					// general case
-		this->fn = fn1 + fn2;
+		this.fn = fn1 + fn2;
 		fn2 = fn1;
-		fn1 = this->fn;
+		fn1 = this.fn;
 		suspend();					// return to last resume
 	} // for
 }
 
-int next( Fibonacci * this ) {
+int next( Fibonacci & this ) {
 	resume( this );					// transfer to last suspend
-	return this->fn;
+	return this.fn;
 }
 
@@ -52,5 +52,5 @@
 	Fibonacci f1, f2;
 	for ( int i = 1; i <= 10; i += 1 ) {
-		sout | next( &f1 ) | ' ' | next( &f2 ) | endl;
+		sout | next( f1 ) | ' ' | next( f2 ) | endl;
 	} // for
 }
Index: src/tests/monitor.c
===================================================================
--- src/tests/monitor.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/monitor.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -14,13 +14,13 @@
 static global_t global;
 
-void increment3( global_t * mutex this ) {
-	this->value += 1;
+void increment3( global_t & mutex this ) {
+	this.value += 1;
 }
 
-void increment2( global_t * mutex this ) {
+void increment2( global_t & mutex this ) {
 	increment3( this );
 }
 
-void increment( global_t * mutex this ) {
+void increment( global_t & mutex this ) {
 	increment2( this );
 }
@@ -28,7 +28,7 @@
 thread MyThread {};
 
-void main( MyThread* this ) {
+void main( MyThread & this ) {
 	for(int i = 0; i < 1_000_000; i++) {
-		increment( &global );
+		increment( global );
 	}
 }
Index: src/tests/multi-monitor.c
===================================================================
--- src/tests/multi-monitor.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/multi-monitor.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -10,14 +10,11 @@
 static monitor_t m1, m2, m3;
 
-void increment( monitor_t * mutex p1, monitor_t * mutex p2, int * value ) {
-	*value += 1;
+void increment( monitor_t & mutex p1, monitor_t & mutex p2, int & value ) {
+	value += 1;
 }
 
-struct MyThread {
-	thread_desc __thrd;
+thread MyThread {
 	int target;
 };
-
-DECL_THREAD(MyThread);
 
 void ?{}( MyThread & this, int target ) {
@@ -27,12 +24,18 @@
 void ^?{}( MyThread & mutex this ) {}
 
-void main( MyThread* this ) {
+void main( MyThread & this ) {
 	for(int i = 0; i < 1000000; i++) {
-		choose(this->target) {
-			case 0: increment( &m1, &m2, &global12 );
-			case 1: increment( &m2, &m3, &global23 );
-			case 2: increment( &m1, &m3, &global13 );
+		choose(this.target) {
+			case 0: increment( m1, m2, global12 );
+			case 1: increment( m2, m3, global23 );
+			case 2: increment( m1, m3, global13 );
 		}
 	}
+}
+
+forall(dtype T | sized(T) | { void ^?{}(T & mutex); })
+void delete_mutex(T * x) {
+	^(*x){};
+	free(x);
 }
 
@@ -40,11 +43,11 @@
 	processor p;
 	{
-		scoped(MyThread) * f[6];
+		MyThread * f[6];
 		for(int i = 0; i < 6; i++) {
-			f[i] = (*(scoped(MyThread) *)malloc()){ i % 3 };
+			f[i] = new(i % 3);
 		}
 
 		for(int i = 0; i < 6; i++) {
-			delete( f[i] );
+			delete_mutex( f[i] );
 		}
 	}
Index: src/tests/preempt.c
===================================================================
--- src/tests/preempt.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/preempt.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -20,7 +20,7 @@
 }
 
-void main(worker_t * this) {
+void main(worker_t & this) {
 	while(counter < 1000) {
-		if( (counter % 7) == this->value ) {
+		if( (counter % 7) == this.value ) {
 			int next = __atomic_add_fetch_4(&counter, 1, __ATOMIC_SEQ_CST);
 			if( (next % 100) == 0 ) printf("%d\n", next);
Index: src/tests/sched-int-barge.c
===================================================================
--- src/tests/sched-int-barge.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/sched-int-barge.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -39,30 +39,30 @@
 thread Threads {};
 
-bool logicC( global_t * mutex a, global_t * mutex b, global_data_t * mutex c ) {
-	c->counter++;
+bool logicC( global_t & mutex a, global_t & mutex b, global_data_t & mutex c ) {
+	c.counter++;
 
-	if( (c->counter % 1000) == 0 ) sout | c->counter | endl;
+	if( (c.counter % 1000) == 0 ) sout | c.counter | endl;
 
-	int action = c->counter % 10;
+	int action = c.counter % 10;
 
 	if( action == 0 ) {
-		c->do_signal = max( ((unsigned)rand48()) % 10, 1);
-		c->do_wait1 = ((unsigned)rand48()) % (c->do_signal);
-		c->do_wait2 = ((unsigned)rand48()) % (c->do_signal);
+		c.do_signal = max( ((unsigned)rand48()) % 10, 1);
+		c.do_wait1 = ((unsigned)rand48()) % (c.do_signal);
+		c.do_wait2 = ((unsigned)rand48()) % (c.do_signal);
 
-		// if(c->do_wait1 == c->do_wait2) sout | "Same" | endl;
+		// if(c.do_wait1 == c.do_wait2) sout | "Same" | endl;
 	}
 
-	if( action == c->do_wait1 || action == c->do_wait2 ) {
-		c->state = WAIT;
+	if( action == c.do_wait1 || action == c.do_wait2 ) {
+		c.state = WAIT;
 		wait( &cond );
 
-		if(c->state != SIGNAL) {
-			sout | "ERROR Barging detected" | c->counter | endl;
+		if(c.state != SIGNAL) {
+			sout | "ERROR Barging detected" | c.counter | endl;
 			abort();
 		}
 	}
-	else if( action == c->do_signal ) {
-		c->state = SIGNAL;
+	else if( action == c.do_signal ) {
+		c.state = SIGNAL;
 
 		signal( &cond );
@@ -70,21 +70,21 @@
 	}
 	else {
-		c->state = BARGE;
+		c.state = BARGE;
 	}
 
-	if( c->counter >= 100_000 ) c->done = true;
-	return !c->done;
+	if( c.counter >= 100_000 ) c.done = true;
+	return !c.done;
 }
 
-bool logicB( global_t * mutex a, global_t * mutex b ) {
-	return logicC(a, b, &globalC);
+bool logicB( global_t & mutex a, global_t & mutex b ) {
+	return logicC(a, b, globalC);
 }
 
-bool logicA( global_t * mutex a ) {
-	return logicB(a, &globalB);
+bool logicA( global_t & mutex a ) {
+	return logicB(a, globalB);
 }
 
-void main( Threads* this ) {
-	while( logicA(&globalA) ) { yield(); };
+void main( Threads & this ) {
+	while( logicA(globalA) ) { yield(); };
 }
 
Index: src/tests/sched-int-block.c
===================================================================
--- src/tests/sched-int-block.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/sched-int-block.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -30,15 +30,15 @@
 
 //------------------------------------------------------------------------------
-void wait_op( global_data_t * mutex a, global_data_t * mutex b, unsigned i ) {
+void wait_op( global_data_t & mutex a, global_data_t & mutex b, unsigned i ) {
 	wait( &cond, (uintptr_t)this_thread );
 
 	yield( ((unsigned)rand48()) % 10 );
 
-	if(a->last_thread != a->last_signaller || b->last_thread != b->last_signaller ) {
-		sout | "ERROR Barging detected, expected" | a->last_signaller | b->last_signaller | "got" | a->last_thread | b->last_thread | endl;
+	if(a.last_thread != a.last_signaller || b.last_thread != b.last_signaller ) {
+		sout | "ERROR Barging detected, expected" | a.last_signaller | b.last_signaller | "got" | a.last_thread | b.last_thread | endl;
 		abort();
 	}
 
-	a->last_thread = b->last_thread = this_thread;
+	a.last_thread = b.last_thread = this_thread;
 
 	yield( ((unsigned)rand48()) % 10 );
@@ -46,15 +46,15 @@
 
 thread Waiter {};
-void main( Waiter* this ) {
+void main( Waiter & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait_op( &globalA, &globalB, i );
+		wait_op( globalA, globalB, i );
 	}
 }
 
 //------------------------------------------------------------------------------
-void signal_op( global_data_t * mutex a, global_data_t * mutex b ) {
+void signal_op( global_data_t & mutex a, global_data_t & mutex b ) {
 	yield( ((unsigned)rand48()) % 10 );
 
-	a->last_thread = b->last_thread = a->last_signaller = b->last_signaller = this_thread;
+	[a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = this_thread;
 
 	if( !is_empty( &cond ) ) {
@@ -69,6 +69,6 @@
 		yield( ((unsigned)rand48()) % 10 );
 
-		if(a->last_thread != next || b->last_thread != next) {
-			sout | "ERROR Barging detected, expected" | next | "got" | a->last_thread | b->last_thread | endl;
+		if(a.last_thread != next || b.last_thread != next) {
+			sout | "ERROR Barging detected, expected" | next | "got" | a.last_thread | b.last_thread | endl;
 			abort();
 		}
@@ -78,21 +78,22 @@
 
 thread Signaller {};
-void main( Signaller* this ) {
+void main( Signaller & this ) {
 	while( !done ) {
-		signal_op( &globalA, &globalB );
+		signal_op( globalA, globalB );
 	}
 }
 
 //------------------------------------------------------------------------------
-void barge_op( global_data_t * mutex a ) {
-	a->last_thread = this_thread;
+void barge_op( global_data_t & mutex a ) {
+	a.last_thread = this_thread;
 }
 
 thread Barger {};
-void main( Barger* this ) {
+void main( Barger & this ) {
 	for( unsigned i = 0; !done; i++ ) {
 		//Choose some monitor to barge into with some irregular pattern
 		bool choose_a = (i % 13) > (i % 17);
-		barge_op( choose_a ? &globalA : &globalB );
+		if ( choose_a ) barge_op( globalA );
+		else barge_op( globalB );
 	}
 }
Index: src/tests/sched-int-disjoint.c
===================================================================
--- src/tests/sched-int-disjoint.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/sched-int-disjoint.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -35,13 +35,13 @@
 //------------------------------------------------------------------------------
 // Barging logic
-void barge( global_data_t * mutex d ) {
-	d->state = BARGE;
+void barge( global_data_t & mutex d ) {
+	d.state = BARGE;
 }
 
 thread Barger {};
 
-void main( Barger * this ) {
+void main( Barger & this ) {
 	while( !all_done ) {
-		barge( &data );
+		barge( data );
 		yield();
 	}
@@ -50,21 +50,21 @@
 //------------------------------------------------------------------------------
 // Waiting logic
-bool wait( global_t * mutex m, global_data_t * mutex d ) {
+bool wait( global_t & mutex m, global_data_t & mutex d ) {
 	wait( &cond );
-	if( d->state != SIGNAL ) {
+	if( d.state != SIGNAL ) {
 		sout | "ERROR barging!" | endl;
 	}
 
-	d->counter++;
+	d.counter++;
 
-	if( (d->counter % 1000) == 0 ) sout | d->counter | endl;
+	if( (d.counter % 1000) == 0 ) sout | d.counter | endl;
 
-	return d->counter < N;
+	return d.counter < N;
 }
 
 thread Waiter {};
 
-void main( Waiter * this ) {
-	while( wait( &mut, &data ) ) { yield(); }
+void main( Waiter & this ) {
+	while( wait( mut, data ) ) { yield(); }
 }
 
@@ -72,11 +72,11 @@
 //------------------------------------------------------------------------------
 // Signalling logic
-void signal( condition * cond, global_t * mutex a, global_data_t * mutex b ) {
-	b->state = SIGNAL;
+void signal( condition * cond, global_t & mutex a, global_data_t & mutex b ) {
+	b.state = SIGNAL;
 	signal( cond );
 }
 
-void logic( global_t * mutex a ) {
-	signal( &cond, a, &data );
+void logic( global_t & mutex a ) {
+	signal( &cond, a, data );
 
 	yield( (unsigned)rand48() % 10 );
@@ -91,7 +91,7 @@
 thread Signaller {};
 
-void main( Signaller * this ) {
+void main( Signaller & this ) {
 	while( !all_done ) {
-		logic( &mut );
+		logic( mut );
 		yield();
 	}
Index: src/tests/sched-int-wait.c
===================================================================
--- src/tests/sched-int-wait.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/sched-int-wait.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -27,17 +27,17 @@
 //----------------------------------------------------------------------------------------------------
 // Tools
-void signal( condition * cond, global_t * mutex a, global_t * mutex b ) {
+void signal( condition * cond, global_t & mutex a, global_t & mutex b ) {
 	signal( cond );
 }
 
-void signal( condition * cond, global_t * mutex a, global_t * mutex b, global_t * mutex c ) {
+void signal( condition * cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
 	signal( cond );
 }
 
-void wait( condition * cond, global_t * mutex a, global_t * mutex b ) {
+void wait( condition * cond, global_t & mutex a, global_t & mutex b ) {
 	wait( cond );
 }
 
-void wait( condition * cond, global_t * mutex a, global_t * mutex b, global_t * mutex c ) {
+void wait( condition * cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
 	wait( cond );
 }
@@ -45,5 +45,5 @@
 //----------------------------------------------------------------------------------------------------
 // Signaler
-void main( Signaler* this ) {
+void main( Signaler & this ) {
 
 	while( waiter_left != 0 ) {
@@ -51,14 +51,14 @@
 		switch( action ) {
 			case 0:
-				signal( &condABC, &globalA, &globalB, &globalC );
+				signal( &condABC, globalA, globalB, globalC );
 				break;
 			case 1:
-				signal( &condAB , &globalA, &globalB );
+				signal( &condAB , globalA, globalB );
 				break;
 			case 2:
-				signal( &condBC , &globalB, &globalC );
+				signal( &condBC , globalB, globalC );
 				break;
 			case 3:
-				signal( &condAC , &globalA, &globalC );
+				signal( &condAC , globalA, globalC );
 				break;
 			default:
@@ -72,7 +72,7 @@
 //----------------------------------------------------------------------------------------------------
 // Waiter ABC
-void main( WaiterABC* this ) {
+void main( WaiterABC & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait( &condABC, &globalA, &globalB, &globalC );
+		wait( &condABC, globalA, globalB, globalC );
 	}
 
@@ -82,7 +82,7 @@
 //----------------------------------------------------------------------------------------------------
 // Waiter AB
-void main( WaiterAB* this ) {
+void main( WaiterAB & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait( &condAB , &globalA, &globalB );
+		wait( &condAB , globalA, globalB );
 	}
 
@@ -92,7 +92,7 @@
 //----------------------------------------------------------------------------------------------------
 // Waiter AC
-void main( WaiterAC* this ) {
+void main( WaiterAC & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait( &condAC , &globalA, &globalC );
+		wait( &condAC , globalA, globalC );
 	}
 
@@ -102,7 +102,7 @@
 //----------------------------------------------------------------------------------------------------
 // Waiter BC
-void main( WaiterBC* this ) {
+void main( WaiterBC & this ) {
 	for( int i = 0; i < N; i++ ) {
-		wait( &condBC , &globalB, &globalC );
+		wait( &condBC , globalB, globalC );
 	}
 
Index: src/tests/thread.c
===================================================================
--- src/tests/thread.c	(revision 8499c707578896a47b4447c47a6198352ac005a7)
+++ src/tests/thread.c	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -7,17 +7,17 @@
 thread Second { semaphore* lock; };
 
-void ?{}( First & this, semaphore* lock ) { this.lock = lock; }
-void ?{}( Second & this, semaphore* lock ) { this.lock = lock; }
+void ?{}( First & this, semaphore & lock ) { this.lock = &lock; }
+void ?{}( Second & this, semaphore & lock ) { this.lock = &lock; }
 
-void main(First* this) {
+void main(First& this) {
 	for(int i = 0; i < 10; i++) {
 		sout | "First : Suspend No." | i + 1 | endl;
 		yield();
 	}
-	V(this->lock);
+	V(this.lock);
 }
 
-void main(Second* this) {
-	P(this->lock);
+void main(Second& this) {
+	P(this.lock);
 	for(int i = 0; i < 10; i++) {
 		sout | "Second : Suspend No." | i + 1 | endl;
@@ -33,6 +33,6 @@
 		processor p;
 		{
-			First  f = { &lock };
-			Second s = { &lock };
+			First  f = { lock };
+			Second s = { lock };
 		}
 	}
