Extracting user-notification logic into its own file.