Improve documentation and unit tests for notifications