Update dependencies and remove unused imports and variables