reorganizing, making fully standalone (not mixed w/ node-telehash code)