Fixed a bunch of dependency problems.