Bug fix for theory strings related to old cycle detection code (was leading to bogus model).  Minor cleanup of QCF.