Index: src/AST/Expr.cpp
===================================================================
--- src/AST/Expr.cpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/AST/Expr.cpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -22,4 +22,5 @@
 #include "Copy.hpp"                // for shallowCopy
 #include "GenericSubstitution.hpp"
+#include "Inspect.hpp"
 #include "LinkageSpec.hpp"
 #include "Stmt.hpp"
@@ -29,5 +30,4 @@
 #include "Common/SemanticError.h"
 #include "GenPoly/Lvalue.h"        // for referencesPermissable
-#include "InitTweak/InitTweak.h"   // for getFunction, getPointerBase
 #include "ResolvExpr/typeops.h"    // for extractResultType
 #include "Tuples/Tuples.h"         // for makeTupleType
@@ -58,5 +58,5 @@
 
 bool ApplicationExpr::get_lvalue() const {
-	if ( const DeclWithType * func = InitTweak::getFunction( this ) ) {
+	if ( const DeclWithType * func = getFunction( this ) ) {
 		return func->linkage == Linkage::Intrinsic && lvalueFunctionNames.count( func->name );
 	}
@@ -67,5 +67,5 @@
 
 bool UntypedExpr::get_lvalue() const {
-	std::string fname = InitTweak::getFunctionName( this );
+	std::string fname = getFunctionName( this );
 	return lvalueFunctionNames.count( fname );
 }
@@ -76,5 +76,5 @@
 	UntypedExpr * ret = createCall( loc, "*?", { arg } );
 	if ( const Type * ty = arg->result ) {
-		const Type * base = InitTweak::getPointerBase( ty );
+		const Type * base = getPointerBase( ty );
 		assertf( base, "expected pointer type in dereference (type was %s)", toString( ty ).c_str() );
 
@@ -335,5 +335,5 @@
 	// first argument
 	assert( callExpr );
-	const Expr * arg = InitTweak::getCallArg( callExpr, 0 );
+	const Expr * arg = getCallArg( callExpr, 0 );
 	assert( arg );
 	result = arg->result;
Index: src/AST/Inspect.cpp
===================================================================
--- src/AST/Inspect.cpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/AST/Inspect.cpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -10,15 +10,142 @@
 // Created On       : Fri Jun 24 13:16:31 2022
 // Last Modified By : Andrew Beach
-// Last Modified On : Mon Jun 27 15:35:00 2022
-// Update Count     : 1
+// Last Modified On : Wed Sep 22 13:50:00 2022
+// Update Count     : 2
 //
 
-#include "AST/Decl.hpp"
-#include "AST/Type.hpp"
+#include "Inspect.hpp"
 
 #include <iostream>
-#include <AST/Print.hpp>
+
+#include "AST/Decl.hpp"
+#include "AST/Expr.hpp"
+#include "AST/Print.hpp"
+#include "AST/Stmt.hpp"
+#include "AST/Type.hpp"
+#include "CodeGen/OperatorTable.h"
 
 namespace ast {
+
+const Type * getPointerBase( const Type * t ) {
+	if ( const auto * p = dynamic_cast< const PointerType * >( t ) ) {
+		return p->base;
+	} else if ( const auto * a = dynamic_cast< const ArrayType * >( t ) ) {
+		return a->base;
+	} else if ( const auto * r = dynamic_cast< const ReferenceType * >( t ) ) {
+		return r->base;
+	} else {
+		return nullptr;
+	}
+}
+
+template<typename CallExpr>
+static const Expr * callArg( const CallExpr * call, unsigned int pos ) {
+	assertf( pos < call->args.size(),
+		"getCallArg for argument that doesn't exist: (%u); %s.",
+		pos, toString( call ).c_str() );
+	for ( const Expr * arg : call->args ) {
+		if ( 0 == pos ) return arg;
+		--pos;
+	}
+	assert( false );
+}
+
+template<typename CallExpr, typename Ret>
+static Ret throughDeref( const CallExpr * expr, Ret(*func)( const Expr * ) ) {
+	// In `(*f)(x)` the function we want is `f`.
+	std::string name = getFunctionName( expr );
+	assertf( name == "*?", "Unexpected untyped expression: %s", name.c_str() );
+	assertf( !expr->args.empty(), "Cannot get function name from dereference with no arguments" );
+	return func( expr->args.front() );
+}
+
+static const DeclWithType * getCalledFunction( const Expr * expr ) {
+	assert( expr );
+	if ( const ast::VariableExpr * varExpr = dynamic_cast< const ast::VariableExpr * >( expr ) ) {
+		return varExpr->var;
+	} else if ( const ast::MemberExpr * memberExpr = dynamic_cast< const ast::MemberExpr * >( expr ) ) {
+		return memberExpr->member;
+	} else if ( const ast::CastExpr * castExpr = dynamic_cast< const ast::CastExpr * >( expr ) ) {
+		return getCalledFunction( castExpr->arg );
+	} else if ( const ast::UntypedExpr * untypedExpr = dynamic_cast< const ast::UntypedExpr * >( expr ) ) {
+		return throughDeref( untypedExpr, getCalledFunction );
+	} else if ( const ast::ApplicationExpr * appExpr = dynamic_cast< const ast::ApplicationExpr * > ( expr ) ) {
+		return throughDeref( appExpr, getCalledFunction );
+	} else if ( const ast::AddressExpr * addrExpr = dynamic_cast< const ast::AddressExpr * >( expr ) ) {
+		return getCalledFunction( addrExpr->arg );
+	} else if ( const ast::CommaExpr * commaExpr = dynamic_cast< const ast::CommaExpr * >( expr ) ) {
+		return getCalledFunction( commaExpr->arg2 );
+	}
+	return nullptr;
+}
+
+const DeclWithType * getFunction( const Expr * expr ) {
+	if ( auto app = dynamic_cast< const ApplicationExpr * >( expr ) ) {
+		return getCalledFunction( app->func );
+	} else if ( auto untyped = dynamic_cast< const UntypedExpr * >( expr ) ) {
+		return getCalledFunction( untyped->func );
+	}
+	assertf( false, "getFunction received unknown expression: %s", toString( expr ).c_str() );
+}
+
+// There is a lot of overlap with getCalledFunction. Ideally it would use
+// it as a helper function and return the name of the DeclWithType. But the
+// NameExpr and UntypedMemberExpr only work on this version.
+static std::string funcName( const Expr * func ) {
+	assert( func );
+	if ( const ast::NameExpr * nameExpr = dynamic_cast< const ast::NameExpr * >( func ) ) {
+		return nameExpr->name;
+	} else if ( const ast::VariableExpr * varExpr = dynamic_cast< const ast::VariableExpr * >( func ) ) {
+		return varExpr->var->name;
+	} else if ( const ast::CastExpr * castExpr = dynamic_cast< const ast::CastExpr * >( func ) ) {
+		return funcName( castExpr->arg );
+	} else if ( const ast::MemberExpr * memberExpr = dynamic_cast< const ast::MemberExpr * >( func ) ) {
+		return memberExpr->member->name;
+	} else if ( const ast::UntypedMemberExpr * memberExpr = dynamic_cast< const ast::UntypedMemberExpr * > ( func ) ) {
+		return funcName( memberExpr->member );
+	} else if ( const ast::UntypedExpr * untypedExpr = dynamic_cast< const ast::UntypedExpr * >( func ) ) {
+		return throughDeref( untypedExpr, funcName );
+	} else if ( const ast::ApplicationExpr * appExpr = dynamic_cast< const ast::ApplicationExpr * >( func ) ) {
+		return throughDeref( appExpr, funcName );
+	} else if ( const ast::ConstructorExpr * ctorExpr = dynamic_cast< const ast::ConstructorExpr * >( func ) ) {
+		return funcName( getCallArg( ctorExpr->callExpr, 0 ) );
+	} else {
+		assertf( false, "Unexpected expression type being called as a function in call expression: %s", toString( func ).c_str() );
+	}
+}
+
+std::string getFunctionName( const Expr * expr ) {
+	// There's some unforunate overlap here with getCalledFunction. Ideally
+	// this would be able to use getCalledFunction and return the name of the
+	// DeclWithType, but this needs to work for NameExpr and UntypedMemberExpr,
+	// where getCalledFunction can't possibly do anything reasonable.
+	if ( auto app = dynamic_cast< const ApplicationExpr * >( expr ) ) {
+		return funcName( app->func );
+	} else if ( auto untyped = dynamic_cast< const UntypedExpr * >( expr ) ) {
+		return funcName( untyped->func );
+	} else {
+		assertf( false, "Unexpected expression type passed to getFunctionName: %s", toString( expr ).c_str() );
+	}
+}
+
+const Expr * getCallArg( const Expr * call, unsigned int pos ) {
+	if ( auto app = dynamic_cast< const ApplicationExpr * >( call ) ) {
+		return callArg( app, pos );
+	} else if ( auto untyped = dynamic_cast< const UntypedExpr * >( call ) ) {
+		return callArg( untyped, pos );
+	} else if ( auto tupleAssn = dynamic_cast< const TupleAssignExpr * >( call ) ) {
+		const std::list<ptr<Stmt>>& stmts = tupleAssn->stmtExpr->stmts->kids;
+		assertf( !stmts.empty(), "TupleAssignExpr missing statements." );
+		auto stmt  = strict_dynamic_cast< const ExprStmt * >( stmts.back().get() );
+		auto tuple = strict_dynamic_cast< const TupleExpr * >( stmt->expr.get() );
+		assertf( !tuple->exprs.empty(), "TupleAssignExpr has empty tuple expr." );
+		return getCallArg( tuple->exprs.front(), pos );
+	} else if ( auto ctor = dynamic_cast< const ImplicitCopyCtorExpr * >( call ) ) {
+		return getCallArg( ctor->callExpr, pos );
+	} else {
+		assertf( false, "Unexpected expression type passed to getCallArg: %s",
+			toString( call ).c_str() );
+	}
+}
 
 bool structHasFlexibleArray( const ast::StructDecl * decl ) {
@@ -33,3 +160,14 @@
 }
 
+const ApplicationExpr * isIntrinsicCallExpr( const Expr * expr ) {
+	auto appExpr = dynamic_cast< const ApplicationExpr * >( expr );
+	if ( !appExpr ) return nullptr;
+
+	const DeclWithType * func = getCalledFunction( appExpr->func );
+	assertf( func,
+		"getCalledFunction returned nullptr: %s", toString( appExpr->func ).c_str() );
+
+	return func->linkage == ast::Linkage::Intrinsic ? appExpr : nullptr;
+}
+
 } // namespace ast
Index: src/AST/Inspect.hpp
===================================================================
--- src/AST/Inspect.hpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/AST/Inspect.hpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -10,6 +10,6 @@
 // Created On       : Fri Jun 24 13:16:31 2022
 // Last Modified By : Andrew Beach
-// Last Modified On : Mon Jun 27 15:35:00 2022
-// Update Count     : 1
+// Last Modified On : Thr Sep 22 13:44:00 2022
+// Update Count     : 2
 //
 
@@ -18,6 +18,23 @@
 namespace ast {
 
-// Does the structure end in a flexable array declaration?
-bool structHasFlexibleArray( const ast::StructDecl * );
+/// Returns the base type of an pointer/array/reference type,
+/// if the argument is not one of those types, return null.
+const Type * getPointerBase( const Type * );
+
+/// Get the declaration of the function called (ApplicationExpr or UntypedExpr).
+const DeclWithType * getFunction( const Expr * expr );
+
+/// Get the name of the function being called.
+std::string getFunctionName( const Expr * expr );
+
+/// Returns the argument to a call expression in position N, indexed from 0.
+const Expr * getCallArg( const Expr * call, unsigned pos );
+
+/// Does the structure end in a flexable array declaration?
+bool structHasFlexibleArray( const StructDecl * );
+
+/// If the expression is an application whose target function is an
+/// intrinsic, then returns a pointer to that application.
+const ApplicationExpr * isIntrinsicCallExpr( const Expr * expr );
 
 }
Index: src/AST/SymbolTable.cpp
===================================================================
--- src/AST/SymbolTable.cpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/AST/SymbolTable.cpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -20,4 +20,5 @@
 #include "Decl.hpp"
 #include "Expr.hpp"
+#include "Inspect.hpp"
 #include "Type.hpp"
 #include "CodeGen/OperatorTable.h"  // for isCtorDtorAssign
@@ -466,5 +467,5 @@
 		assert( ! params.empty() );
 		// use base type of pointer, so that qualifiers on the pointer type aren't considered.
-		const Type * base = InitTweak::getPointerBase( params.front() );
+		const Type * base = ast::getPointerBase( params.front() );
 		assert( base );
 		if (stripParams) {
Index: src/AST/Type.cpp
===================================================================
--- src/AST/Type.cpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/AST/Type.cpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -22,6 +22,6 @@
 #include "Decl.hpp"
 #include "Init.hpp"
+#include "Inspect.hpp"
 #include "Common/utility.h"      // for copy, move
-#include "InitTweak/InitTweak.h" // for getPointerBase
 #include "Tuples/Tuples.h"       // for isTtype
 
@@ -36,5 +36,5 @@
 	const Type * t;
 	const Type * a;
-	for ( t = this; (a = InitTweak::getPointerBase( t )); t = a );
+	for ( t = this; (a = ast::getPointerBase( t )); t = a );
 	return t;
 }
Index: src/Common/Eval.cc
===================================================================
--- src/Common/Eval.cc	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/Common/Eval.cc	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -16,4 +16,5 @@
 #include <utility> // for pair
 
+#include "AST/Inspect.hpp"
 #include "Common/PassVisitor.h"
 #include "CodeGen/OperatorTable.h"						// access: OperatorInfo
@@ -177,5 +178,5 @@
 
 	void postvisit( const ast::ApplicationExpr * expr ) {
-		const ast::DeclWithType * function = InitTweak::getFunction(expr);
+		const ast::DeclWithType * function = ast::getFunction(expr);
 		if ( ! function || function->linkage != ast::Linkage::Intrinsic ) { valid = false; return; }
 		const std::string & fname = function->name;
Index: src/Concurrency/KeywordsNew.cpp
===================================================================
--- src/Concurrency/KeywordsNew.cpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/Concurrency/KeywordsNew.cpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -21,4 +21,5 @@
 #include "AST/Decl.hpp"
 #include "AST/Expr.hpp"
+#include "AST/Inspect.hpp"
 #include "AST/Pass.hpp"
 #include "AST/Stmt.hpp"
@@ -1528,5 +1529,5 @@
 	const ast::ptr<ast::DeclWithType> & param = decl->params.front();
 	auto type = dynamic_cast<const ast::StructInstType *>(
-		InitTweak::getPointerBase( param->get_type() ) );
+		ast::getPointerBase( param->get_type() ) );
 	if ( nullptr == type ) return decl;
 	if ( !type->base->is_thread() ) return decl;
Index: src/GenPoly/InstantiateGenericNew.cpp
===================================================================
--- src/GenPoly/InstantiateGenericNew.cpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/GenPoly/InstantiateGenericNew.cpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -23,4 +23,5 @@
 #include "AST/Copy.hpp"                // for deepCopy
 #include "AST/Create.hpp"              // for asForward
+#include "AST/Inspect.hpp"             // for getFunction
 #include "AST/Pass.hpp"                // for Pass, WithGuard, WithShortCi...
 #include "AST/TranslationUnit.hpp"     // for TranslationUnit
@@ -30,5 +31,4 @@
 #include "GenPoly/GenPoly.h"           // for isPolyType, typesPolyCompatible
 #include "GenPoly/ScrubTyVars.h"       // for scrubAll
-#include "InitTweak/InitTweak.h"       // for getFunction
 #include "ResolvExpr/typeops.h"        // for typesCompatible
 
@@ -294,5 +294,5 @@
 		ast::ApplicationExpr const * expr ) {
 	GuardValue( isLValueArg ) = false;
-	ast::Decl const * function = InitTweak::getFunction( expr );
+	ast::Decl const * function = ast::getFunction( expr );
 	if ( ast::Linkage::Intrinsic != function->linkage
 			|| !CodeGen::isAssignment( function->name ) ) {
Index: src/GenPoly/SpecializeNew.cpp
===================================================================
--- src/GenPoly/SpecializeNew.cpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/GenPoly/SpecializeNew.cpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -16,13 +16,11 @@
 #include "Specialize.h"
 
-#include "AST/Pass.hpp"
+#include "AST/Inspect.hpp"               // for isIntrinsicCallExpr
+#include "AST/Pass.hpp"                  // for Pass
 #include "AST/TypeEnvironment.hpp"       // for OpenVarSet, AssertionSet
 #include "Common/UniqueName.h"           // for UniqueName
 #include "GenPoly/GenPoly.h"             // for getFunctionType
-#include "InitTweak/InitTweak.h"         // for isIntrinsicCallExpr
 #include "ResolvExpr/FindOpenVars.h"     // for findOpenVars
 #include "ResolvExpr/TypeEnvironment.h"  // for FirstOpen, FirstClosed
-
-#include "AST/Print.hpp"
 
 namespace GenPoly {
@@ -425,5 +423,5 @@
 const ast::Expr * SpecializeCore::postvisit(
 		const ast::ApplicationExpr * expr ) {
-	if ( InitTweak::isIntrinsicCallExpr( expr ) ) {
+	if ( ast::isIntrinsicCallExpr( expr ) ) {
 		return expr;
 	}
Index: src/InitTweak/FixInitNew.cpp
===================================================================
--- src/InitTweak/FixInitNew.cpp	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/InitTweak/FixInitNew.cpp	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -14,4 +14,5 @@
 #include <utility>                     // for pair
 
+#include "AST/Inspect.hpp"             // for getFunction, getPointerBase, g...
 #include "CodeGen/GenType.h"           // for genPrettyType
 #include "CodeGen/OperatorTable.h"
@@ -24,5 +25,4 @@
 #include "GenInit.h"                   // for genCtorDtor
 #include "GenPoly/GenPoly.h"           // for getFunctionType
-#include "InitTweak.h"                 // for getFunctionName, getCallArg
 #include "ResolvExpr/Resolver.h"       // for findVoidExpression
 #include "ResolvExpr/typeops.h"        // for typesCompatible
Index: src/InitTweak/InitTweak.cc
===================================================================
--- src/InitTweak/InitTweak.cc	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/InitTweak/InitTweak.cc	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -10,6 +10,6 @@
 // Created On       : Fri May 13 11:26:36 2016
 // Last Modified By : Andrew Beach
-// Last Modified On : Mon Dec  6 13:21:00 2021
-// Update Count     : 20
+// Last Modified On : Wed Sep 22  9:50:00 2022
+// Update Count     : 21
 //
 
@@ -23,4 +23,5 @@
 #include "AST/Expr.hpp"
 #include "AST/Init.hpp"
+#include "AST/Inspect.hpp"
 #include "AST/Node.hpp"
 #include "AST/Pass.hpp"
@@ -654,5 +655,4 @@
 	namespace {
 		DeclarationWithType * getCalledFunction( Expression * expr );
-		const ast::DeclWithType * getCalledFunction( const ast::Expr * expr );
 
 		template<typename CallExpr>
@@ -664,14 +664,4 @@
 			return getCalledFunction( expr->get_args().front() );
 		}
-
-		template<typename CallExpr>
-		const ast::DeclWithType * handleDerefCalledFunction( const CallExpr * expr ) {
-			// (*f)(x) => should get "f"
-			std::string name = getFunctionName( expr );
-			assertf( name == "*?", "Unexpected untyped expression: %s", name.c_str() );
-			assertf( ! expr->args.empty(), "Cannot get called function from dereference with no arguments" );
-			return getCalledFunction( expr->args.front() );
-		}
-
 
 		DeclarationWithType * getCalledFunction( Expression * expr ) {
@@ -695,24 +685,4 @@
 		}
 
-		const ast::DeclWithType * getCalledFunction( const ast::Expr * expr ) {
-			assert( expr );
-			if ( const ast::VariableExpr * varExpr = dynamic_cast< const ast::VariableExpr * >( expr ) ) {
-				return varExpr->var;
-			} else if ( const ast::MemberExpr * memberExpr = dynamic_cast< const ast::MemberExpr * >( expr ) ) {
-				return memberExpr->member;
-			} else if ( const ast::CastExpr * castExpr = dynamic_cast< const ast::CastExpr * >( expr ) ) {
-				return getCalledFunction( castExpr->arg );
-			} else if ( const ast::UntypedExpr * untypedExpr = dynamic_cast< const ast::UntypedExpr * >( expr ) ) {
-				return handleDerefCalledFunction( untypedExpr );
-			} else if ( const ast::ApplicationExpr * appExpr = dynamic_cast< const ast::ApplicationExpr * > ( expr ) ) {
-				return handleDerefCalledFunction( appExpr );
-			} else if ( const ast::AddressExpr * addrExpr = dynamic_cast< const ast::AddressExpr * >( expr ) ) {
-				return getCalledFunction( addrExpr->arg );
-			} else if ( const ast::CommaExpr * commaExpr = dynamic_cast< const ast::CommaExpr * >( expr ) ) {
-				return getCalledFunction( commaExpr->arg2 );
-			}
-			return nullptr;
-		}
-
 		DeclarationWithType * getFunctionCore( const Expression * expr ) {
 			if ( const auto * appExpr = dynamic_cast< const ApplicationExpr * >( expr ) ) {
@@ -731,13 +701,4 @@
 	const DeclarationWithType * getFunction( const Expression * expr ) {
 		return getFunctionCore( expr );
-	}
-
-	const ast::DeclWithType * getFunction( const ast::Expr * expr ) {
-		if ( const ast::ApplicationExpr * appExpr = dynamic_cast< const ast::ApplicationExpr * >( expr ) ) {
-			return getCalledFunction( appExpr->func );
-		} else if ( const ast::UntypedExpr * untyped = dynamic_cast< const ast::UntypedExpr * > ( expr ) ) {
-			return getCalledFunction( untyped->func );
-		}
-		assertf( false, "getFunction received unknown expression: %s", toString( expr ).c_str() );
 	}
 
@@ -752,18 +713,4 @@
 	}
 
-	const ast::ApplicationExpr * isIntrinsicCallExpr( const ast::Expr * expr ) {
-		auto appExpr = dynamic_cast< const ast::ApplicationExpr * >( expr );
-		if ( ! appExpr ) return nullptr;
-
-		const ast::DeclWithType * func = getCalledFunction( appExpr->func );
-		assertf( func,
-			"getCalledFunction returned nullptr: %s", toString( appExpr->func ).c_str() );
-
-		// check for Intrinsic only -- don't want to remove all overridable ctor/dtor because
-		// autogenerated ctor/dtor will call all member dtors, and some members may have a
-		// user-defined dtor
-		return func->linkage == ast::Linkage::Intrinsic ? appExpr : nullptr;
-	}
-
 	namespace {
 		template <typename Predicate>
@@ -817,17 +764,4 @@
 				if ( pos == 0 ) return arg;
 				pos--;
-			}
-			assert( false );
-		}
-
-		template<typename CallExpr>
-		const ast::Expr * callArg( const CallExpr * call, unsigned int pos ) {
-			if( pos >= call->args.size() ) {
-				assertf( false, "getCallArg for argument that doesn't exist: (%u); %s.",
-					pos, toString( call ).c_str() );
-			}
-			for ( const ast::Expr * arg : call->args ) {
-				if ( pos == 0 ) return arg;
-				--pos;
 			}
 			assert( false );
@@ -854,27 +788,6 @@
 	}
 
-	const ast::Expr * getCallArg( const ast::Expr * call, unsigned pos ) {
-		if ( auto app = dynamic_cast< const ast::ApplicationExpr * >( call ) ) {
-			return callArg( app, pos );
-		} else if ( auto untyped = dynamic_cast< const ast::UntypedExpr * >( call ) ) {
-			return callArg( untyped, pos );
-		} else if ( auto tupleAssn = dynamic_cast< const ast::TupleAssignExpr * >( call ) ) {
-			const std::list<ast::ptr<ast::Stmt>>& stmts = tupleAssn->stmtExpr->stmts->kids;
-			assertf( ! stmts.empty(), "TupleAssignExpr missing statements." );
-			auto stmt  = strict_dynamic_cast< const ast::ExprStmt * >( stmts.back().get() );
-			auto tuple = strict_dynamic_cast< const ast::TupleExpr * >( stmt->expr.get() );
-			assertf( ! tuple->exprs.empty(), "TupleAssignExpr has empty tuple expr.");
-			return getCallArg( tuple->exprs.front(), pos );
-		} else if ( auto ctor = dynamic_cast< const ast::ImplicitCopyCtorExpr * >( call ) ) {
-			return getCallArg( ctor->callExpr, pos );
-		} else {
-			assertf( false, "Unexpected expression type passed to getCallArg: %s",
-				toString( call ).c_str() );
-		}
-	}
-
 	namespace {
 		std::string funcName( Expression * func );
-		std::string funcName( const ast::Expr * func );
 
 		template<typename CallExpr>
@@ -885,13 +798,4 @@
 			assertf( ! expr->get_args().empty(), "Cannot get function name from dereference with no arguments" );
 			return funcName( expr->get_args().front() );
-		}
-
-		template<typename CallExpr>
-		std::string handleDerefName( const CallExpr * expr ) {
-			// (*f)(x) => should get name "f"
-			std::string name = getFunctionName( expr );
-			assertf( name == "*?", "Unexpected untyped expression: %s", name.c_str() );
-			assertf( ! expr->args.empty(), "Cannot get function name from dereference with no arguments" );
-			return funcName( expr->args.front() );
 		}
 
@@ -917,26 +821,4 @@
 			}
 		}
-
-		std::string funcName( const ast::Expr * func ) {
-			if ( const ast::NameExpr * nameExpr = dynamic_cast< const ast::NameExpr * >( func ) ) {
-				return nameExpr->name;
-			} else if ( const ast::VariableExpr * varExpr = dynamic_cast< const ast::VariableExpr * >( func ) ) {
-				return varExpr->var->name;
-			} else if ( const ast::CastExpr * castExpr = dynamic_cast< const ast::CastExpr * >( func ) ) {
-				return funcName( castExpr->arg );
-			} else if ( const ast::MemberExpr * memberExpr = dynamic_cast< const ast::MemberExpr * >( func ) ) {
-				return memberExpr->member->name;
-			} else if ( const ast::UntypedMemberExpr * memberExpr = dynamic_cast< const ast::UntypedMemberExpr * > ( func ) ) {
-				return funcName( memberExpr->member );
-			} else if ( const ast::UntypedExpr * untypedExpr = dynamic_cast< const ast::UntypedExpr * >( func ) ) {
-				return handleDerefName( untypedExpr );
-			} else if ( const ast::ApplicationExpr * appExpr = dynamic_cast< const ast::ApplicationExpr * >( func ) ) {
-				return handleDerefName( appExpr );
-			} else if ( const ast::ConstructorExpr * ctorExpr = dynamic_cast< const ast::ConstructorExpr * >( func ) ) {
-				return funcName( getCallArg( ctorExpr->callExpr, 0 ) );
-			} else {
-				assertf( false, "Unexpected expression type being called as a function in call expression: %s", toString( func ).c_str() );
-			}
-		}
 	}
 
@@ -955,18 +837,4 @@
 	}
 
-	std::string getFunctionName( const ast::Expr * expr ) {
-		// there's some unforunate overlap here with getCalledFunction. Ideally this would be able to use getCalledFunction and
-		// return the name of the DeclarationWithType, but this needs to work for NameExpr and UntypedMemberExpr, where getCalledFunction
-		// can't possibly do anything reasonable.
-		if ( const ast::ApplicationExpr * appExpr = dynamic_cast< const ast::ApplicationExpr * >( expr ) ) {
-			return funcName( appExpr->func );
-		} else if ( const ast::UntypedExpr * untypedExpr = dynamic_cast< const ast::UntypedExpr * > ( expr ) ) {
-			return funcName( untypedExpr->func );
-		} else {
-			std::cerr << expr << std::endl;
-			assertf( false, "Unexpected expression type passed to getFunctionName" );
-		}
-	}
-
 	Type * getPointerBase( Type * type ) {
 		if ( PointerType * ptrType = dynamic_cast< PointerType * >( type ) ) {
@@ -979,13 +847,4 @@
 			return nullptr;
 		}
-	}
-	const ast::Type* getPointerBase( const ast::Type* t ) {
-		if ( const auto * p = dynamic_cast< const ast::PointerType * >( t ) ) {
-			return p->base;
-		} else if ( const auto * a = dynamic_cast< const ast::ArrayType * >( t ) ) {
-			return a->base;
-		} else if ( const auto * r = dynamic_cast< const ast::ReferenceType * >( t ) ) {
-			return r->base;
-		} else return nullptr;
 	}
 
@@ -1203,10 +1062,11 @@
 	if ( ftype->params.size() != 2 ) return false;
 
-	const ast::Type * t1 = getPointerBase( ftype->params.front() );
+	const ast::Type * t1 = ast::getPointerBase( ftype->params.front() );
 	if ( ! t1 ) return false;
 	const ast::Type * t2 = ftype->params.back();
 
-	return ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, ast::SymbolTable{} );
+	return ResolvExpr::typesCompatibleIgnoreQualifiers( t1, t2, ast::SymbolTable() );
 }
+
 
 	const FunctionDecl * isAssignment( const Declaration * decl ) {
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/InitTweak/InitTweak.h	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -10,6 +10,6 @@
 // Created On       : Fri May 13 11:26:36 2016
 // Last Modified By : Andrew Beach
-// Last Modified On : Mon Dec  6 13:20:00 2021
-// Update Count     : 8
+// Last Modified On : Wed Sep 22  9:21:00 2022
+// Update Count     : 9
 //
 
@@ -74,9 +74,7 @@
 	DeclarationWithType * getFunction( Expression * expr );
 	const DeclarationWithType * getFunction( const Expression * expr );
-	const ast::DeclWithType * getFunction( const ast::Expr * expr );
 
 	/// Non-Null if expr is a call expression whose target function is intrinsic
 	ApplicationExpr * isIntrinsicCallExpr( Expression * expr );
-	const ast::ApplicationExpr * isIntrinsicCallExpr( const ast::Expr * expr);
 
 	/// True if stmt is a call statement where the function called is intrinsic and takes one parameter.
@@ -98,13 +96,10 @@
 	/// returns the name of the function being called
 	std::string getFunctionName( Expression * expr );
-	std::string getFunctionName( const ast::Expr * expr );
 
 	/// returns the argument to a call expression in position N indexed from 0
 	Expression *& getCallArg( Expression * callExpr, unsigned int pos );
-	const ast::Expr * getCallArg( const ast::Expr * call, unsigned pos );
 
 	/// returns the base type of a PointerType or ArrayType, else returns NULL
 	Type * getPointerBase( Type * );
-	const ast::Type* getPointerBase( const ast::Type* );
 
 	/// returns the argument if it is a PointerType or ArrayType, else returns NULL
Index: src/Tuples/Tuples.cc
===================================================================
--- src/Tuples/Tuples.cc	(revision 0bd46fdf0880513efbef382cb2e926954f5c6001)
+++ src/Tuples/Tuples.cc	(revision e01eb4aa19bfce233e01f84a77d45064842e6ebf)
@@ -17,4 +17,5 @@
 
 #include "AST/Pass.hpp"
+#include "AST/Inspect.hpp"
 #include "AST/LinkageSpec.hpp"
 #include "Common/PassVisitor.h"
@@ -80,5 +81,5 @@
 
 		void previsit( ast::ApplicationExpr const * appExpr ) {
-			if ( ast::DeclWithType const * function = InitTweak::getFunction( appExpr ) ) {
+			if ( ast::DeclWithType const * function = ast::getFunction( appExpr ) ) {
 				if ( function->linkage == ast::Linkage::Intrinsic
 						&& ( function->name == "*?" || function->name == "?[?]" ) ) {
