diff --git a/follow.install b/follow.install
index 1ddd250..cb6a172 100644
--- a/follow.install
+++ b/follow.install
@@ -27,19 +27,39 @@ function follow_install() {
 function follow_schema() {
   $schema['follow_links'] = array(
     'description' => 'Stores sitewide and user follow links.',
+    'export' => array(
+      'key' => 'machine_name',
+      'primary key' => 'lid',
+      'identifier' => 'follow_link',                // Exports will be as $follow_link
+      'default hook' => 'follow_default_link',  // Function hook name.
+      'api' => array(
+        'owner' => 'follow',
+        'api' => 'follow_default_links',  // Base name for api include files.
+        'minimum_version' => 1,
+        'current_version' => 1,
+      ),
+    ),
     'fields' => array(
       'lid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'description' => 'Unique identifier for the {follow_links}.',
+        'no export' => TRUE,
+      ),
+      'machine_name' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => "The unique machine name of the {follow_links}.",
       ),
       'name' => array(
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
-        'description' => "The machine name of the {follow_links}.",
+        'description' => "The network name of the {follow_links}.",
       ),
       'uid' => array(
         'type' => 'int',
@@ -107,3 +127,24 @@ function follow_update_last_removed() {
 function follow_update_7003() {
 
 }
+
+/**
+ *  Update the schema to add the new machine_name field so links can be exportable.
+ */
+function follow_update_7004() {
+  //add our field
+  $spec = array(
+    'type' => 'varchar',
+    'length' => 255,
+    'default' => '',
+    'description' => "The unique machine name of the {follow_links}.",
+  );
+  db_add_field('follow_links', 'machine_name', $spec, array());
+  
+  //go through and add appropriate values for the machine name
+  db_query('UPDATE {follow_links} SET machine_name=CONCAT_WS(:sep, uid, name)', array(':sep' => '_'));
+  
+  //add our unique and not null constraints
+  $spec['not null'] = TRUE;
+  db_change_field('follow_links', 'machine_name', 'machine_name', $spec, array('unique keys' => array('machine_name' => array('machine_name'))));
+}
\ No newline at end of file
diff --git a/follow.module b/follow.module
index 84e974a..1cc693a 100644
--- a/follow.module
+++ b/follow.module
@@ -393,10 +393,11 @@ function follow_links_form($form, &$form_state, $uid = 0) {
 
   $links = follow_links_load($uid);
   $networks = follow_networks_load($uid, TRUE);
-
+  
   // Put all our existing links at the top, sorted by weight.
   if (is_array($links)) {
-    foreach ($links as $name => $link) {
+    foreach ($links as $machine_name => $link) {
+      $name = $link->name;
       $title = $networks[$name]['title'];
       $form['follow_links'][$name] = _follow_links_form_link($link, $title, $uid);
       // Unset this specific network so we don't add the same one again below.
@@ -411,7 +412,6 @@ function follow_links_form($form, &$form_state, $uid = 0) {
   }
 
   $form['submit'] = array('#type' => 'submit', '#value' => t('Submit'));
-
   return $form;
 }
 
@@ -424,16 +424,21 @@ function _follow_links_form_link($link, $title, $uid) {
   $elements['name'] = array(
     '#markup' => $title,
   );
+
   if (isset($link->lid)) {
     $elements['lid'] = array(
       '#type' => 'hidden',
       '#value' =>  $link->lid,
     );
+  }
+  
+  if(isset($link->lid) || (isset($link->in_code_only) && $link->in_code_only)){
     $elements['weight'] = array(
       '#type' => 'weight',
       '#default_value' => $link->weight,
     );
   }
+  
   $elements['url'] = array(
     '#type' => 'textfield',
     '#follow_network' => $link->name,
@@ -595,7 +600,12 @@ function theme_follow_links_form($variables) {
     $row = array();
 
     if (isset($form['follow_links'][$key]['weight'])) {
-      $row[] = drupal_render($form['follow_links'][$key]['lid']) . drupal_render($form['follow_links'][$key]['name']);
+      if (isset($form['follow_links'][$key]['lid'])) {
+        $row[] = drupal_render($form['follow_links'][$key]['lid']) . drupal_render($form['follow_links'][$key]['name']);
+      } 
+      else {
+        $row[] = drupal_render($form['follow_links'][$key]['name']);
+      }
       $row[] = drupal_render($form['follow_links'][$key]['url']);
       if (user_access('change follow link titles')) {
         $row[] = drupal_render($form['follow_links'][$key]['title']);
@@ -659,21 +669,39 @@ function follow_settings_form() {
  *   A single link in array format, or FALSE if none matched the incoming ID.
  */
 function follow_links_load($uid = 0) {
+  //make sure we have the export.inc file loaded
+  ctools_include('export');
+  
   $links = array();
-
-  $sql = "SELECT * FROM {follow_links} WHERE uid = :uid ORDER BY weight ASC";
-  $result = db_query($sql, array(':uid' => $uid));
+  $result = ctools_export_load_object('follow_links', 'conditions', array('uid' => $uid));
 
   foreach ($result as $link) {
-    $link->options = unserialize($link->options);
     $link->url = follow_build_url($link->path, $link->options);
     $links[$link->name] = $link;
   }
-
+  //we need to sort the links since we're not using the query anymore
+  
+  usort($links, '_follow_compare_links');
   return $links;
 }
 
 /**
+ *  Comparison function for sorting the data
+ */
+function _follow_compare_links($a, $b){
+  if ($a->weight > $b->weight) { 
+    return 1; 
+  } 
+  else if ($a->weight == $b->weight) {
+    return 0;
+  } 
+  else {
+    return -1;
+  }
+}
+
+
+/**
  * Inserts a new link, or updates an existing one.
  *
  * @param $link
@@ -683,6 +711,9 @@ function follow_link_save($link) {
   $parsed = follow_parse_url($link->url);
   $link->path = $parsed['path'];
   $link->options = $parsed['options'];
+  
+  //add in the machine name which is based on the userid + the name
+  $link->machine_name = $link->uid . '_' . $link->name;
 
   if (isset($link->lid)) {
     drupal_write_record('follow_links', $link, 'lid');
@@ -690,6 +721,10 @@ function follow_link_save($link) {
   else {
     drupal_write_record('follow_links', $link);
   }
+  
+  //reset the ctools cache
+  ctools_export_load_object_reset('follow_links');
+  
   return $link;
 }
 
