Index: primary_term/views_handler_field_primary_term_tid.inc
===================================================================
--- primary_term/views_handler_field_primary_term_tid.inc	(revision 0)
+++ primary_term/views_handler_field_primary_term_tid.inc	(revision 0)
@@ -0,0 +1,15 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Provide a views handlers for primary_term data fields.
+ */
+
+class views_handler_field_primary_term_tid extends views_handler_field {
+  function render($values) {
+    $tid = $values->{$this->field_alias};
+    $term = taxonomy_get_term($tid);
+    return $term->name;
+  }
+}
Index: primary_term/primary_term.module
===================================================================
--- primary_term/primary_term.module	(revision 259)
+++ primary_term/primary_term.module	(working copy)
@@ -179,33 +179,11 @@ function primary_term_token_values($type
  * Views support
  **********************************************************************/
 
-function primary_term_views_data() {
-  $tables['primary_term'] = array(
-    'table' => array(
-      'group' => t('Node'),
-      'join' => array(
-        'node' => array(
-          'left_field' => 'vid',
-          'field' => 'vid',
-        ),
-      ),
-    ),
-    'tid' => array(
-      'title' => t('Primary Term'),
-      'help' => t('The Primary Term of the node.'),
-      'field' => array(
-        'handler' => 'views_handler_field_term_node_tid',
-      ),
-      'argument' => array(
-        'handler' => 'views_handler_argument_term_node_tid',
-      ),
-      'filter' => array(
-        'handler' => 'views_handler_filter_term_node_tid',
-      ),
-      'sort' => array(
-        'handler' => 'views_handler_sort',
-      ),
-    ),
+/**
+ * Implementation of hook_views_api().
+ */
+function primary_term_views_api() {
+  return array(
+    'api' => 2,
   );
-  return $tables;
 }
Index: primary_term/primary_term.views.inc
===================================================================
--- primary_term/primary_term.views.inc	(revision 0)
+++ primary_term/primary_term.views.inc	(revision 0)
@@ -0,0 +1,54 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Views data for primary_term.
+ */
+
+function primary_term_views_handlers() {
+  return array(
+      'info' => array(
+          'path' => drupal_get_path('module', 'primary_term'),
+        ),
+      'handlers' => array(
+        'views_handler_field_primary_term_tid' => array(
+          'parent' => 'views_handler_field',
+        ),
+      ),
+    );
+}
+
+/**
+ * Implementation of hook_views_data().
+ */
+function primary_term_views_data() {
+  $data['primary_term']['table']['group'] = t('Node');
+  $data['primary_term']['table']['join'] = array(
+    'node' => array(
+      'left_field' => 'vid',
+      'field' => 'vid',
+    ),
+    // @@@ Node_revisions?
+  );
+
+  $data['primary_term']['tid'] = array(
+    'title' => t('Primary Term'),
+    'help' => t('The Primary Term of the node.'),
+    'field' => array(
+      'handler' => 'views_handler_field_primary_term_tid',
+      'click sortable' => TRUE,
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_term_node_tid',
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_term_node_tid',
+    ),
+  );
+
+  return $data;
+}
