Better handling of being disconnected
Minor cosmetics