Refactoring of the notification manager.