NotificationHandler added and some logic for notifications.