Fix some deprecation warnings
Update for Cargo