Fixed critical bug through which sometimes the program is crashes while generating WMN

Separated WMN generation and drawing.
Fixed checking network connectivity.