bunch of cleanup to test harness