Refactor with new "Client" class. Basic reconnect.