Mess of internet connection checks