Added an IsConnected() function and used this in some member functions