Cleanup some deprecation warnings.
Fix test failures