The code for dealing with multiple notifications doesn't make sense.  clearNotificationQueue especially: it destroys one notification, but erases the array, so any other notifications remain displayed, but are forgotten.  Or something.  
This file needs to be re-thought.