p2p-xfer updated for domain name as well as ip address, and minor source refactoring