diff --git a/includes/modules/filefield.inc b/includes/modules/filefield.inc
deleted file mode 100644
index a5ea779..0000000
--- a/includes/modules/filefield.inc
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * @file
- * uuid_node hooks on behalf of the filefield module.
- */
-
-/**
- * Implements hook_uuid_node_features_export_alter().
- */
-function filefield_uuid_node_features_export_alter(&$export, &$pipe, $node) {
-  $types = content_types();
-  if (!empty($types[$node->type])) {
-    // Find CCK filefields.
-    foreach ($types[$node->type]['fields'] as $field) {
-      if ($field['module'] == 'filefield') {
-        $field_name = $field['field_name'];
-
-        // If the content type has changed since the last export, this field
-        // may not exist.
-        if (isset($node->$field_name)) {
-          // Loop through all values of the field.
-          foreach ($node->$field_name as $delta => $data) {
-            if (!empty($data['fid'])) {
-              $uuid = uuid_get_uuid('files', 'fid', $data['fid']);
-              // If the referenced file doesn't have a uuid, take this opportunity to
-              // create one.
-              if (empty($uuid)) {
-                $uuid = uuid_set_uuid('files', 'fid', $data['fid']);
-              }
-              $pipe['uuid_file'][$uuid] = $uuid;
-            }
-          }
-        }
-      }
-    }
-  }
-}
-
-/**
- * Implements hook_uuid_node_features_export_render_alter().
- */
-function filefield_uuid_node_features_export_render_alter(&$export, $node, $module) {
-  $types = content_types();
-  if (!empty($types[$node->type])) {
-    // Find CCK filefields.
-    foreach ($types[$node->type]['fields'] as $field) {
-      if ($field['module'] == 'filefield') {
-        $field_name = $field['field_name'];
-        $export->$field_name = array();
-
-        // Loop through all values of the field.
-        foreach ($node->$field_name as $delta => $data) {
-          if (!empty($data['fid'])) {
-            $export->{$field_name}[$delta] = array(
-              'uuid' => uuid_get_uuid('files', 'fid', $data['fid']),
-              'list' => $data['list'],
-              'data' => $data['data'],
-            );
-          }
-        }
-      }
-    }
-  }
-}
-
-/**
- * Implements hook_uuid_node_features_rebuild_alter().
- * Replace filefield uuid's with a field array suitable for node_save().
- */
-function filefield_uuid_node_features_rebuild_alter(&$node, $module) {
-  $types = content_types();
-  if (!empty($types[$node->type])) {
-    // Find CCK nodereference fields.
-    foreach ($types[$node->type]['fields'] as $field) {
-      if ($field['module'] == 'filefield') {
-        $field_name = $field['field_name'];
-
-        // Loop through all values of the field.
-        foreach ($node->$field_name as $delta => $data) {
-          $fid = uuid_get_serial_id('files', 'fid', $data['uuid']);
-          $file = field_file_load($fid);
-
-          $node->{$field_name}[$delta] = $file + $data;
-        }
-      }
-    }
-  }
-}
diff --git a/includes/uuid_features.drush.inc b/includes/uuid_features.drush.inc
index f62f7e4..331de3e 100644
--- a/includes/uuid_features.drush.inc
+++ b/includes/uuid_features.drush.inc
@@ -22,7 +22,7 @@ function uuid_features_drush_command() {
     'arguments' => array(
       'feature' => 'Feature name to export.',
     ),
-    'drupal dependencies' => array('features', 'uuid', 'uuid_features', 'filefield'),
+    'drupal dependencies' => array('features', 'uuid', 'uuid_features', 'file'),
     'aliases' => array('ufuf'),
   );
 
@@ -48,7 +48,6 @@ function uuid_features_command_update_files($feature = NULL) {
       if (($feature = feature_load($module, TRUE)) && module_exists($module)) {
         if (!empty($feature->info['features']['uuid_file'])) {
           $files = $feature->info['features']['uuid_file'];
-
           $dest = drupal_get_path('module', $module) . '/uuid_file';
           file_prepare_directory($dest, FILE_CREATE_DIRECTORY);
 
@@ -82,8 +81,9 @@ function uuid_features_command_update_files($feature = NULL) {
  * @param string $uuid
  */
 function _uuid_features_drush_update_file($module, $uuid) {
-  $fid = uuid_get_serial_id('files', 'fid', $uuid);
-  if (empty($fid) || !($file = field_file_load($fid))) {
+  $files = array_values(entity_uuid_load('file', array($uuid)));
+  $fid = $files[0]->fid;
+  if (empty($fid) || !($file = file_load($fid))) {
     drush_set_error('UUID_FILE_NOT_FOUND', dt('The file specified by %uuid was not found.', array('%uuid' => $uuid)));
   }
 
@@ -93,8 +93,8 @@ function _uuid_features_drush_update_file($module, $uuid) {
     if (!is_dir($directory)) {
       drush_op('mkdir', $directory);
     }
-    $source = $file['filepath'];
-    $file_parts = explode('.', $file['filepath']);
+    $source = $file->uri;
+    $file_parts = explode('.', $file->uri);
     $extension = array_pop($file_parts);
 
     $destination = $directory . '/' . $uuid . '.' . $extension;
diff --git a/includes/uuid_file.features.inc b/includes/uuid_file.features.inc
index fa5427b..dd84ae7 100644
--- a/includes/uuid_file.features.inc
+++ b/includes/uuid_file.features.inc
@@ -1,21 +1,45 @@
 <?php
+
 /**
  * @file
  * Features hooks for the uuid_file features component.
  */
 
 /**
+ * Implements hook_features_export_options().
+ */
+function uuid_file_features_export_options() {
+  $options = array();
+  $result = db_select('file_managed', 'f')
+    ->fields('f', array('filename', 'fid', 'uuid'))
+    ->execute();
+  foreach ($result as $file) {
+    $options[$file->uuid] = t('@name', array(
+      '@name' => $file->filename,
+    ));
+  }
+  return $options;
+}
+
+/**
  * Implements hook_features_export().
  */
 function uuid_file_features_export($data, &$export, $module_name = '') {
   $pipe = array();
-
+  $map = features_get_default_map('uuid_file');
   $export['dependencies']['uuid_features'] = 'uuid_features';
 
   foreach ($data as $uuid) {
-    $export['features']['uuid_file'][$uuid] = $uuid;
+    if (isset($map[$uuid]) && $map[$uuid] != $module_name) {
+      if (isset($export['features']['uuid_file'][$uuid])) {
+        unset($export['features']['uuid_file'][$uuid]);
+      }
+      $export['dependencies'][$module] = $map[$uuid];
+    }
+    else {
+      $export['features']['uuid_file'][$uuid] = $uuid;
+    }
   }
-
   return $pipe;
 }
 
@@ -24,29 +48,31 @@ function uuid_file_features_export($data, &$export, $module_name = '') {
  */
 function uuid_file_features_export_render($module, $data) {
   $translatables = $code = array();
-
   $code[] = '  $files = array();';
   $code[] = '';
+  $fids = array();
   foreach ($data as $uuid) {
-    $fid = uuid_get_serial_id('files', 'fid', $uuid);
+    $files = array_values(entity_uuid_load('file', array($uuid)));
+    $fid = $files[0]->fid;
     if (!$fid) {
       continue;
     }
-
-    $file = field_file_load($fid);
-    $file_parts = explode('.', $file['filepath']);
-    $extension = array_pop($file_parts);
-
-    $export = array(
-      'uuid' => $uuid,
-      'hash' => md5_file($file['filepath']),
-      'extension' => $extension,
-    );
-
-    $code[] = '  $files[] = ' . features_var_export($export, '  ') . ';';
+    $fids[] = $fid;
   }
-  if (!empty($translatables)) {
-    $code[] = features_translatables_export($translatables, '  ');
+  // Load all file objects.
+  $files = file_load_multiple($fids);
+  foreach ($files as $file) {
+    // unset the file fid and the timestamp since it is changed for each
+    // call to file_save.
+    unset($file->fid, $file->timestamp);
+    // Store the hash of the file to determine if it has been changed.
+    $file->hash = file_exists($file->uri) ? md5_file($file->uri) : '';
+    $file->extension = array_pop(explode('.', $file->filename));
+    $file->module = $module;
+    $code[] = '  $files[\'' . $file->uuid . '\'] = ' . features_var_export($file, '  ') . ';';
+    if (!empty($translatables)) {
+      $code[] = features_translatables_export($translatables, '  ');
+    }
   }
   $code[] = '  return $files;';
   $code = implode("\n", $code);
@@ -67,13 +93,73 @@ function uuid_file_features_revert($module) {
 function uuid_file_features_rebuild($module) {
   $files = module_invoke($module, 'uuid_features_default_files');
   if (!empty($files)) {
-    $source_dir = drupal_get_path('module', $module) . '/uuid_file';
     foreach ($files as $data) {
-      $source = $source_dir . '/' . $data['uuid'] . '.' . $data['extension'];
-      $data = file_get_contents($source);
-
-      // Copy the file and save to db.
-      $file = file_save_data($data, NULL, FILE_EXISTS_REPLACE);
+      uuid_file_features_save_file($data);
     }
   }
 }
+
+/**
+ * Save a file from a features export.
+ * @param mixed $file
+ *   The file to save.
+ */
+function uuid_file_features_save_file($file) {
+  $file = (object) $file;
+  $source_dir = drupal_get_path('module', $file->module) . '/uuid_file';
+  // Try to fetch another file with the same fid, and replace that file
+  // if it already exists.
+  $files = array_values(entity_uuid_load('file', array($uuid)));
+  $file->fid = $files[0]->fid;
+  $source_file = $source_dir . '/' . $file->uuid . '.' . $file->extension;
+  // Copy the file from the module directory to our destination path,
+  // but only if the file actually has changed.
+  if (file_exists($source_file) && (!file_exists($file->uri) || md5_file($file->uri) != $file->hash)) {
+    $file->uri = file_unmanaged_copy($source_file, $file->uri, FILE_EXISTS_REPLACE);
+  }
+  return file_save($file);
+}
+
+/**
+ * Load a file object from code or from the database.
+ * if the object is in code, it will be stored in the database and then returned,
+ * since it is a faux exportable.
+ * @param string uuid
+ *   The uuid of the object.
+ * @return object
+ *   A fully populated file object.
+ */
+function uuid_file_features_load_object($uuid) {
+  // Fetch all default files, so we can store them if they are not available yet.
+  $default_files = &drupal_static(__FUNCTION__);
+  // Check if the file exists in the database.
+  $files = array_values(entity_uuid_load('file', array($uuid)));
+  $fid = $files[0]->fid;
+  if (!empty($fid)) {
+    return file_load($fid);
+  }
+  // If we can't find the file in the database, we need to check if it's
+  // defined in code. Let's save it if we find it.
+  if (!$default_files) {
+    $default_files = module_invoke_all('uuid_features_default_files');
+  }
+  if (isset($default_files[$uuid])) {
+    return uuid_file_features_save_file($default_files[$uuid]);
+  }
+  return FALSE;
+}
+
+/**
+ * Find a file uuid based on a fid.
+ * @param int $fid
+ *   the file id
+ * @return
+ *   the uuid of the file.
+ */
+function uuid_file_features_find_uuid($fid) {
+  return db_select('file_managed', 'f')
+    ->fields('f', array('uuid'))
+    ->condition('fid', $fid)
+    ->execute()
+    ->fetchField();
+}
\ No newline at end of file
diff --git a/includes/uuid_node.features.inc b/includes/uuid_node.features.inc
index 17f931b..95177ce 100755
--- a/includes/uuid_node.features.inc
+++ b/includes/uuid_node.features.inc
@@ -43,14 +43,8 @@ function uuid_node_features_export($data, &$export, $module_name = '') {
     $export['features']['uuid_node'][$uuid] = $uuid;
     $pipe['node'][$node->type] = $node->type;
 
-    // drupal_alter() normally supports just one byref parameter. Using
-    // the __drupal_alter_by_ref key, we can store any additional parameters
-    // that need to be altered, and they'll be split out into additional params
-    // for the hook_*_alter() implementations.  The hook_alter signature is
-    // hook_uuid_node_features_export_alter(&$export, &$pipe, $node)
     $data = &$export;
-    $data['__drupal_alter_by_ref'] = array(&$pipe);
-    drupal_alter('uuid_node_features_export', $data, $node);
+    drupal_alter('uuid_node_features_export', $data, $pipe, $node);
   }
 
   return $pipe;
diff --git a/uuid_features.module b/uuid_features.module
index ca6a94c..1015af3 100644
--- a/uuid_features.module
+++ b/uuid_features.module
@@ -38,15 +38,12 @@ function uuid_features_features_api() {
     );
   }
 
-  // Depends on http://drupal.org/node/808690
-  if (function_exists('uuid_file_insert')) {
-    $components['uuid_file'] = array(
-      'name' => t('File'),
-      'default_hook' => 'uuid_features_default_files',
-      'default_file' => FEATURES_DEFAULTS_INCLUDED,
-      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_file.features.inc',
-    );
-  }
+  $components['uuid_file'] = array(
+    'name' => t('File'),
+    'default_hook' => 'uuid_features_default_files',
+    'default_file' => FEATURES_DEFAULTS_INCLUDED,
+    'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_file.features.inc',
+  );
 
   $components['uuid_bean'] = array(
     'name' => t('Bean'),
@@ -78,6 +75,27 @@ function uuid_features_load_module_includes() {
   }
 }
 
+
+/**
+ * Find a field of a particular type on an entity.
+ * @param array $module
+ *   the modules the matching fields belongs to.
+ * @param $entity the entity in which the field might exist.
+ */
+function uuid_features_find_module_fields($modules, $entity) {
+  $fields = field_info_fields();
+  $matching_fields = array();
+  if (!is_array($modules)) {
+    $modules = array($modules);
+  }
+  foreach ($fields as $field_name => $field) {
+    if (in_array($field['module'], $modules) && isset($entity->{$field_name})) {
+      $matching_fields[$field_name] = $entity->{$field_name};
+    }
+  }
+  return $matching_fields;
+}
+
 /**
  * Implements hook_features_pipe_COMPONENT_alter().
  *
