Refactor peer.