p2p: add Swarm and Peer objects