Refactoring to DependencyResolver