Fix a test error.
Fix contract syntax in unit signature.
Allow TR contracts to be turned on with an env variable.