Use defaultdict in notification handlers