Refactor to use single struct Dependency.