- fix remote notification detection
- detect bad notifications
- code cleanup