Update dependencies and remove unused dependencies.