Implemented ElectGateway, Candidate, DiscoverGateway