Added methods to notification manager and simplified some Drupal code