Added NetTools for detecting internet state and implemented it in relevant classes