Implement MasterElection

Done