Improved some manual wrangling of dependency handling.