Collapse networks that are not connected.
Merge pull request #9 from Zren/collapsedisconnected

Collapse networks that are not connected.