Moving notification code to its own file