Updated for Drupal Core changes