Simplified conversions & made more robust by switching to returning CIString
optimize isReferenced to stop at first found reference
fix SimpleTestIntegration