Provide default header dicts.
Make it possible to do BYE processing when closed
Handle unexpected closure better.