Added use of scope.lookupvar, allow configuration of threads and option to choose between hostname and fqdn