Moved stuff around to break a circular dependency for some of the test programs