Simpler copy of the original nodefinder source.