Removed a bunch of deprecation warnings.