Add an timeout function to the notifications

Also coding style, space after comma.