Cleaning up some deprecation warnings.