Clean up deprecation warnings