Implement MasterElection

```CHECK_NOTNULL```