Index: src/GenPoly/Box.h
===================================================================
--- src/GenPoly/Box.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/Box.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -16,7 +16,4 @@
 #pragma once
 
-#include <list>  // for list
-
-class Declaration;
 namespace ast {
 	class TranslationUnit;
@@ -24,7 +21,7 @@
 
 namespace GenPoly {
-	/// boxes polymorphic function calls
-	void box( std::list< Declaration* >& translationUnit );
+
 void box( ast::TranslationUnit & translationUnit );
+
 } // namespace GenPoly
 
Index: src/GenPoly/ErasableScopedMap.h
===================================================================
--- src/GenPoly/ErasableScopedMap.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/ErasableScopedMap.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// ErasableScopedMap.h --
+// ErasableScopedMap.h -- A map that supports scoping and erasing elements.
 //
 // Author           : Aaron B. Moss
Index: src/GenPoly/FindFunction.cc
===================================================================
--- src/GenPoly/FindFunction.cc	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/FindFunction.cc	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// FindFunction.cc --
+// FindFunction.cc -- Find function types in a larger type.
 //
 // Author           : Richard C. Bilson
@@ -69,6 +69,4 @@
 	GuardScope( typeVars );
 	handleForall( type->forall );
-	//ast::accept_all( type->returns, *visitor );
-	// This might have to become ast::mutate_each with return.
 	ast::accept_each( type->returns, *visitor );
 }
@@ -79,5 +77,5 @@
 		functions.push_back( type );
 		if ( replaceMode ) {
-			// replace type parameters in function type with void*
+			// Replace type parameters in function type with void *.
 			ret = scrubTypeVars( ast::deepCopy( type ), typeVars );
 		} // if
Index: src/GenPoly/FindFunction.h
===================================================================
--- src/GenPoly/FindFunction.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/FindFunction.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// FindFunction.h -- 
+// FindFunction.h -- Find function types in a larger type.
 //
 // Author           : Richard C. Bilson
@@ -16,5 +16,5 @@
 #pragma once
 
-#include "GenPoly.h"  // for TyVarMap
+#include "GenPoly.h"            // for TypeVarMap
 
 namespace GenPoly {
Index: src/GenPoly/GenPoly.cc
===================================================================
--- src/GenPoly/GenPoly.cc	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/GenPoly.cc	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// GenPoly.cc --
+// GenPoly.cc -- General GenPoly utilities.
 //
 // Author           : Richard C. Bilson
@@ -33,64 +33,65 @@
 
 namespace GenPoly {
-	namespace {
-		/// Checks a parameter list for polymorphic parameters; will substitute according to env if present
-		bool hasPolyParams( const std::vector<ast::ptr<ast::Expr>> & params, const ast::TypeSubstitution * env ) {
-			for ( auto &param : params ) {
-				auto paramType = param.as<ast::TypeExpr>();
-				assertf( paramType, "Aggregate parameters should be type expressions" );
-				if ( isPolyType( paramType->type, env ) ) return true;
+
+namespace {
+	/// Checks a parameter list for polymorphic parameters; will substitute according to env if present.
+	bool hasPolyParams( const std::vector<ast::ptr<ast::Expr>> & params, const ast::TypeSubstitution * env ) {
+		for ( auto & param : params ) {
+			auto paramType = param.as<ast::TypeExpr>();
+			assertf( paramType, "Aggregate parameters should be type expressions" );
+			if ( isPolyType( paramType->type, env ) ) return true;
+		}
+		return false;
+	}
+
+	/// Checks a parameter list for polymorphic parameters from typeVars; will substitute according to env if present.
+	bool hasPolyParams( const std::vector<ast::ptr<ast::Expr>> & params, const TypeVarMap & typeVars, const ast::TypeSubstitution * env ) {
+		for ( auto & param : params ) {
+			auto paramType = param.as<ast::TypeExpr>();
+			assertf( paramType, "Aggregate parameters should be type expressions" );
+			if ( isPolyType( paramType->type, typeVars, env ) ) return true;
+		}
+		return false;
+	}
+
+	/// Checks a parameter list for dynamic-layout parameters from tyVars; will substitute according to env if present.
+	bool hasDynParams(
+			const std::vector<ast::ptr<ast::Expr>> & params,
+			const TypeVarMap & typeVars,
+			const ast::TypeSubstitution * subst ) {
+		for ( ast::ptr<ast::Expr> const & paramExpr : params ) {
+			auto param = paramExpr.as<ast::TypeExpr>();
+			assertf( param, "Aggregate parameters should be type expressions." );
+			if ( isDynType( param->type.get(), typeVars, subst ) ) {
+				return true;
 			}
-			return false;
-		}
-
-		/// Checks a parameter list for polymorphic parameters from tyVars; will substitute according to env if present
-		bool hasPolyParams( const std::vector<ast::ptr<ast::Expr>> & params, const TypeVarMap & typeVars, const ast::TypeSubstitution * env ) {
-			for ( auto & param : params ) {
-				auto paramType = param.as<ast::TypeExpr>();
-				assertf( paramType, "Aggregate parameters should be type expressions" );
-				if ( isPolyType( paramType->type, typeVars, env ) ) return true;
-			}
-			return false;
-		}
-
-		/// Checks a parameter list for dynamic-layout parameters from tyVars; will substitute according to env if present
-		bool hasDynParams(
-				const std::vector<ast::ptr<ast::Expr>> & params,
-				const TypeVarMap & typeVars,
-				const ast::TypeSubstitution * subst ) {
-			for ( ast::ptr<ast::Expr> const & paramExpr : params ) {
-				auto param = paramExpr.as<ast::TypeExpr>();
-				assertf( param, "Aggregate parameters should be type expressions." );
-				if ( isDynType( param->type.get(), typeVars, subst ) ) {
-					return true;
-				}
-			}
-			return false;
-		}
-	}
-
-	const ast::Type * replaceTypeInst(const ast::Type * type, const ast::TypeSubstitution * env) {
-		if (!env) return type;
-		if ( auto typeInst = dynamic_cast<const ast::TypeInstType*>(type) ) {
-			auto newType = env->lookup(typeInst);
-			if (newType) return newType;
-		}
+		}
+		return false;
+	}
+} // namespace
+
+const ast::Type * replaceTypeInst( const ast::Type * type, const ast::TypeSubstitution * env ) {
+	if ( !env ) return type;
+	if ( auto typeInst = dynamic_cast<const ast::TypeInstType*>( type ) ) {
+		if ( auto newType = env->lookup( typeInst ) ) return newType;
+	}
+	return type;
+}
+
+const ast::Type * isPolyType( const ast::Type * type, const ast::TypeSubstitution * subst ) {
+	type = replaceTypeInst( type, subst );
+
+	if ( dynamic_cast< const ast::TypeInstType * >( type ) ) {
+		// This case is where the two variants of isPolyType differ.
 		return type;
-	}
-
-	const ast::Type * isPolyType(const ast::Type * type, const ast::TypeSubstitution * env) {
-		type = replaceTypeInst( type, env );
-
-		if ( dynamic_cast< const ast::TypeInstType * >( type ) ) {
-			return type;
-		} else if ( auto arrayType = dynamic_cast< const ast::ArrayType * >( type ) ) {
-			return isPolyType( arrayType->base, env );
-		} else if ( auto structType = dynamic_cast< const ast::StructInstType* >( type ) ) {
-			if ( hasPolyParams( structType->params, env ) ) return type;
-		} else if ( auto unionType = dynamic_cast< const ast::UnionInstType* >( type ) ) {
-			if ( hasPolyParams( unionType->params, env ) ) return type;
-		}
-		return 0;
-	}
+	} else if ( auto arrayType = dynamic_cast< const ast::ArrayType * >( type ) ) {
+		return isPolyType( arrayType->base, subst );
+	} else if ( auto structType = dynamic_cast< const ast::StructInstType* >( type ) ) {
+		if ( hasPolyParams( structType->params, subst ) ) return type;
+	} else if ( auto unionType = dynamic_cast< const ast::UnionInstType* >( type ) ) {
+		if ( hasPolyParams( unionType->params, subst ) ) return type;
+	}
+	return nullptr;
+}
 
 const ast::Type * isPolyType( const ast::Type * type,
@@ -121,11 +122,7 @@
 		}
 	} else if ( auto inst = dynamic_cast<ast::StructInstType const *>( type ) ) {
-		if ( hasDynParams( inst->params, typeVars, subst ) ) {
-			return inst;
-		}
+		if ( hasDynParams( inst->params, typeVars, subst ) ) return inst;
 	} else if ( auto inst = dynamic_cast<ast::UnionInstType const *>( type ) ) {
-		if ( hasDynParams( inst->params, typeVars, subst ) ) {
-			return inst;
-		}
+		if ( hasDynParams( inst->params, typeVars, subst ) ) return inst;
 	}
 	return nullptr;
@@ -190,60 +187,59 @@
 }
 
-	const ast::FunctionType * getFunctionType( const ast::Type * ty ) {
-		if ( auto pty = dynamic_cast< const ast::PointerType * >( ty ) ) {
-			return pty->base.as< ast::FunctionType >();
-		} else {
-			return dynamic_cast< const ast::FunctionType * >( ty );
-		}
-	}
-
-	namespace {
-		/// Checks if is a pointer to D
-		template<typename D, typename B>
-		bool is( const B* p ) { return type_index{typeid(D)} == type_index{typeid(*p)}; }
-
-		/// Converts to a pointer to D without checking for safety
-		template<typename D, typename B>
-		inline D* as( B* p ) { return reinterpret_cast<D*>(p); }
-
-		template<typename D, typename B>
-		inline D const * as( B const * p ) {
-			return reinterpret_cast<D const *>( p );
-		}
-
-		/// Flattens a list of types.
-		// There is another flattenList in Unify.
-		void flattenList( vector<ast::ptr<ast::Type>> const & src,
-				vector<ast::ptr<ast::Type>> & out ) {
-			for ( auto const & type : src ) {
-				ResolvExpr::flatten( type, out );
-			}
-		}
-
-		bool paramListsPolyCompatible(
-				std::vector<ast::ptr<ast::Expr>> const & lparams,
-				std::vector<ast::ptr<ast::Expr>> const & rparams ) {
-			if ( lparams.size() != rparams.size() ) {
+const ast::FunctionType * getFunctionType( const ast::Type * ty ) {
+	if ( auto pty = dynamic_cast< const ast::PointerType * >( ty ) ) {
+		return pty->base.as< ast::FunctionType >();
+	} else {
+		return dynamic_cast< const ast::FunctionType * >( ty );
+	}
+}
+
+namespace {
+	/// Checks if is a pointer to D
+	template<typename D, typename B>
+	bool is( const B* p ) { return type_index{typeid(D)} == type_index{typeid(*p)}; }
+
+	/// Converts to a pointer to D without checking for safety
+	template<typename D, typename B>
+	inline D* as( B* p ) { return reinterpret_cast<D*>(p); }
+
+	template<typename D, typename B>
+	inline D const * as( B const * p ) {
+		return reinterpret_cast<D const *>( p );
+	}
+
+	/// Flattens a list of types.
+	void flattenList( vector<ast::ptr<ast::Type>> const & src,
+			vector<ast::ptr<ast::Type>> & out ) {
+		for ( auto const & type : src ) {
+			ResolvExpr::flatten( type, out );
+		}
+	}
+
+	bool paramListsPolyCompatible(
+			std::vector<ast::ptr<ast::Expr>> const & lparams,
+			std::vector<ast::ptr<ast::Expr>> const & rparams ) {
+		if ( lparams.size() != rparams.size() ) {
+			return false;
+		}
+
+		for ( auto lparam = lparams.begin(), rparam = rparams.begin() ;
+				lparam != lparams.end() ; ++lparam, ++rparam ) {
+			ast::TypeExpr const * lexpr = lparam->as<ast::TypeExpr>();
+			assertf( lexpr, "Aggregate parameters should be type expressions" );
+			ast::TypeExpr const * rexpr = rparam->as<ast::TypeExpr>();
+			assertf( rexpr, "Aggregate parameters should be type expressions" );
+
+			// xxx - might need to let VoidType be a wildcard here too; could have some voids
+			// stuffed in for dtype-statics.
+			// if ( is<VoidType>( lexpr->type() ) || is<VoidType>( bparam->get_type() ) ) continue;
+			if ( !typesPolyCompatible( lexpr->type, rexpr->type ) ) {
 				return false;
 			}
-
-			for ( auto lparam = lparams.begin(), rparam = rparams.begin() ;
-					lparam != lparams.end() ; ++lparam, ++rparam ) {
-				ast::TypeExpr const * lexpr = lparam->as<ast::TypeExpr>();
-				assertf( lexpr, "Aggregate parameters should be type expressions" );
-				ast::TypeExpr const * rexpr = rparam->as<ast::TypeExpr>();
-				assertf( rexpr, "Aggregate parameters should be type expressions" );
-
-				// xxx - might need to let VoidType be a wildcard here too; could have some voids
-				// stuffed in for dtype-statics.
-				// if ( is<VoidType>( lexpr->type() ) || is<VoidType>( bparam->get_type() ) ) continue;
-				if ( !typesPolyCompatible( lexpr->type, rexpr->type ) ) {
-					return false;
-				}
-			}
-
-			return true;
-		}
-	}
+		}
+
+		return true;
+	}
+} // namespace
 
 bool typesPolyCompatible( ast::Type const * lhs, ast::Type const * rhs ) {
@@ -378,5 +374,5 @@
 		const ast::TypeSubstitution * subst ) {
 	const ast::FunctionType * function = getFunctionType( expr->func->result );
-	assertf( function, "ApplicationExpr has non-function type: %s", toString( expr->func->result ).c_str() );
+	assertf( function, "ApplicationExpr has non-function type: %s", toCString( expr->func->result ) );
 	TypeVarMap exprTyVars;
 	makeTypeVarMap( function, exprTyVars );
Index: src/GenPoly/GenPoly.h
===================================================================
--- src/GenPoly/GenPoly.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/GenPoly.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// GenPoly.h --
+// GenPoly.h -- General GenPoly utilities.
 //
 // Author           : Richard C. Bilson
@@ -30,69 +30,69 @@
 namespace GenPoly {
 
-	struct TypeVarMap : public ErasableScopedMap<ast::TypeEnvKey, ast::TypeData> {
-		TypeVarMap() : ErasableScopedMap( ast::TypeData() ) {}
-	};
+struct TypeVarMap : public ErasableScopedMap<ast::TypeEnvKey, ast::TypeData> {
+	TypeVarMap() : ErasableScopedMap( ast::TypeData() ) {}
+};
 
-	/// Replaces a TypeInstType by its referrent in the environment, if applicable
-	const ast::Type * replaceTypeInst( const ast::Type *, const ast::TypeSubstitution * );
+/// Replaces a TypeInstType by its referrent in the environment, if applicable.
+const ast::Type * replaceTypeInst( const ast::Type *, const ast::TypeSubstitution * );
 
-	/// returns polymorphic type if is polymorphic type, NULL otherwise; will look up substitution in env if provided
-	const ast::Type * isPolyType(const ast::Type * type, const ast::TypeSubstitution * env = nullptr);
+/// Returns polymorphic type if is polymorphic type, NULL otherwise; will look up substitution in env if provided.
+const ast::Type * isPolyType( const ast::Type * type, const ast::TypeSubstitution * subst = nullptr );
 
-	/// returns polymorphic type if is polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided
-	const ast::Type * isPolyType( const ast::Type * type, const TypeVarMap & typeVars, const ast::TypeSubstitution * subst = nullptr );
+/// Returns polymorphic type if is polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided.
+const ast::Type * isPolyType( const ast::Type * type, const TypeVarMap & typeVars, const ast::TypeSubstitution * subst = nullptr );
 
-	/// returns dynamic-layout type if is dynamic-layout type in tyVars, NULL otherwise; will look up substitution in env if provided
-	const ast::BaseInstType *isDynType( const ast::Type * type, const TypeVarMap & typeVars, const ast::TypeSubstitution * subst = 0 );
+/// Returns dynamic-layout type if is dynamic-layout type in tyVars, NULL otherwise; will look up substitution in env if provided.
+const ast::BaseInstType *isDynType( const ast::Type * type, const TypeVarMap & typeVars, const ast::TypeSubstitution * subst = 0 );
 
-	/// true iff function has dynamic-layout return type under the given type variable map
-	const ast::BaseInstType *isDynRet( const ast::FunctionType * type, const TypeVarMap & typeVars );
+/// Returns true iff function has dynamic-layout return type under the given type variable map.
+const ast::BaseInstType *isDynRet( const ast::FunctionType * type, const TypeVarMap & typeVars );
 
-	/// true iff function has dynamic-layout return type under the type variable map generated from its forall-parameters
-	const ast::BaseInstType *isDynRet( const ast::FunctionType * func );
+/// Returns true iff function has dynamic-layout return type under the type variable map generated from its forall-parameters.
+const ast::BaseInstType *isDynRet( const ast::FunctionType * func );
 
-	/// A function needs an adapter if it returns a dynamic-layout value or if any of its parameters have dynamic-layout type
-	bool needsAdapter( ast::FunctionType const * adaptee, const TypeVarMap & typeVars );
+/// A function needs an adapter if it returns a dynamic-layout value or if any of its parameters have dynamic-layout type.
+bool needsAdapter( ast::FunctionType const * adaptee, const TypeVarMap & typeVars );
 
-	/// returns polymorphic type if is pointer to polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided
-	const ast::Type * isPolyPtr( const ast::Type * type, const TypeVarMap & typeVars, const ast::TypeSubstitution * env = 0 );
+/// Returns polymorphic type if is pointer to polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided.
+const ast::Type * isPolyPtr( const ast::Type * type, const TypeVarMap & typeVars, const ast::TypeSubstitution * env = 0 );
 
-	/// if the base type (after dereferencing N >= 0 pointers) is a polymorphic type in tyVars, returns the base type, NULL otherwise;
-	/// N will be stored in levels, if provided, will look up substitution in env if provided
-	const ast::Type * hasPolyBase( const ast::Type * type, const TypeVarMap & typeVars, int * levels = 0, const ast::TypeSubstitution * env = 0 );
+/// If the base type (after dereferencing N >= 0 pointers) is a polymorphic type in tyVars, returns the base type, NULL otherwise;
+/// N will be stored in levels, if provided, will look up substitution in env if provided.
+const ast::Type * hasPolyBase( const ast::Type * type, const TypeVarMap & typeVars, int * levels = 0, const ast::TypeSubstitution * env = 0 );
 
-	/// Returns a pointer to the base FunctionType if ty is the type of a function (or pointer to one), NULL otherwise
-	const ast::FunctionType * getFunctionType( const ast::Type * ty );
+/// Returns a pointer to the base FunctionType if ty is the type of a function (or pointer to one), NULL otherwise.
+const ast::FunctionType * getFunctionType( const ast::Type * ty );
 
-	/// true iff types are structurally identical, where TypeInstType's match any type.
-	bool typesPolyCompatible( ast::Type const * lhs, ast::Type const * rhs );
+/// Returns true iff types are structurally identical, where TypeInstType's match any type.
+bool typesPolyCompatible( ast::Type const * lhs, ast::Type const * rhs );
 
-	/// true if arg requires boxing given exprTyVars
-	bool needsBoxing( const ast::Type * param, const ast::Type * arg, const TypeVarMap & typeVars, const ast::TypeSubstitution * subst );
+/// Returns true if arg requires boxing given typeVars.
+bool needsBoxing( const ast::Type * param, const ast::Type * arg, const TypeVarMap & typeVars, const ast::TypeSubstitution * subst );
 
-	/// true if arg requires boxing in the call to appExpr
-	bool needsBoxing( const ast::Type * param, const ast::Type * arg, const ast::ApplicationExpr * expr, const ast::TypeSubstitution * subst );
+/// Returns true if arg requires boxing in the call to appExpr.
+bool needsBoxing( const ast::Type * param, const ast::Type * arg, const ast::ApplicationExpr * expr, const ast::TypeSubstitution * subst );
 
-	/// Adds the type variable `tyVar` to `tyVarMap`
-	void addToTypeVarMap( const ast::TypeDecl * type, TypeVarMap & typeVars );
-	void addToTypeVarMap( const ast::TypeInstType * type, TypeVarMap & typeVars );
+/// Adds the type variable `type` to `typeVars`.
+void addToTypeVarMap( const ast::TypeDecl * type, TypeVarMap & typeVars );
+void addToTypeVarMap( const ast::TypeInstType * type, TypeVarMap & typeVars );
 
-	/// Adds the declarations in the forall list of type (and its pointed-to type if it's a pointer type) to `tyVarMap`
-	void makeTypeVarMap( const ast::Type * type, TypeVarMap & typeVars );
-	void makeTypeVarMap( const ast::FunctionDecl * decl, TypeVarMap & typeVars );
+/// Adds the declarations in the forall list of type (and its pointed-to type if it's a pointer type) to `typeVars`.
+void makeTypeVarMap( const ast::Type * type, TypeVarMap & typeVars );
+void makeTypeVarMap( const ast::FunctionDecl * decl, TypeVarMap & typeVars );
 
-	/// Gets the name of the sizeof parameter for the type, given its mangled name
-	inline std::string sizeofName( const std::string &name ) { return std::string( "_sizeof_" ) + name; }
+/// Gets the name of the sizeof parameter for the type, given its mangled name.
+inline std::string sizeofName( const std::string &name ) { return std::string( "_sizeof_" ) + name; }
 
-	/// Gets the name of the alignof parameter for the type, given its mangled name
-	inline std::string alignofName( const std::string &name ) { return std::string( "_alignof_" ) + name; }
+/// Gets the name of the alignof parameter for the type, given its mangled name.
+inline std::string alignofName( const std::string &name ) { return std::string( "_alignof_" ) + name; }
 
-	/// Gets the name of the offsetof parameter for the type, given its mangled name
-	inline std::string offsetofName( const std::string &name ) { return std::string( "_offsetof_" ) + name; }
+/// Gets the name of the offsetof parameter for the type, given its mangled name.
+inline std::string offsetofName( const std::string &name ) { return std::string( "_offsetof_" ) + name; }
 
-	/// Gets the name of the layout function for a given aggregate type, given its declaration
-	inline std::string layoutofName( ast::AggregateDecl const * decl ) {
-		return std::string( "_layoutof_" ) + decl->name;
-	}
+/// Gets the name of the layout function for a given aggregate type, given its declaration.
+inline std::string layoutofName( ast::AggregateDecl const * decl ) {
+	return std::string( "_layoutof_" ) + decl->name;
+}
 
 } // namespace GenPoly
Index: src/GenPoly/InstantiateGeneric.h
===================================================================
--- src/GenPoly/InstantiateGeneric.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/InstantiateGeneric.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -16,7 +16,4 @@
 #pragma once
 
-#include <list>  // for list
-
-class Declaration;
 namespace ast {
 	class TranslationUnit;
@@ -25,5 +22,4 @@
 namespace GenPoly {
 
-void instantiateGeneric( std::list< Declaration* > &translationUnit );
 void instantiateGeneric( ast::TranslationUnit & translationUnit );
 /// Replaces all generic types that have static layout with concrete
Index: src/GenPoly/Lvalue.h
===================================================================
--- src/GenPoly/Lvalue.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/Lvalue.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Lvalue.h --
+// Lvalue.h -- Clean up lvalues and remove references.
 //
 // Author           : Richard C. Bilson
@@ -16,8 +16,4 @@
 #pragma once
 
-#include <list>  // for list
-
-class Declaration;
-class Expression;
 namespace ast {
 	class Expr;
@@ -26,14 +22,14 @@
 
 namespace GenPoly {
-	/// replaces return type of `lvalue T` with `T*`, along with appropriate address-of and dereference operators
-	void convertLvalue( std::list< Declaration* >& translationUnit );
-	void convertLvalue( ast::TranslationUnit & translationUnit );
 
-	/// true after reference types have been eliminated from the source code. After this point, reference types should not be added to the AST.
-	bool referencesPermissable();
+/// Replaces return type of `T&` with `T*`, along with appropriate address-of and dereference operators.
+void convertLvalue( ast::TranslationUnit & translationUnit );
 
-	/// applies transformations that allow GCC to accept more complicated lvalue expressions, e.g. &(a, b)
-	Expression * generalizedLvalue( Expression * expr );
-	ast::Expr const * generalizedLvalue( ast::Expr const * expr );
+/// Returns true until reference types have been eliminated from the source code. After this point, reference types should not be added to the AST.
+bool referencesPermissable();
+
+/// Applies transformations that allow GCC to accept more complicated lvalue expressions, e.g. &(a, b).
+ast::Expr const * generalizedLvalue( ast::Expr const * expr );
+
 } // namespace GenPoly
 
Index: src/GenPoly/ScopedSet.h
===================================================================
--- src/GenPoly/ScopedSet.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/ScopedSet.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// ScopedSet.h --
+// ScopedSet.h -- A set that supports save/restore scoping.
 //
 // Author           : Aaron B. Moss
Index: src/GenPoly/ScrubTyVars.cc
===================================================================
--- src/GenPoly/ScrubTyVars.cc	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/ScrubTyVars.cc	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// ScrubTyVars.cc --
+// ScrubTyVars.cc -- Remove polymorphic types.
 //
 // Author           : Richard C. Bilson
@@ -27,7 +27,7 @@
 
 struct ScrubTypeVars :
-	public ast::WithGuards,
-	public ast::WithShortCircuiting,
-	public ast::WithVisitorRef<ScrubTypeVars> {
+		public ast::WithGuards,
+		public ast::WithShortCircuiting,
+		public ast::WithVisitorRef<ScrubTypeVars> {
 
 	ScrubTypeVars( ScrubMode m, TypeVarMap const * tv ) :
Index: src/GenPoly/ScrubTyVars.h
===================================================================
--- src/GenPoly/ScrubTyVars.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/ScrubTyVars.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// ScrubTyVars.h --
+// ScrubTyVars.h -- Remove polymorphic types.
 //
 // Author           : Richard C. Bilson
@@ -19,5 +19,5 @@
 
 #include "AST/Fwd.hpp"        // for Node
-#include "GenPoly.h"          // for TyVarMap, isPolyType, isDynType
+#include "GenPoly.h"          // for TypeVarMap, isPolyType, isDynType
 
 namespace GenPoly {
Index: src/GenPoly/Specialize.h
===================================================================
--- src/GenPoly/Specialize.h	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
+++ src/GenPoly/Specialize.h	(revision aad677d7c2bd4b3b3e41d177e27db0dfdaba484f)
@@ -16,7 +16,4 @@
 #pragma once
 
-#include <list>  // for list
-
-class Declaration;
 namespace ast {
 	class TranslationUnit;
@@ -24,8 +21,7 @@
 
 namespace GenPoly {
-	/// generates thunks where needed
-	void convertSpecializations( std::list< Declaration* >& translationUnit );
 
-	void convertSpecializations( ast::TranslationUnit & translationUnit );
+void convertSpecializations( ast::TranslationUnit & translationUnit );
+
 } // namespace GenPoly
 
