Handling disconnects. A few other things.