Unified notifications
Merge pull request #34 from Sebbe/master

Optimized the notifications code