Use PeerFactory instead of creating LegacyPeer directly