Refactored dependency management.
Updated to handle modified dependency management code.