Implemented Election protocol and Timeouts