Make dependency detection internal