Add toAddress(network) functionality to scripts

Updated, and I also took the liberty of fixing most of this file's jsdocs