Changes in "nu()"

Move dependency resolution code in a new method "resolve()" and
replace the static variables by function arguments