Moves sendNotification code to a function in game. Peter Leondires