Added comments and unit tests for peerlist.