Remove 0.7 deprecation warnings.
Refactor out registry functions from Environment.