Start of the notification code which will eventually turn into hooks.