diff --git a/API.txt b/API.txt
deleted file mode 100644
index e585cd4..0000000
--- a/API.txt
+++ /dev/null
@@ -1,149 +0,0 @@
-This document explains how to provide "Pathauto integration" in a
-module. You need this if you would like to provide additional tokens
-or if your module has paths and you wish to have them automatically
-aliased.  The simplest integration is just to provide tokens so we
-cover that first.  More advanced integration requires an
-implementation of hook_pathauto to provide a settings form.
-
-It may be helpful to review some examples of integration from the
-pathauto_node.inc, pathauto_taxonomy.inc, and pathauto_user.inc files.
-
-
-==================
-1 - Providing additional tokens
-==================
-
-If all you want is to enable tokens for your module you will simply
-need to implement two functions:
-
-  hook_token_values
-  hook_token_list
-
-See the token.module and it's API.txt for more information about this
-process.
-
-If the token is intended to generate a path expected to contain slashes,
-the token name must end in 'path', 'path-raw' or 'alias'. This indicates to
-Pathauto that the slashes should not be removed from the replacement value.
-
-When an object is created (whether it is a node or a user or a
-taxonomy term) the data that Pathauto hands to the token_values in the
-$object is in a specific format. This is the format that most people
-write code to handle. However, during edits and bulk updates the data
-may be in a totally different format. So, if you are writing a
-hook_token_values implementation to add special tokens, be sure to
-test creation, edit, and bulk update cases to make sure your code will
-handle it.
-
-==================
-2 - Settings hook - To create aliases for your module
-==================
-You must implement hook_pathauto($op), where $op is always (at this
-time) 'settings'. Return an object (NOT an array) containing the
-following members, which will be used by pathauto to build a group
-of settings for your module and define the variables for saving your
-settings:
-
-module - The name of your module (e.g., 'node')
-groupheader - The translated label for the settings group (e.g.,
-  t('Content path settings')
-patterndescr - The translated label for the default pattern (e.g.,
-  t('Default path pattern (applies to all content types with blank patterns below)')
-patterndefault - A translated default pattern (e.g., t('[cat]/[title].html'))
-token_type - The token type (e.g. 'node', 'user') that can be used.
-patternitems - For modules which need to express multiple patterns
-  (for example, the node module supports a separate pattern for each
-  content type), an array whose keys consist of identifiers for each
-  pattern (e.g., the content type name) and values consist of the
-  translated label for the pattern
-bulkname - For modules which support a bulk update operation, the
-  translated label for the action (e.g., t('Bulk update content paths'))
-bulkdescr - For modules which support a bulk update operation, a
-  translated, more thorough description of what the operation will do
-  (e.g., t('Generate aliases for all existing content items which do not already have aliases.'))
-
-
-==================
-2 - $alias = pathauto_create_alias($module, $op, $placeholders, $src, $type=NULL)
-==================
-
-At the appropriate time (usually when a new item is being created for
-which a generated alias is desired), call pathauto_create_alias() to
-generate and create the alias.  See the user, taxonomy, and nodeapi hook
-implementations in pathauto.module for examples.
-
-$module - The name of your module (e.g., 'node')
-$op - Operation being performed on the item ('insert', 'update', or
-  'bulkupdate')
-$placeholders - An array whose keys consist of the translated placeholders
-  which appear in patterns and values are the "clean" values to be
-  substituted into the pattern. Call pathauto_cleanstring() on any
-  values which you do not know to be purely alphanumeric, to substitute
-  any non-alphanumerics with the user's designated separator. Note that
-  if the pattern has multiple slash-separated components (e.g., [term:path]),
-  pathauto_cleanstring() should be called for each component, not the
-  complete string.
-  Example: $placeholders[t('[title]')] = pathauto_cleanstring($node->title);
-$src - The "real" URI of the content to be aliased (e.g., "node/$node->nid")
-$type - For modules which provided patternitems in hook_autopath(),
-  the relevant identifier for the specific item to be aliased (e.g.,
-  $node->type)
-
-pathauto_create_alias() returns the alias that was created.
-
-
-==================
-3 - Bulk update function
-==================
-
-If a module supports bulk updating of aliases, it must provide a
-function of this form, to be called by pathauto when the corresponding
-checkbox is selected and the settings page submitted:
-
-function <module>_pathauto_bulkupdate()
-
-The function should iterate over the content items controlled by the
-module, calling pathauto_create_alias() for each one. It is
-recommended that the function report on its success (e.g., with a
-count of created aliases) via drupal_set_message().
-
-
-==================
-4 - Bulk delete hook_path_alias_types()
-==================
-
-For modules that create new types of pages that can be aliased with pathauto, a
-hook implementation is needed to allow the user to delete them all at once.
-
-function hook_path_alias_types()
-
-This hook returns an array whose keys match the beginning of the source paths
-(e.g.: "node/", "user/", etc.) and whose values describe the type of page (e.g.:
-"content", "users"). Like all displayed strings, these descriptionsshould be
-localized with t(). Use % to match interior pieces of a path; "user/%/track". This
-is a database wildcard, so be careful.
-
-
-==================
-Modules that extend node and/or taxonomy
-==================
-
-NOTE: this is basically not true any more.  If you feel you need this file an issue.
-
-Many contributed Drupal modules extend the core node and taxonomy
-modules. To extend pathauto patterns to support their extensions, they
-may implement the pathauto_node and pathauto_taxonomy hooks.
-
-To do so, implement the function <modulename>_pathauto_node (or _taxonomy),
-accepting the arguments $op and $node (or $term). Two operations are
-supported:
-
-$op = 'placeholders' - return an array keyed on placeholder strings
-(e.g., t('[eventyyyy]')) valued with descriptions (e.g. t('The year the
-event starts.')).
-$op = 'values' - return an array keyed on placeholder strings, valued
-with the "clean" actual value for the passed node or category (e.g.,
-pathauto_cleanstring(date('M', $eventstart)));
-
-See contrib/pathauto_node_event.inc for an example of extending node
-patterns.
diff --git a/README.txt b/README.txt
index 6bb138d..fc56959 100644
--- a/README.txt
+++ b/README.txt
@@ -3,18 +3,19 @@ They contain answers to many common questions.
 If you are developing for this module, the API.txt may be interesting.
 If you are upgrading, check the CHANGELOG.txt for major changes.
 
-**Description:
+** Description:
 The Pathauto module provides support functions for other modules to
 automatically generate aliases based on appropriate criteria, with a
 central settings path for site administrators.
 
 Implementations are provided for core entity types: content, taxonomy terms,
-and users (including blogs and tracker pages).
+and users (including blogs and forum pages).
 
 Pathauto also provides a way to delete large numbers of aliases.  This feature
-is available at  Administer > Site building > URL aliases > Delete aliases
+is available at  Administer > Configuration > Search and metadata > URL aliases
+> Delete aliases.
 
-**Benefits:
+** Benefits:
 Besides making the page address more reflective of its content than
 "node/138", it's important to know that modern search engines give
 heavy weight to search terms which appear in a page's URL. By
@@ -22,10 +23,10 @@ automatically using keywords based directly on the page content in the URL,
 relevant search engine hits for your page can be significantly
 enhanced.
 
-**Installation AND Upgrades:
+** Installation AND Upgrades:
 See the INSTALL.txt file.
 
-**Notices:
+** Notices:
 Pathauto just adds URL aliases to content, users, and taxonomy terms.
 Because it's an alias, the standard Drupal URL (for example node/123 or
 taxonomy/term/1) will still function as normal.  If you have external links
@@ -62,25 +63,14 @@ When the pattern for a content type is left blank, the default pattern will be
 used. But if the default pattern is also blank, Pathauto will be disabled
 for that content type.
 
-** Bulk Updates Must be Run Multiple Times:
-As of 5.x-2.x Pathauto now performs bulk updates in a manner which is more
-likely to succeed on large sites.  The drawback is that it needs to be run
-multiple times.  If you want to reduce the number of times that you need to
-run Pathauto you can increase the "Maximum number of objects to alias in a
-bulk update:" setting under General Settings.
-
-**WYSIWYG Conflicts - FCKEditor, TinyMCE, etc.
-If you use a WYSIWYG editor, please disable it for the Pathauto admin page.
-Failure to do so may cause errors about "preg_replace" problems due to the <p>
-tag being added to the "strings to replace".  See http://drupal.org/node/175772
-
-**Credits:
+** Credits:
 The original module combined the functionality of Mike Ryan's autopath with
 Tommy Sundstrom's path_automatic.
 
 Significant enhancements were contributed by jdmquin @ www.bcdems.net.
 
-Matt England added the tracker support.
+Matt England added the tracker support (tracker support has been removed in
+recent changes).
 
 Other suggestions and patches contributed by the Drupal community.
 
diff --git a/pathauto.api.php b/pathauto.api.php
index 37239cb..b7c00c0 100644
--- a/pathauto.api.php
+++ b/pathauto.api.php
@@ -1,17 +1,118 @@
 <?php
-
 /**
  * @file
  * Documentation for pathauto API.
  *
- * @see hook_token_info
- * @see hook_tokens
+ * It may be helpful to review some examples of integration from
+ * pathauto.pathauto.inc.
+ *
+ * Pathauto works by using tokens in path patterns.  Thus the simplest
+ * integration is just to provide tokens.  Token support is provided by Drupal
+ * core. To provide additional token from your module, implement the following
+ * hooks:
+ *
+ * hook_tokens() - http://api.drupal.org/api/function/hook_tokens
+ * hook_token_info() - http://api.drupal.org/api/function/hook_token_info
+ *
+ * If you wish to provide pathauto integration for custom paths provided by your
+ * module, there are a few steps involved.
+ *
+ * 1. hook_pathauto()
+ *    Provide information required by pathauto for the settings form as well as
+ *    bulk generation.  See the documentation for hook_pathauto() for more
+ *    details.
+ *
+ * 2. pathauto_create_alias()
+ *    At the appropriate time (usually when a new item is being created for
+ *    which a generated alias is desired), call pathauto_create_alias() with the
+ *    appropriate parameters to generate and create the alias. See the user,
+ *    taxonomy, and node hook implementations in pathauto.module for examples.
+ *    Also see the documentation for pathauto_create_alias().
+ *
+ * 3. pathauto_path_delete_all()
+ *    At the appropriate time (usually when an item is being deleted), call
+ *    pathauto_path_delete_all() to remove any aliases that were created for the
+ *    content being removed.  See the documentation for
+ *    pathauto_path_delete_all() for more details.
+ *
+ * 4. hook_path_alias_types()
+ *    For modules that create new types of content that can be aliased with
+ *    pathauto, a hook implementation is needed to allow the user to delete them
+ *    all at once.  See the documentation for hook_path_alias_types() below for
+ *    more information.
+ *
+ * There are other integration points with pathauto, namely alter hooks that
+ * allow you to change the data used by pathauto at various points in the
+ * process.  See the below hook documentation for details.
  */
 
+/**
+ * Used primarily by the bulk delete form.  This hooks provides pathauto the
+ * information needed to bulk delete aliases created by your module.  The keys
+ * of the return array are used by pathauto as the system path prefix to delete
+ * from the url_aliases table.  The corresponding value is simply used as the
+ * label for each type of path on the bulk delete form.
+ *
+ * @return
+ *   An array whose keys match the beginning of the source paths
+ *   (e.g.: "node/", "user/", etc.) and whose values describe the type of page
+ *   (e.g.: "Content", "Users"). Like all displayed strings, these descriptions
+ *   should be localized with t(). Use % to match interior pieces of a path,
+ *   like "user/%/track". This is a database wildcard (meaning "user/%/track"
+ *   matches "user/1/track" as well as "user/1/view/track").
+ */
 function hook_path_alias_types() {
+  $objects['user/'] = t('Users');
+  $objects['node/'] = t('Content');
 }
 
+/**
+ * Provide information about the way your module's aliases will be built.
+ *
+ * The information you provide here is used to build the form
+ * on search/path/patterns. File pathauto.pathauto.inc provides example
+ * implementations for system modules.
+ *
+ * @see node_pathauto
+ *
+ * @param $op
+ *   At the moment it's always 'settings'.
+ *
+ * @return
+ *   An object, or array of objects (if providing multiple groups of path
+ *   patterns).  Each object should have the following members:
+ *   - 'module': The module or entity type.
+ *   - 'token_type': Which token type should be allowed in the patterns form.
+ *   - 'groupheader': Translated label for the settings group
+ *   - 'patterndescr': The translated label for the default pattern (e.g.,
+ *      t('Default path pattern (applies to all content types with blank
+ *      patterns below)')
+ *   - 'patterndefault': Default pattern  (e.g. 'content/[node:title]'
+ *   - 'batch_update_callback': The name of function that should be ran for
+ *      bulk update. @see node_pathauto_bulk_update_batch_process for example
+ *   - 'batch_file': The name of the file with the bulk update function.
+ *   - 'patternitems': Optional. An array of descritpions keyed by bundles.
+ */
 function hook_pathauto($op) {
+  switch ($op) {
+    case 'settings':
+      $settings = array();
+      $settings['module'] = 'file';
+      $settings['token_type'] = 'file';
+      $settings['groupheader'] = t('File paths');
+      $settings['patterndescr'] = t('Default path pattern (applies to all file types with blank patterns below)');
+      $settings['patterndefault'] = 'files/[file:name]';
+      $settings['batch_update_callback'] = 'file_entity_pathauto_bulk_update_batch_process';
+      $settings['batch_file'] = drupal_get_path('module', 'file_entity') . '/file_entity.pathauto.inc';
+
+      foreach (file_type_get_enabled_types() as $file_type => $type) {
+        $settings['patternitems'][$file_type] = t('Pattern for all @file_type paths.', array('@file_type' => $type->label));
+      }
+      return (object) $settings;
+
+    default:
+      break;
+  }
 }
 
 /**
@@ -56,7 +157,7 @@ function hook_pathauto_is_alias_reserved($alias, $source, $langcode) {
  *   - 'language': A string of the language code for the alias (e.g. 'en').
  *     This can be altered by reference.
  */
-function hook_pathauto_pattern_alter(&$pattern, array &$context) {
+function hook_pathauto_pattern_alter(&$pattern, array $context) {
   // Switch out any [node:created:*] tokens with [node:updated:*] on update.
   if ($context['module'] == 'node' && ($context['op'] == 'update')) {
     $pattern = preg_replace('/\[node:created(\:[^]]*)?\]/', '[node:updated$1]', $pattern);
