Fix quorum calculation.
Merge branch `rewrite` into `master`.
TODO comments.
Merge branch `rewrite` into `master`.