Index: src/InitTweak/FixInitNew.cpp
===================================================================
--- src/InitTweak/FixInitNew.cpp	(revision 3100754a66119592e773d53876efbcdb4e3e70f8)
+++ src/InitTweak/FixInitNew.cpp	(revision 36d0a80ea9bfed7c9ea162f1cec480a780fd3e9e)
@@ -67,14 +67,10 @@
 
 		struct StmtExprResult {
-			static void link( std::list<ast::ptr<ast::Decl> > & translationUnit );
-
 			const ast::StmtExpr * previsit( const ast::StmtExpr * stmtExpr );
 		};
 
+		/// wrap function application expressions as ImplicitCopyCtorExpr nodes so that it is easy to identify which
+		/// function calls need their parameters to be copy constructed
 		struct InsertImplicitCalls : public ast::WithConstTypeSubstitution, public ast::WithShortCircuiting {
-			/// wrap function application expressions as ImplicitCopyCtorExpr nodes so that it is easy to identify which
-			/// function calls need their parameters to be copy constructed
-			static void insert( std::list<ast::ptr<ast::Decl> > & translationUnit );
-
 			const ast::Expr * postvisit( const ast::ApplicationExpr * appExpr );
 
@@ -86,10 +82,8 @@
 		};
 
+		/// generate temporary ObjectDecls for each argument and return value of each ImplicitCopyCtorExpr,
+		/// generate/resolve copy construction expressions for each, and generate/resolve destructors for both
+		/// arguments and return value temporaries
 		struct ResolveCopyCtors final : public ast::WithGuards, public ast::WithStmtsToAdd<>, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithVisitorRef<ResolveCopyCtors> {
-			/// generate temporary ObjectDecls for each argument and return value of each ImplicitCopyCtorExpr,
-			/// generate/resolve copy construction expressions for each, and generate/resolve destructors for both
-			/// arguments and return value temporaries
-			static void resolveImplicitCalls( std::list<ast::ptr<ast::Decl> > & translationUnit );
-
 			const ast::Expr * postvisit( const ast::ImplicitCopyCtorExpr * impCpCtorExpr );
 			const ast::StmtExpr * previsit( const ast::StmtExpr * stmtExpr );
@@ -161,9 +155,7 @@
 		};
 
+		/// insert destructor calls at the appropriate places.  must happen before CtorInit nodes are removed
+		/// (currently by FixInit)
 		struct InsertDtors final : public ObjDeclCollector, public ast::WithStmtsToAdd<> {
-			/// insert destructor calls at the appropriate places.  must happen before CtorInit nodes are removed
-			/// (currently by FixInit)
-			static void insert( std::list< ast::ptr<ast::Decl> > & translationUnit );
-
 			typedef std::list< ObjectDecl * > OrderedDecls;
 			typedef std::list< OrderedDecls > OrderedDeclsStack;
@@ -185,7 +177,6 @@
 		};
 
-		class FixInit : public ast::WithStmtsToAdd<> {
-		  public:
-			/// expand each object declaration to use its constructor after it is declared.
+		/// expand each object declaration to use its constructor after it is declared.
+		struct FixInit : public ast::WithStmtsToAdd<> {
 			static void fixInitializers( std::list< ast::ptr<ast::Decl> > &translationUnit );
 
@@ -195,10 +186,8 @@
 		};
 
+		/// generate default/copy ctor and dtor calls for user-defined struct ctor/dtors
+		/// for any member that is missing a corresponding ctor/dtor call.
+		/// error if a member is used before constructed
 		struct GenStructMemberCalls final : public ast::WithGuards, public ast::WithShortCircuiting, public ast::WithSymbolTable, public ast::WithVisitorRef<GenStructMemberCalls> {
-			/// generate default/copy ctor and dtor calls for user-defined struct ctor/dtors
-			/// for any member that is missing a corresponding ctor/dtor call.
-			/// error if a member is used before constructed
-			static void generate( std::list< ast::ptr<ast::Decl> > & translationUnit );
-
 			void previsit( const ast::FunctionDecl * funcDecl );
 			const ast::DeclWithType * postvisit( const ast::FunctionDecl * funcDecl );
@@ -224,15 +213,11 @@
 		};
 
+		/// expands ConstructorExpr nodes into comma expressions, using a temporary for the first argument
 		struct FixCtorExprs final : public ast::WithDeclsToAdd<>, public ast::WithSymbolTable, public ast::WithShortCircuiting {
-			/// expands ConstructorExpr nodes into comma expressions, using a temporary for the first argument
-			static void fix( std::list< ast::ptr<ast::Decl> > & translationUnit );
-
 			const ast::Expr * postvisit( const ast::ConstructorExpr * ctorExpr );
 		};
 
+		/// add CompoundStmts around top-level expressions so that temporaries are destroyed in the correct places.
 		struct SplitExpressions : public ast::WithShortCircuiting {
-			/// add CompoundStmts around top-level expressions so that temporaries are destroyed in the correct places.
-			static void split( std::list<ast::ptr<ast::Decl> > & translationUnit );
-
 			ast::Stmt * postvisit( const ast::ExprStmt * stmt );
 			void previsit( const ast::TupleAssignExpr * expr );
@@ -241,9 +226,8 @@
 
 	void fix( std::list< ast::ptr<ast::Decl> > & translationUnit, bool inLibrary ) {
-		ast::Pass<SelfAssignChecker> checker;
-		accept_all( translationUnit, checker );
+		ast::Pass<SelfAssignChecker>::run( translationUnit );
 
 		// fixes StmtExpr to properly link to their resulting expression
-		StmtExprResult::link( translationUnit );
+		ast::Pass<StmtExprResult>::run( translationUnit );
 
 		// fixes ConstructorInit for global variables. should happen before fixInitializers.
@@ -251,19 +235,22 @@
 
 		// must happen before ResolveCopyCtors because temporaries have to be inserted into the correct scope
-		SplitExpressions::split( translationUnit );
-
-		InsertImplicitCalls::insert( translationUnit );
+		ast::Pass<SplitExpressions>::run( translationUnit );
+
+		ast::Pass<InsertImplicitCalls>::run( translationUnit );
 
 		// Needs to happen before ResolveCopyCtors, because argument/return temporaries should not be considered in
 		// error checking branch statements
-		InsertDtors::insert( translationUnit );
-
-		ResolveCopyCtors::resolveImplicitCalls( translationUnit );
+		{
+			ast::Pass<LabelFinder> finder;
+			ast::Pass<InsertDtors>::run( translationUnit, finder );
+		}
+
+		ast::Pass<ResolveCopyCtors>::run( translationUnit );
 		FixInit::fixInitializers( translationUnit );
-		GenStructMemberCalls::generate( translationUnit );
+		ast::Pass<GenStructMemberCalls>::run( translationUnit );
 
 		// Needs to happen after GenStructMemberCalls, since otherwise member constructors exprs
 		// don't have the correct form, and a member can be constructed more than once.
-		FixCtorExprs::fix( translationUnit );
+		ast::Pass<FixCtorExprs>::run( translationUnit );
 	}
 
@@ -319,24 +306,4 @@
 
 			return dtorFunc;
-		}
-
-		void StmtExprResult::link( std::list<ast::ptr<ast::Decl> > & translationUnit ) {
-			ast::Pass<StmtExprResult> linker;
-			accept_all( translationUnit, linker );
-		}
-
-		void SplitExpressions::split( std::list<ast::ptr<ast::Decl> > & translationUnit ) {
-			ast::Pass<SplitExpressions> splitter;
-			accept_all( translationUnit, splitter );
-		}
-
-		void InsertImplicitCalls::insert( std::list<ast::ptr<ast::Decl> > & translationUnit ) {
-			ast::Pass<InsertImplicitCalls> inserter;
-			accept_all( translationUnit, inserter );
-		}
-
-		void ResolveCopyCtors::resolveImplicitCalls( std::list< ast::ptr<ast::Decl> > & translationUnit ) {
-			ast::Pass<ResolveCopyCtors> resolver;
-			accept_all( translationUnit, resolver );
 		}
 
@@ -359,20 +326,4 @@
 				throw errors;
 			} // if
-		}
-
-		void InsertDtors::insert( std::list< ast::ptr<ast::Decl> > & translationUnit ) {
-			ast::Pass<LabelFinder> finder;
-			ast::Pass<InsertDtors> inserter( finder );
-			accept_all( translationUnit, inserter );
-		}
-
-		void GenStructMemberCalls::generate( std::list< ast::ptr<ast::Decl> > & translationUnit ) {
-			ast::Pass<GenStructMemberCalls> warner;
-			accept_all( translationUnit, warner );
-		}
-
-		void FixCtorExprs::fix( std::list< ast::ptr<ast::Decl> > & translationUnit ) {
-			ast::Pass<FixCtorExprs> fixer;
-			accept_all( translationUnit, fixer );
 		}
 
