Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/CodeGen/CodeGenerator.cc	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -262,8 +262,5 @@
 			} // if
 		} else {
-			output << typeDecl->genTypeString() << " " << typeDecl->get_name();
-			if ( typeDecl->get_kind() != TypeDecl::Any && typeDecl->get_sized() ) {
-				output << " | sized(" << typeDecl->get_name() << ")";
-			}
+			output << typeDecl->typeString() << " " << typeDecl->get_name();
 			if ( ! typeDecl->get_assertions().empty() ) {
 				output << " | { ";
@@ -772,9 +769,6 @@
 	void CodeGenerator::visit( ExprStmt * exprStmt ) {
 		assert( exprStmt );
-		Expression * expr = exprStmt->get_expr();
-		if ( genC ) {
-			// cast the top-level expression to void to reduce gcc warnings.
-			expr = new CastExpr( expr );
-		}
+		// cast the top-level expression to void to reduce gcc warnings.
+		Expression * expr = new CastExpr( exprStmt->get_expr() );
 		expr->accept( *this );
 		output << ";";
Index: src/CodeGen/Generate.cc
===================================================================
--- src/CodeGen/Generate.cc	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/CodeGen/Generate.cc	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -22,9 +22,5 @@
 #include "SynTree/Declaration.h"
 #include "CodeGenerator.h"
-#include "GenType.h"
-#include "SynTree/SynTree.h"
-#include "SynTree/Type.h"
-#include "SynTree/BaseSyntaxNode.h"
-// #include "Tuples/Tuples.h"
+#include "Tuples/Tuples.h"
 
 using namespace std;
@@ -43,14 +39,4 @@
 		} // for
 	}
-
-	void generate( BaseSyntaxNode * node, std::ostream & os ) {
-		if ( Type * type = dynamic_cast< Type * >( node ) ) {
-			os << CodeGen::genPrettyType( type, "" );
-		} else {
-			CodeGen::CodeGenerator cgv( os, true, false );
-			node->accept( cgv );
-		}
-		os << std::endl;
-	}
 } // namespace CodeGen
 
Index: src/CodeGen/Generate.h
===================================================================
--- src/CodeGen/Generate.h	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/CodeGen/Generate.h	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -25,7 +25,4 @@
 	/// Generates code. doIntrinsics determines if intrinsic functions are printed, pretty formats output nicely (e.g., uses unmangled names, etc.), generateC is true when the output must consist only of C code (allows some assertions, etc.)
 	void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics, bool pretty, bool generateC = false );
-
-	/// Generate code for a single node -- helpful for debugging in gdb
-	void generate( BaseSyntaxNode * node, std::ostream & os );
 } // namespace CodeGen
 
Index: src/GenPoly/PolyMutator.cc
===================================================================
--- src/GenPoly/PolyMutator.cc	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/GenPoly/PolyMutator.cc	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -50,11 +50,4 @@
 
 	Statement * PolyMutator::mutateStatement( Statement *stmt ) {
-		// don't want statements from outer CompoundStmts to be added to this CompoundStmt
-		ValueGuard< std::list< Statement* > > oldStmtsToAdd( stmtsToAdd );
-		ValueGuard< std::list< Statement* > > oldStmtsToAddAfter( stmtsToAddAfter );
-		ValueGuard< TypeSubstitution * > oldEnv( env );
-		stmtsToAdd.clear();
-		stmtsToAddAfter.clear();
-
 		Statement *newStmt = maybeMutate( stmt, *this );
 		if ( ! stmtsToAdd.empty() || ! stmtsToAddAfter.empty() ) {
@@ -90,33 +83,33 @@
 
 	Statement * PolyMutator::mutate(IfStmt *ifStmt) {
-		ifStmt->set_condition(  mutateExpression( ifStmt->get_condition() ) );
 		ifStmt->set_thenPart(  mutateStatement( ifStmt->get_thenPart() ) );
 		ifStmt->set_elsePart(  mutateStatement( ifStmt->get_elsePart() ) );
+		ifStmt->set_condition(  mutateExpression( ifStmt->get_condition() ) );
 		return ifStmt;
 	}
 
 	Statement * PolyMutator::mutate(WhileStmt *whileStmt) {
+		whileStmt->set_body(  mutateStatement( whileStmt->get_body() ) );
 		whileStmt->set_condition(  mutateExpression( whileStmt->get_condition() ) );
-		whileStmt->set_body(  mutateStatement( whileStmt->get_body() ) );
 		return whileStmt;
 	}
 
 	Statement * PolyMutator::mutate(ForStmt *forStmt) {
+		forStmt->set_body(  mutateStatement( forStmt->get_body() ) );
 		mutateAll( forStmt->get_initialization(), *this );
 		forStmt->set_condition(  mutateExpression( forStmt->get_condition() ) );
 		forStmt->set_increment(  mutateExpression( forStmt->get_increment() ) );
-		forStmt->set_body(  mutateStatement( forStmt->get_body() ) );
 		return forStmt;
 	}
 
 	Statement * PolyMutator::mutate(SwitchStmt *switchStmt) {
+		mutateStatementList( switchStmt->get_statements() );
 		switchStmt->set_condition( mutateExpression( switchStmt->get_condition() ) );
-		mutateStatementList( switchStmt->get_statements() );
 		return switchStmt;
 	}
 
 	Statement * PolyMutator::mutate(CaseStmt *caseStmt) {
+		mutateStatementList( caseStmt->get_statements() );
 		caseStmt->set_condition(  mutateExpression( caseStmt->get_condition() ) );
-		mutateStatementList( caseStmt->get_statements() );
 		return caseStmt;
 	}
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -766,4 +766,8 @@
 			} // if
 		} // for
+		// function may return struct or union value, in which case we need to add alternatives for implicit conversions to each of the anonymous members
+		for ( const Alternative & alt : alternatives ) {
+			addAnonConversions( alt );
+		}
 
 		candidates.clear();
@@ -771,11 +775,4 @@
 
 		findMinCost( candidates.begin(), candidates.end(), std::back_inserter( alternatives ) );
-
-		// function may return struct or union value, in which case we need to add alternatives for implicit
-		// conversions to each of the anonymous members, must happen after findMinCost since anon conversions
-		// are never the cheapest expression
-		for ( const Alternative & alt : alternatives ) {
-			addAnonConversions( alt );
-		}
 
 		if ( alternatives.empty() && targetType && ! targetType->isVoid() ) {
Index: src/SynTree/BaseSyntaxNode.h
===================================================================
--- src/SynTree/BaseSyntaxNode.h	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/SynTree/BaseSyntaxNode.h	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -18,11 +18,8 @@
 
 #include "Common/utility.h"
-#include "Visitor.h"
 
 class BaseSyntaxNode {
   public:
 	CodeLocation location;
-
-	virtual void accept( Visitor & v ) = 0; // temporary -- needs to be here so that BaseSyntaxNode is polymorphic and can be dynamic_cast
 };
 
Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/SynTree/Declaration.h	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -204,5 +204,4 @@
 
 	virtual std::string typeString() const;
-	virtual std::string genTypeString() const;
 
 	virtual TypeDecl *clone() const { return new TypeDecl( *this ); }
Index: src/SynTree/SynTree.h
===================================================================
--- src/SynTree/SynTree.h	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/SynTree/SynTree.h	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -21,6 +21,4 @@
 #include <map>
 #include <iostream>
-
-class BaseSyntaxNode;
 
 class Declaration;
Index: src/SynTree/TypeDecl.cc
===================================================================
--- src/SynTree/TypeDecl.cc	(revision 4f9636f7e4799b02b05a1d87290145d4349d1bb7)
+++ src/SynTree/TypeDecl.cc	(revision bd951f7a08aaeaa715017f38d25b15e941c3bb12)
@@ -29,9 +29,4 @@
 }
 
-std::string TypeDecl::genTypeString() const {
-	static const std::string kindNames[] = { "otype", "dtype", "ftype", "ttype" };
-	return kindNames[ kind ];
-}
-
 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ) {
   return os << data.kind << ", " << data.isComplete;
