Merged Replica Failure detection code and miscellaneous small changes