Refactored dependency management