Clean up dependencies

Some of them were plain wrong, and some others are not needed (indirect dependencies).

We should propagate these changes to master branch.