Finally got a working dependency resolution method.