Refactored getPeers formatting.