added logging classes
only print out once the first peer
fixed comments
polished testcase
add checkstyle exception
fixes for the indirect replication