Implement MasterElection

yeah, dinged.