Renamed core functionality to avoid conflicts with Drupal hooks, removed redundant session variable setting.