Small refactoring, notification enhancements.