Added better connection checking mechanism. Client now has a thread. Fixed T_Select bug.