Merge branch `rewrite` into `master`.
Leader is identified as [address, port].
Test leader selection.
Fix callbacks and ports.