Fix broken tests, deprecation errors.