minor improvements

Updated scripts to be more dynamic when getting IP addresses from devices.