Implement MasterElection

I have exactly no idea why I did that, dinged accordingly.