Add toAddress(network) functionality to scripts

Updated to address comment