Dependency resolving logic for modules + tests