Moved most of the functionality from 'ClientMain' into 'Client'. Small
changes to ClientListenerThread as well.