Notifications code cleanup.