Replace deprecated get_copy() for Rust problems.
Remove unused imports.