Added comments
Check that network is available
Detect network connection #3