Add an timeout function to the notifications

Coding style: Space before opening curly brace. (Also below a few times)