Refactored dependency mapping to resolve issue #3