Implement MasterElection

I see what you mean here, but if you don't return, the next bit of code will come to the same conclusion, no? I feel it might be simpler to remove the branch of the ```return``` here, and just let it go on?