Refactor getDependency to return *all* necessary dependencies