Added Leader Election and spanning tree generation