Replace huge chunk of notifications with function