diff --git a/includes/modules/filefield.inc b/includes/modules/filefield.inc
deleted file mode 100644
index 4b9a652..0000000
--- a/includes/modules/filefield.inc
+++ /dev/null
@@ -1,91 +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, $node) {
-  // Access / modify the pipe.
-  $pipe = &$export['__drupal_alter_by_ref']['pipe'];
-  $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 048d5de..d647406 100644
--- a/includes/uuid_features.drush.inc
+++ b/includes/uuid_features.drush.inc
@@ -22,7 +22,7 @@ function uuid_features_drush_command() {
       'features',
       'uuid',
       'uuid_features',
-      'filefield',
+      'file',
     ),
     'aliases' => array('ufuf'),
   );
@@ -85,8 +85,9 @@ function uuid_features_command_update_files($feature = NULL) {
  *   The 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)));
   }
 
@@ -96,8 +97,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 53a5b3e..83a3c2c 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,35 @@ 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);
-    if (!$fid) {
+    $files = array_values(entity_uuid_load('file', array($uuid)));
+    if (empty($files)) {
       continue;
     }
+    $fid = $files[0]->fid;
 
-    $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, '  ') . ';';
+    if (!$fid) {
+      continue;
+    }
+    $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);
@@ -68,13 +98,77 @@ function uuid_file_features_revert($module) {
 function uuid_file_features_rebuild($module) {
   $files = features_get_default('uuid_file', $module);
   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);
+      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($file->uuid)));
+  if (!empty($files)) {
+    $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);
+}
 
-      // Copy the file and save to db.
-      $file = file_save_data($data, NULL, FILE_EXISTS_REPLACE);
+/**
+ * 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)));
+  if (!empty($files)) {
+    $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();
 }
diff --git a/uuid_features.module b/uuid_features.module
index cf632a3..e750491 100644
--- a/uuid_features.module
+++ b/uuid_features.module
@@ -114,14 +114,12 @@ function uuid_features_features_api() {
     );
   }
 
-  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',
+  );
 
   if (module_exists('file_entity')) {
     $components['uuid_file_entity'] = array(
@@ -213,6 +211,26 @@ function uuid_features_features_api() {
 }
 
 /**
+ * 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().
  *
  * When exporting a vocabulary, include its terms.
