Updated to support multiple levels of consensus threshold.