Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision d3a4986415d3791181de98120031e71a598fe5ce)
+++ src/Parser/DeclarationNode.cc	(revision cb98d9d7e7fda2351c38c9e1214e03b718990e7d)
@@ -53,5 +53,4 @@
 	linkage( ::linkage ) {
 
-//	variable.name = nullptr;
 	variable.tyClass = ast::TypeDecl::NUMBER_OF_KINDS;
 	variable.assertions = nullptr;
@@ -65,9 +64,8 @@
 	delete name;
 
-//	delete variable.name;
 	delete variable.assertions;
 	delete variable.initializer;
 
-//	delete type;
+	delete type;
 	delete bitfieldWidth;
 
@@ -100,5 +98,4 @@
 	newnode->error = error;
 
-//	newnode->variable.name = variable.name ? new string( *variable.name ) : nullptr;
 	newnode->variable.tyClass = variable.tyClass;
 	newnode->variable.assertions = maybeCopy( variable.assertions );
@@ -228,6 +225,6 @@
 } // DeclarationNode::newEnumValueGeneric
 
-DeclarationNode * DeclarationNode::newEnumInLine( const string name ) {
-	DeclarationNode * newnode = newName( new std::string(name) );
+DeclarationNode * DeclarationNode::newEnumInLine( const std::string * name ) {
+	DeclarationNode * newnode = newName( name );
 	newnode->enumInLine = true;
 	return newnode;
@@ -460,5 +457,5 @@
 		SemanticWarning( yylloc, Warning::BadQualifiersZeroOne, TypeData::builtinTypeNames[builtin] );
 	} // if
-	type = ::addQualifiers( q->type, type );
+	type = ::addQualifiers( type, q->type );
 	q->type = nullptr;
 
@@ -473,5 +470,5 @@
 	copySpecifiers( o, copyattr );
 	if ( o->type ) {
-		type = ::addType( o->type, type, o->attributes );
+		type = ::addType( type, o->type, o->attributes );
 		o->type = nullptr;
 	} // if
@@ -584,24 +581,11 @@
 DeclarationNode * DeclarationNode::addAssertions( DeclarationNode * assertions ) {
 	if ( variable.tyClass != ast::TypeDecl::NUMBER_OF_KINDS ) {
-		if ( variable.assertions ) {
-			variable.assertions->set_last( assertions );
-		} else {
-			variable.assertions = assertions;
-		} // if
+		extend( variable.assertions, assertions );
 		return this;
 	} // if
 
 	assert( type );
-	switch ( type->kind ) {
-	case TypeData::Symbolic:
-		if ( type->symbolic.assertions ) {
-			type->symbolic.assertions->set_last( assertions );
-		} else {
-			type->symbolic.assertions = assertions;
-		} // if
-		break;
-	default:
-		assert( false );
-	} // switch
+	assert( TypeData::Symbolic == type->kind );
+	extend( type->symbolic.assertions, assertions );
 
 	return this;
@@ -688,19 +672,16 @@
 
 DeclarationNode * DeclarationNode::addNewPointer( DeclarationNode * p ) {
-	if ( p ) {
-		assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference );
-		if ( type ) {
-			p->type->base = makeNewBase( type );
-			type = nullptr;
-		} // if
-		delete this;
-		return p;
-	} else {
-		return this;
-	} // if
+	if ( !p ) return this;
+	assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference );
+	if ( type ) {
+		p->type->base = makeNewBase( type );
+		type = nullptr;
+	} // if
+	delete this;
+	return p;
 }
 
 DeclarationNode * DeclarationNode::addNewArray( DeclarationNode * a ) {
-	if ( ! a ) return this;
+	if ( !a ) return this;
 	assert( a->type->kind == TypeData::Array );
 	if ( type ) {
@@ -774,5 +755,5 @@
 			if ( ret->kind == TypeData::Aggregate ) {
 				newnode->attributes.swap( ret->aggregate.attributes );
-			} // if 
+			} // if
 			return newnode;
 		} // if
Index: src/Parser/DeclarationNode.h
===================================================================
--- src/Parser/DeclarationNode.h	(revision d3a4986415d3791181de98120031e71a598fe5ce)
+++ src/Parser/DeclarationNode.h	(revision cb98d9d7e7fda2351c38c9e1214e03b718990e7d)
@@ -30,5 +30,5 @@
 	static DeclarationNode * newEnumConstant( const std::string * name, ExpressionNode * constant );
 	static DeclarationNode * newEnumValueGeneric( const std::string * name, InitializerNode * init );
-	static DeclarationNode * newEnumInLine( const std::string name );
+	static DeclarationNode * newEnumInLine( const std::string * name );
 	static DeclarationNode * newName( const std::string * );
 	static DeclarationNode * newTypeParam( ast::TypeDecl::Kind, const std::string * );
@@ -99,5 +99,4 @@
 
 	struct Variable_t {
-//		const std::string * name;
 		ast::TypeDecl::Kind tyClass;
 		DeclarationNode * assertions;
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision d3a4986415d3791181de98120031e71a598fe5ce)
+++ src/Parser/ParseNode.h	(revision cb98d9d7e7fda2351c38c9e1214e03b718990e7d)
@@ -82,4 +82,13 @@
 };
 
+template<typename Node>
+void extend( Node *& list, Node * value ) {
+	if ( list ) {
+		extend( list->next, value );
+	} else {
+		list = value;
+	}
+}
+
 // Must harmonize with OperName.
 enum class OperKinds {
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision d3a4986415d3791181de98120031e71a598fe5ce)
+++ src/Parser/TypeData.cc	(revision cb98d9d7e7fda2351c38c9e1214e03b718990e7d)
@@ -475,4 +475,16 @@
 
 
+// Wrap an aggregate up in an instance. Takes and gives ownership.
+static TypeData * makeInstance( TypeData * type ) {
+	assert( TypeData::Aggregate == type->kind );
+	TypeData * out = new TypeData( TypeData::AggregateInst );
+	out->aggInst.aggregate = type;
+	out->aggInst.params = maybeCopy( type->aggregate.actuals );
+	out->aggInst.hoistType = type->aggregate.body;
+	out->qualifiers |= type->qualifiers;
+	return out;
+}
+
+
 TypeData * build_type_qualifier( ast::CV::Qualifiers tq ) {
 	TypeData * type = new TypeData;
@@ -564,20 +576,16 @@
 
 // Takes ownership of all arguments, gives ownership of return value.
-TypeData * addQualifiers( TypeData * ltype, TypeData * rtype ) {
-	if ( ltype->forall ) {
-		if ( rtype->forall ) {
-			rtype->forall->set_last( ltype->forall );
-		} else if ( TypeData::Aggregate != rtype->kind ) {
-			rtype->forall = ltype->forall;
-		} else if ( rtype->aggregate.params ) {
-			rtype->aggregate.params->set_last( ltype->forall );
+TypeData * addQualifiers( TypeData * dst, TypeData * src ) {
+	if ( src->forall ) {
+		if ( dst->forall || TypeData::Aggregate != dst->kind ) {
+			extend( dst->forall, src->forall );
 		} else {
-			rtype->aggregate.params = ltype->forall;
+			extend( dst->aggregate.params, src->forall );
 		}
-		ltype->forall = nullptr;
+		src->forall = nullptr;
 	}
 
-	addQualifiersToType( rtype, ltype );
-	return rtype;
+	addQualifiersToType( dst, src );
+	return dst;
 }
 
@@ -585,9 +593,5 @@
 static void addTypeToType( TypeData *& dst, TypeData *& src ) {
 	if ( src->forall && dst->kind == TypeData::Function ) {
-		if ( dst->forall ) {
-			dst->forall->set_last( src->forall );
-		} else {
-			dst->forall = src->forall;
-		} // if
+		extend( dst->forall, src->forall );
 		src->forall = nullptr;
 	} // if
@@ -641,51 +645,32 @@
 		break;
 	default:
-		switch ( src->kind ) {
-		case TypeData::Aggregate:
-			dst->base = new TypeData( TypeData::AggregateInst );
-			dst->base->aggInst.aggregate = src;
-			if ( src->kind == TypeData::Aggregate ) {
-				dst->base->aggInst.params = maybeCopy( src->aggregate.actuals );
-			} // if
-			dst->base->qualifiers |= src->qualifiers;
-			src = nullptr;
-			break;
-		default:
-			if ( dst->forall ) {
-				dst->forall->set_last( src->forall );
-			} else {
-				dst->forall = src->forall;
-			} // if
+		if ( TypeData::Aggregate == src->kind ) {
+			dst->base = makeInstance( src );
+		} else {
+			extend( dst->forall, src->forall );
 			src->forall = nullptr;
 			dst->base = src;
-			src = nullptr;
-		} // switch
+		}
+		src = nullptr;
 	} // switch
 }
 
 // Takes ownership of all arguments, gives ownership of return value.
-TypeData * addType( TypeData * ltype, TypeData * rtype, std::vector<ast::ptr<ast::Attribute>> & attributes ) {
-	if ( rtype ) {
-		addTypeToType( rtype, ltype );
-		return rtype;
+TypeData * addType( TypeData * dst, TypeData * src, std::vector<ast::ptr<ast::Attribute>> & attributes ) {
+	if ( dst ) {
+		addTypeToType( dst, src );
+	} else if ( src->kind == TypeData::Aggregate ) {
+		// Hide type information aggregate instances.
+		dst = makeInstance( src );
+		dst->aggInst.aggregate->aggregate.attributes.swap( attributes );
 	} else {
-		if ( ltype->kind == TypeData::Aggregate ) {
-			// Hide type information aggregate instances.
-			rtype = new TypeData( TypeData::AggregateInst );
-			rtype->aggInst.aggregate = ltype;
-			rtype->aggInst.aggregate->aggregate.attributes.swap( attributes ); // change ownership
-			rtype->aggInst.hoistType = ltype->aggregate.body;
-			rtype->aggInst.params = maybeCopy( ltype->aggregate.actuals );
-			rtype->qualifiers |= ltype->qualifiers;
-		} else {
-			rtype = ltype;
-		} // if
-		return rtype;
+		dst = src;
 	} // if
-}
-
-TypeData * addType( TypeData * ltype, TypeData * rtype ) {
+	return dst;
+}
+
+TypeData * addType( TypeData * dst, TypeData * src ) {
 	std::vector<ast::ptr<ast::Attribute>> attributes;
-	return addType( ltype, rtype, attributes );
+	return addType( dst, src, attributes );
 }
 
@@ -713,17 +698,5 @@
 
 TypeData * makeNewBase( TypeData * type ) {
-	switch ( type->kind ) {
-	case TypeData::Aggregate: {
-		TypeData * out = new TypeData( TypeData::AggregateInst );
-		out->aggInst.aggregate = type;
-		if ( TypeData::Aggregate == type->kind ) {
-			out->aggInst.params = maybeCopy( type->aggregate.actuals );
-		}
-		out->qualifiers |= type->qualifiers;
-		return out;
-	}
-	default:
-		return type;
-	} // switch
+	return ( TypeData::Aggregate == type->kind ) ? makeInstance( type ) : type;
 }
 
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision d3a4986415d3791181de98120031e71a598fe5ce)
+++ src/Parser/parser.yy	(revision cb98d9d7e7fda2351c38c9e1214e03b718990e7d)
@@ -2815,5 +2815,9 @@
 		{ $$ = DeclarationNode::newEnumValueGeneric( $2, $3 ); }
 	| INLINE type_name
-		{ $$ = DeclarationNode::newEnumInLine( *$2->symbolic.name ); }
+		{
+			$$ = DeclarationNode::newEnumInLine( $2->symbolic.name );
+			$2->symbolic.name = nullptr;
+			delete $2;
+		}
 	| enumerator_list ',' visible_hide_opt identifier_or_type_name enumerator_value_opt
 		{ $$ = $1->set_last( DeclarationNode::newEnumValueGeneric( $4, $5 ) ); }
