CloseNotifier support and associated tests and discovered bugs & fixes