Refactoring peertable to use InMemoryPeerRepository