Cleaned up deprecation warnings