Upgrade dependencies, fix tests.