Index: src/SymTab/Mangler.cc
===================================================================
--- src/SymTab/Mangler.cc	(revision 9749d2fa5f42410d163813e570aefa765780a498)
+++ src/SymTab/Mangler.cc	(revision 8fcf92109054723aa88873d699cd049c74f3cb44)
@@ -439,5 +439,5 @@
 		  private:
 			void mangleDecl( const ast::DeclWithType *declaration );
-			void mangleRef( const ast::BaseInstType *refType, std::string prefix );
+			void mangleRef( const ast::BaseInstType *refType, const std::string & prefix );
 
 			void printQualifiers( const ast::Type *type );
@@ -535,12 +535,4 @@
 		}
 
-		__attribute__((unused))
-		inline std::vector< ast::ptr< ast::Type > > getTypes( const std::vector< ast::ptr< ast::DeclWithType > > & decls ) {
-			std::vector< ast::ptr< ast::Type > > ret;
-			std::transform( decls.begin(), decls.end(), std::back_inserter( ret ),
-							std::mem_fun( &ast::DeclWithType::get_type ) );
-			return ret;
-		}
-
 		void Mangler_new::postvisit( const ast::FunctionType * functionType ) {
 			printQualifiers( functionType );
@@ -558,19 +550,18 @@
 		}
 
-		void Mangler_new::mangleRef( const ast::BaseInstType * refType, std::string prefix ) {
+		void Mangler_new::mangleRef(
+				const ast::BaseInstType * refType, const std::string & prefix ) {
 			printQualifiers( refType );
 
 			mangleName += prefix + std::to_string( refType->name.length() ) + refType->name;
 
-			if ( mangleGenericParams ) {
-				if ( ! refType->params.empty() ) {
-					mangleName += "_";
-					for ( const ast::Expr * param : refType->params ) {
-						auto paramType = dynamic_cast< const ast::TypeExpr * >( param );
-						assertf(paramType, "Aggregate parameters should be type expressions: %s", toCString(param));
-						maybeAccept( paramType->type.get(), *visitor );
-					}
-					mangleName += "_";
+			if ( mangleGenericParams && ! refType->params.empty() ) {
+				mangleName += "_";
+				for ( const ast::Expr * param : refType->params ) {
+					auto paramType = dynamic_cast< const ast::TypeExpr * >( param );
+					assertf(paramType, "Aggregate parameters should be type expressions: %s", toCString(param));
+					maybeAccept( paramType->type.get(), *visitor );
 				}
+				mangleName += "_";
 			}
 		}
@@ -656,4 +647,5 @@
 		}
 
+		// For debugging:
 		__attribute__((unused)) void printVarMap( const std::map< std::string, std::pair< int, int > > &varMap, std::ostream &os ) {
 			for ( std::map< std::string, std::pair< int, int > >::const_iterator i = varMap.begin(); i != varMap.end(); ++i ) {
@@ -665,36 +657,34 @@
 			// skip if not including qualifiers
 			if ( typeMode ) return;
-			if ( auto ptype = dynamic_cast< const ast::FunctionType * >(type) ) {
-				if ( ! ptype->forall.empty() ) {
-					std::list< std::string > assertionNames;
-					int dcount = 0, fcount = 0, vcount = 0, acount = 0;
-					mangleName += Encoding::forall;
-					for ( auto & decl : ptype->forall ) {
-						switch ( decl->kind ) {
-						  case ast::TypeDecl::Kind::Dtype:
-							dcount++;
-							break;
-						  case ast::TypeDecl::Kind::Ftype:
-							fcount++;
-							break;
-						  case ast::TypeDecl::Kind::Ttype:
-							vcount++;
-							break;
-						  default:
-							assertf( false, "unimplemented kind for type variable %s", SymTab::Mangler::Encoding::typeVariables[decl->kind].c_str() );
-						} // switch
-						varNums[ decl->name ] = std::make_pair( nextVarNum, (int)decl->kind );
-					} // for
-					for ( auto & assert : ptype->assertions ) {
-						assertionNames.push_back( ast::Pass<Mangler_new>::read(
-							assert->var.get(),
-							mangleOverridable, typeMode, mangleGenericParams, nextVarNum, varNums ) );
-						acount++;
-					} // for
-					mangleName += std::to_string( dcount ) + "_" + std::to_string( fcount ) + "_" + std::to_string( vcount ) + "_" + std::to_string( acount ) + "_";
-					for(const auto & a : assertionNames) mangleName += a;
-//					std::copy( assertionNames.begin(), assertionNames.end(), std::ostream_iterator< std::string >( mangleName, "" ) );
-					mangleName += "_";
-				} // if
+			auto funcType = dynamic_cast<const ast::FunctionType *>( type );
+			if ( funcType && !funcType->forall.empty() ) {
+				std::list< std::string > assertionNames;
+				int dcount = 0, fcount = 0, vcount = 0, acount = 0;
+				mangleName += Encoding::forall;
+				for ( auto & decl : funcType->forall ) {
+					switch ( decl->kind ) {
+					case ast::TypeDecl::Dtype:
+						dcount++;
+						break;
+					case ast::TypeDecl::Ftype:
+						fcount++;
+						break;
+					case ast::TypeDecl::Ttype:
+						vcount++;
+						break;
+					default:
+						assertf( false, "unimplemented kind for type variable %s", SymTab::Mangler::Encoding::typeVariables[decl->kind].c_str() );
+					} // switch
+					varNums[ decl->name ] = std::make_pair( nextVarNum, (int)decl->kind );
+				} // for
+				for ( auto & assert : funcType->assertions ) {
+					assertionNames.push_back( ast::Pass<Mangler_new>::read(
+						assert->var.get(),
+						mangleOverridable, typeMode, mangleGenericParams, nextVarNum, varNums ) );
+					acount++;
+				} // for
+				mangleName += std::to_string( dcount ) + "_" + std::to_string( fcount ) + "_" + std::to_string( vcount ) + "_" + std::to_string( acount ) + "_";
+				for ( const auto & a : assertionNames ) mangleName += a;
+				mangleName += "_";
 			} // if
 			if ( ! inFunctionType ) {
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am	(revision 9749d2fa5f42410d163813e570aefa765780a498)
+++ tests/Makefile.am	(revision 8fcf92109054723aa88873d699cd049c74f3cb44)
@@ -88,5 +88,6 @@
 	io/.in/many_read.data \
 	meta/fork+exec.hfa \
-	unified_locking/mutex_test.hfa
+	concurrent/unified_locking/mutex_test.hfa \
+    concurrent/channels/parallel_harness.hfa
 
 dist-hook:
Index: tests/concurrent/channels/big_elems.cfa
===================================================================
--- tests/concurrent/channels/big_elems.cfa	(revision 9749d2fa5f42410d163813e570aefa765780a498)
+++ tests/concurrent/channels/big_elems.cfa	(revision 8fcf92109054723aa88873d699cd049c74f3cb44)
@@ -1,4 +1,4 @@
 #define BIG 1
-#include "parallel_harness.cfa"
+#include "parallel_harness.hfa"
 
 size_t Processors = 10, Channels = 10, Producers = 40, Consumers = 40, ChannelSize = 128;
Index: sts/concurrent/channels/parallel_harness.cfa
===================================================================
--- tests/concurrent/channels/parallel_harness.cfa	(revision 9749d2fa5f42410d163813e570aefa765780a498)
+++ 	(revision )
@@ -1,185 +1,0 @@
-#include <locks.hfa>
-#include <fstream.hfa>
-#include <stdio.h>
-#include <string.h>
-#include <channel.hfa>
-#include <thread.hfa>
-#include <time.hfa>
-#include <stats.hfa>
-
-// user defines this
-// #define BIG 1
-
-owner_lock o;
-
-unsigned long long total_operations = 0;
-
-struct bigObject {
-    size_t a;
-    size_t b;
-    size_t c;
-    size_t d;
-    size_t e;
-    size_t f;
-    size_t g;
-    size_t h;
-};
-
-void ?{}( bigObject & this, size_t i ) with(this) { a = i; b = i; c = i; d = i; e = i; f = i; g = i; h = i; }
-void ?{}( bigObject & this ) { this{0}; }
-
-#ifdef BIG
-typedef channel( bigObject ) Channel;
-#else
-typedef channel( size_t ) Channel;
-#endif
-
-Channel * channels;
-
-volatile bool cons_done = false, prod_done = false;
-size_t cons_check = 0, prod_check = 0;
-
-thread Consumer {
-    size_t i;
-};
-static inline void ?{}( Consumer & c, size_t i, cluster & clu ) {
-    ((thread &)c){ clu };
-    c.i = i; 
-}
-void main(Consumer & this) {
-    unsigned long long runs = 0;
-    size_t my_check = 0;
-    for ( ;; ) {
-        if ( cons_done ) break;
-        #ifdef BIG
-        bigObject j = remove( channels[ this.i ] );
-        my_check = my_check ^ (j.a + j.b + j.c + j.d + j.d + j.e + j.f + j.g + j.h);
-        #else
-        size_t j = remove( channels[ this.i ] );
-        my_check = my_check ^ j;
-        #endif
-        
-        if ( !prod_done ) runs++;
-    }
-    lock(o);
-    total_operations += runs;
-    cons_check = cons_check ^ my_check;
-    // sout | "C: " | runs;
-    unlock(o);
-}
-
-thread Producer {
-    size_t i;
-};
-static inline void ?{}( Producer & p, size_t i, cluster & clu ) {
-    ((thread &)p){ clu };
-    p.i = i;
-}
-void main(Producer & this) {
-    unsigned long long runs = 0;
-    size_t my_check = 0;
-    for ( ;; ) {
-        if ( prod_done ) break;
-        #ifdef BIG
-        bigObject j{(size_t)runs};
-        insert( channels[ this.i ], j );
-        my_check = my_check ^ (j.a + j.b + j.c + j.d + j.d + j.e + j.f + j.g + j.h);
-        #else
-        insert( channels[ this.i ], (size_t)runs );
-        my_check = my_check ^ ((size_t)runs);
-        #endif
-        runs++;
-    }
-    lock(o);
-    total_operations += runs;
-    prod_check = prod_check ^ my_check;
-    // sout | "P: " | runs;
-    unlock(o);
-}
-
-
-int test( size_t Processors, size_t Channels, size_t Producers, size_t Consumers, size_t ChannelSize ) {
-    size_t Clusters = 1;
-    // create a cluster
-    cluster clus[Clusters];
-    processor * proc[Processors];
-    for ( i; Processors ) {
-        (*(proc[i] = alloc())){clus[i % Clusters]};
-    }
-
-    channels = anew( Channels );
-
-    // sout | "Processors: " | Processors | " ProdsPerChan: " | Producers | " ConsPerChan: " | Consumers | "Channels: " | Channels | " Channel Size: " | ChannelSize;
-    
-    for ( i; Channels ) {
-        channels[i]{ ChannelSize };
-    }
-
-    sout | "start";
-    Consumer * c[Consumers * Channels];
-    Producer * p[Producers * Channels];
-
-    for ( i; Consumers * Channels ) {
-        (*(c[i] = alloc())){ i % Channels, clus[i % Clusters] };
-    }
-
-    for ( i; Producers * Channels ) {
-        (*(p[i] = alloc())){ i % Channels, clus[i % Clusters] };
-    }
-
-    sleep(10`s);
-    prod_done = true;
-
-    for ( i; Producers * Channels ) {
-        delete(p[i]);
-    }
-
-    sout | "prods";
-    cons_done = true;
-    for ( i; Channels ) {
-        // sout | get_count( channels[i] );
-        if ( get_count( channels[i] ) < Consumers ){
-            #ifdef BIG
-            bigObject b{0};
-            #endif
-            for ( j; Consumers ) {
-                #ifdef BIG
-                insert( channels[i], b );
-                #else
-                insert( channels[i], 0 );
-                #endif
-            }
-        }
-    }
-    sout | "cons";
-    for ( i; Consumers * Channels ) {
-        delete(c[i]);
-    }
-
-    sout | "flush";
-    for ( i; Channels ) {
-        for ( ;; ) {
-            if ( get_count( channels[i] ) > 0 ) {
-                #ifdef BIG
-                bigObject j = remove( channels[ i ] );
-                cons_check = cons_check ^ (j.a + j.b + j.c + j.d + j.d + j.e + j.f + j.g + j.h);
-                #else
-                size_t j = remove( channels[ i ] );
-                cons_check = cons_check ^ j;
-                #endif
-            } else break;
-        }
-    }
-
-    adelete( channels );
-    // sout | "total channel ops: " | total_operations;
-    if ( cons_check != prod_check )
-        sout | "CHECKSUM MISMATCH !!!";
-    // print_stats_now( *active_cluster(), CFA_STATS_READY_Q);
-
-    for ( i; Processors ) {
-        delete(proc[i]);
-    }
-    sout | "done";
-    return 0;
-}
Index: tests/concurrent/channels/parallel_harness.hfa
===================================================================
--- tests/concurrent/channels/parallel_harness.hfa	(revision 8fcf92109054723aa88873d699cd049c74f3cb44)
+++ tests/concurrent/channels/parallel_harness.hfa	(revision 8fcf92109054723aa88873d699cd049c74f3cb44)
@@ -0,0 +1,185 @@
+#include <locks.hfa>
+#include <fstream.hfa>
+#include <stdio.h>
+#include <string.h>
+#include <channel.hfa>
+#include <thread.hfa>
+#include <time.hfa>
+#include <stats.hfa>
+
+// user defines this
+// #define BIG 1
+
+owner_lock o;
+
+unsigned long long total_operations = 0;
+
+struct bigObject {
+    size_t a;
+    size_t b;
+    size_t c;
+    size_t d;
+    size_t e;
+    size_t f;
+    size_t g;
+    size_t h;
+};
+
+void ?{}( bigObject & this, size_t i ) with(this) { a = i; b = i; c = i; d = i; e = i; f = i; g = i; h = i; }
+void ?{}( bigObject & this ) { this{0}; }
+
+#ifdef BIG
+typedef channel( bigObject ) Channel;
+#else
+typedef channel( size_t ) Channel;
+#endif
+
+Channel * channels;
+
+volatile bool cons_done = false, prod_done = false;
+size_t cons_check = 0, prod_check = 0;
+
+thread Consumer {
+    size_t i;
+};
+static inline void ?{}( Consumer & c, size_t i, cluster & clu ) {
+    ((thread &)c){ clu };
+    c.i = i; 
+}
+void main(Consumer & this) {
+    unsigned long long runs = 0;
+    size_t my_check = 0;
+    for ( ;; ) {
+        if ( cons_done ) break;
+        #ifdef BIG
+        bigObject j = remove( channels[ this.i ] );
+        my_check = my_check ^ (j.a + j.b + j.c + j.d + j.d + j.e + j.f + j.g + j.h);
+        #else
+        size_t j = remove( channels[ this.i ] );
+        my_check = my_check ^ j;
+        #endif
+        
+        if ( !prod_done ) runs++;
+    }
+    lock(o);
+    total_operations += runs;
+    cons_check = cons_check ^ my_check;
+    // sout | "C: " | runs;
+    unlock(o);
+}
+
+thread Producer {
+    size_t i;
+};
+static inline void ?{}( Producer & p, size_t i, cluster & clu ) {
+    ((thread &)p){ clu };
+    p.i = i;
+}
+void main(Producer & this) {
+    unsigned long long runs = 0;
+    size_t my_check = 0;
+    for ( ;; ) {
+        if ( prod_done ) break;
+        #ifdef BIG
+        bigObject j{(size_t)runs};
+        insert( channels[ this.i ], j );
+        my_check = my_check ^ (j.a + j.b + j.c + j.d + j.d + j.e + j.f + j.g + j.h);
+        #else
+        insert( channels[ this.i ], (size_t)runs );
+        my_check = my_check ^ ((size_t)runs);
+        #endif
+        runs++;
+    }
+    lock(o);
+    total_operations += runs;
+    prod_check = prod_check ^ my_check;
+    // sout | "P: " | runs;
+    unlock(o);
+}
+
+
+int test( size_t Processors, size_t Channels, size_t Producers, size_t Consumers, size_t ChannelSize ) {
+    size_t Clusters = 1;
+    // create a cluster
+    cluster clus[Clusters];
+    processor * proc[Processors];
+    for ( i; Processors ) {
+        (*(proc[i] = alloc())){clus[i % Clusters]};
+    }
+
+    channels = anew( Channels );
+
+    // sout | "Processors: " | Processors | " ProdsPerChan: " | Producers | " ConsPerChan: " | Consumers | "Channels: " | Channels | " Channel Size: " | ChannelSize;
+    
+    for ( i; Channels ) {
+        channels[i]{ ChannelSize };
+    }
+
+    sout | "start";
+    Consumer * c[Consumers * Channels];
+    Producer * p[Producers * Channels];
+
+    for ( i; Consumers * Channels ) {
+        (*(c[i] = alloc())){ i % Channels, clus[i % Clusters] };
+    }
+
+    for ( i; Producers * Channels ) {
+        (*(p[i] = alloc())){ i % Channels, clus[i % Clusters] };
+    }
+
+    sleep(10`s);
+    prod_done = true;
+
+    for ( i; Producers * Channels ) {
+        delete(p[i]);
+    }
+
+    sout | "prods";
+    cons_done = true;
+    for ( i; Channels ) {
+        // sout | get_count( channels[i] );
+        if ( get_count( channels[i] ) < Consumers ){
+            #ifdef BIG
+            bigObject b{0};
+            #endif
+            for ( j; Consumers ) {
+                #ifdef BIG
+                insert( channels[i], b );
+                #else
+                insert( channels[i], 0 );
+                #endif
+            }
+        }
+    }
+    sout | "cons";
+    for ( i; Consumers * Channels ) {
+        delete(c[i]);
+    }
+
+    sout | "flush";
+    for ( i; Channels ) {
+        for ( ;; ) {
+            if ( get_count( channels[i] ) > 0 ) {
+                #ifdef BIG
+                bigObject j = remove( channels[ i ] );
+                cons_check = cons_check ^ (j.a + j.b + j.c + j.d + j.d + j.e + j.f + j.g + j.h);
+                #else
+                size_t j = remove( channels[ i ] );
+                cons_check = cons_check ^ j;
+                #endif
+            } else break;
+        }
+    }
+
+    adelete( channels );
+    // sout | "total channel ops: " | total_operations;
+    if ( cons_check != prod_check )
+        sout | "CHECKSUM MISMATCH !!!";
+    // print_stats_now( *active_cluster(), CFA_STATS_READY_Q);
+
+    for ( i; Processors ) {
+        delete(proc[i]);
+    }
+    sout | "done";
+    return 0;
+}
Index: tests/concurrent/channels/zero_size.cfa
===================================================================
--- tests/concurrent/channels/zero_size.cfa	(revision 9749d2fa5f42410d163813e570aefa765780a498)
+++ tests/concurrent/channels/zero_size.cfa	(revision 8fcf92109054723aa88873d699cd049c74f3cb44)
@@ -1,3 +1,3 @@
-#include "parallel_harness.cfa"
+#include "parallel_harness.hfa"
 
 size_t Processors = 10, Channels = 10, Producers = 40, Consumers = 40, ChannelSize = 0;
