diff --git a/plugins/base.inc b/plugins/base.inc
deleted file mode 100644
index 19b07e0..0000000
--- a/plugins/base.inc
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-
-/**
- * Base class for the views content cache plugins.
- */
-class views_content_cache_key {
-
-  /**
-   * Optionally provides a option form for the user to use this segment.
-   *
-   * Typical uses of this will include returning a checkboxes FormAPI element
-   * that will allow the user to indicate which keys in the cache segement
-   * they are interested in for the view that they are building.
-   * Eg. Checkboxes for each node type or each organic group.
-   *
-   * @param $value
-   *   The default value that has been previously set.
-   * @param $handler
-   *   The handler that this options for is for.
-   * @return
-   *   A FormAPI element that will appear as part of the views content cache
-   *   options form when building a view.
-   */
-  function options_form($value, &$handler) {
-    return array();
-  }
-
-  /**
-   * Builds an array of keys for the cache segment.
-   *
-   * When an 'event' happens, e.g. a node is saved, views content cache will
-   * consult this plugin for the keys it wishes to store in its cache segments.
-   * Views content cache will then handle the storage.
-   *
-   * @param $object
-   *   The object that is being changed.
-   * @param $object_type
-   *   The type of the object that is being changed.
-   * @return
-   *   Either a scalar value or an array of scalars. These should be the
-   *   different keys that are effected by the event in this cache segment.
-   */
-  function content_key($object, $object_type) {
-    return NULL;
-  }
-
-
-  /**
-   * An array of keys to check in this cache segment when viewing the view.
-   *
-   * As a user views a view, we are asked for the keys that views content cache
-   * should consider in our segment. Normally we'd just return the values as set
-   * by the user from our options_form().
-   *
-   * @param $values
-   *   An array of values that was stored from our form element in options_form().
-   * @return
-   *   An array of keys in our cache segment.
-   */
-  function view_key($values, &$handler) {
-    $values = array_filter($values);
-
-    // Find any values that are for arguments and replace with real values.
-    if (count($this->view_key_from_arguments())) {
-      $values = $this->view_key_replace_arguments($values, $handler);
-    }
-
-    return $values;
-  }
-
-  /**
-   * Replaces values corresponding to argument values set dynamically.
-   */
-  function view_key_replace_arguments($values, &$handler) {
-    foreach ($values as $value) {
-      if (strpos($value, '__arg:') === 0) {
-        // Get the argument and make sure its actually on the view still.
-        $arg_id = substr($value, strlen('__arg:'));
-        if (isset($handler->view->argument[$arg_id]) && $handler->view->argument[$arg_id]->argument_validated) {
-          // Argument is there and ready to go!
-          $argument = drupal_clone($handler->view->argument[$arg_id]);
-          $arg_value = $argument->get_value();
-          // Might need to split this up.
-          if (!empty($argument->options['break_phrase'])) {
-            views_break_phrase($argument->get_value(), $argument);
-            foreach ($argument->value as $new_val) {
-              $values[$new_val] = $new_val;
-            }
-          }
-          else {
-            $new_val = $argument->get_value();
-            $values[$new_val] = $new_val;
-          }
-        }
-        // Always remove the dummy argument value.
-        unset($values[$value]);
-      }
-    }
-
-    return $values;
-  }
-
-  /**
-   * Returns an array of views arguments that can supply valid key values.
-   *
-   * Plugins can define types of arguments that can optionally be checked for
-   * key values when looking up cache segments.
-   *
-   * @return
-   *   An array of argument handler classes that this plugin supports.
-   */
-  function view_key_from_arguments() {
-    return array();
-  }
-
-  /**
-   * Handy helper method that scans the given view looking for arguments.
-   */
-  function additional_options_for_arguments(&$view) {
-    $options = array();
-
-    $arguments = $view->display_handler->get_handlers('argument');
-
-    if (is_array($arguments)) {
-      foreach ($arguments as $arg_id => $argument) {
-        foreach ($this->view_key_from_arguments() as $class) {
-          if (is_a($argument, $class)) {
-            // This argument can provide us with keys.
-            $options['__arg:' . $arg_id] = t('Value from argument: %title', array('%title' => $argument->ui_name()));
-          }
-        }
-      }
-    }
-
-    return $options;
-  }
-
-  /**
-   * The method by which this plugin's where clause will be combined with others.
-   *
-   * Can either be 'AND' or 'OR' at the moment.
-   */
-  function clause_mode() {
-    return 'AND';
-  }
-}
diff --git a/plugins/comment.inc b/plugins/comment.inc
deleted file mode 100644
index 40eaed2..0000000
--- a/plugins/comment.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-class views_content_cache_key_comment extends views_content_cache_key {
-  function options_form($value) {
-    return array(
-      '#title' => t('Comments'),
-      '#description' => t('Checks for new or updated comments'),
-      '#type' => 'checkboxes',
-      '#options' => array(
-        'changed' => t('New or updated comments'),
-      ),
-      '#default_value' => $value,
-    );
-  }
-
-  function content_key($object, $object_type) {
-    if ($object_type === 'comment') {
-      return 'changed';
-    }
-  }
-}
diff --git a/plugins/node.inc b/plugins/node.inc
deleted file mode 100644
index 155c5c4..0000000
--- a/plugins/node.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-class views_content_cache_key_node extends views_content_cache_key {
-  function options_form($value, &$handler) {
-    return array(
-      '#title' => t('Node types'),
-      '#description' => t('Checks for new or updated nodes of any of the selected types.'),
-      '#type' => 'checkboxes',
-      '#options' => array_merge(node_type_get_names(), $this->additional_options_for_arguments($handler->view)),
-      '#default_value' => $value,
-      '#weight' => -10,
-    );
-  }
-
-  function content_key($object, $object_type) {
-    if ($object_type === 'node') {
-      return $object->type;
-    }
-    elseif ($object_type === 'comment' && !empty($object['nid']) && ($node = node_load($object['nid']))) {
-      return $node->type;
-    }
-  }
-
-  /**
-   * We support using the node type argument for the view key
-   */
-  function view_key_from_arguments() {
-    return array('views_handler_argument_node_type');
-  }
-}
diff --git a/plugins/node_only.inc b/plugins/node_only.inc
deleted file mode 100644
index 3ed28c4..0000000
--- a/plugins/node_only.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-class views_content_cache_key_node_only extends views_content_cache_key {
-  function options_form($value) {
-    return array(
-      '#title' => t('Node only'),
-      '#description' => t('Allows the node segment to be refined to only include main operations create/update/delete. Be careful about combing with other node related segments.'),
-      '#type' => 'checkboxes',
-      '#options' => array(
-        'node_changed' => t('Nodes updated/created/deleted'),
-      ),
-      '#default_value' => $value,
-    );
-  }
-
-  function content_key($object, $object_type) {
-    if ($object_type === 'node') {
-      return 'node_changed';
-    }
-  }
-}
diff --git a/plugins/og.inc b/plugins/og.inc
deleted file mode 100644
index 2a3be42..0000000
--- a/plugins/og.inc
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/**
- * Views content cache plugin for Organic Groups.
- *
- * This plugin allows using OG as a cache segment, views caching can depend on
- * the current group context, and/or all the groups that the current user
- * belongs to.
- */
-class views_content_cache_key_og extends views_content_cache_key {
-  function options_form($value, &$handler) {
-    return array(
-      '#title' => t('Organic Groups'),
-      '#description' => t('Checks for updates related to Organic Groups'),
-      '#type' => 'checkboxes',
-      '#options' => array_merge(array(
-        'current' => t('Current group'),
-        'user' => t("Member's groups")
-      ), $this->additional_options_for_arguments($handler->view)),
-      '#default_value' => $value,
-    );
-  }
-
-  function content_key($object, $object_type) {
-    $keys = array();
-    if ($object_type === 'node' && !empty($object->og_groups)) {
-      foreach ($object->og_groups as $gid) {
-        $keys[] = $gid;
-      }
-    }
-    elseif ($object_type === 'comment' && !empty($object['nid']) && ($node = node_load($object['nid'])) && !empty($node->og_groups)) {
-      foreach ($node->og_groups as $gid) {
-        $keys[] = $gid;
-      }
-    }
-    return $keys;
-  }
-
-  function view_key($values, &$handler) {
-    $values = array_filter($values);
-    $groups = array();
-    if (!empty($values['current']) && ($current = og_get_group_context())) {
-      $groups[] = $current->nid;
-    }
-    if (!empty($values['user'])) {
-      global $user;
-      if (!empty($user->og_groups)) {
-        $groups = array_merge($groups, array_keys($user->og_groups));
-      }
-    }
-    unset($values['current'], $values['user']);
-    // Add in the arguments.
-    foreach ($this->view_key_replace_arguments($values, $handler) as $gid) {
-      $groups[] = $gid;
-    }
-    return array_unique($groups);
-  }
-
-  function view_key_from_arguments() {
-    return array('og_views_handler_argument_og_group_nid');
-  }
-}
diff --git a/plugins/views_content_cache/base.inc b/plugins/views_content_cache/base.inc
new file mode 100644
index 0000000..f801c6e
--- /dev/null
+++ b/plugins/views_content_cache/base.inc
@@ -0,0 +1,146 @@
+<?php
+
+/**
+ * Base class for the views content cache plugins.
+ */
+class views_content_cache_key {
+
+  /**
+   * Optionally provides a option form for the user to use this segment.
+   *
+   * Typical uses of this will include returning a checkboxes FormAPI element
+   * that will allow the user to indicate which keys in the cache segement
+   * they are interested in for the view that they are building.
+   * Eg. Checkboxes for each node type or each organic group.
+   *
+   * @param $value
+   *   The default value that has been previously set.
+   * @param $handler
+   *   The handler that this options for is for.
+   * @return
+   *   A FormAPI element that will appear as part of the views content cache
+   *   options form when building a view.
+   */
+  function options_form($value, &$handler) {
+    return array();
+  }
+
+  /**
+   * Builds an array of keys for the cache segment.
+   *
+   * When an 'event' happens, e.g. a node is saved, views content cache will
+   * consult this plugin for the keys it wishes to store in its cache segments.
+   * Views content cache will then handle the storage.
+   *
+   * @param $object
+   *   The object that is being changed.
+   * @param $object_type
+   *   The type of the object that is being changed.
+   * @return
+   *   Either a scalar value or an array of scalars. These should be the
+   *   different keys that are effected by the event in this cache segment.
+   */
+  function content_key($object, $object_type) {
+    return NULL;
+  }
+
+
+  /**
+   * An array of keys to check in this cache segment when viewing the view.
+   *
+   * As a user views a view, we are asked for the keys that views content cache
+   * should consider in our segment. Normally we'd just return the values as set
+   * by the user from our options_form().
+   *
+   * @param $values
+   *   An array of values that was stored from our form element in options_form().
+   * @return
+   *   An array of keys in our cache segment.
+   */
+  function view_key($values, &$handler) {
+    $values = array_filter($values);
+
+    // Find any values that are for arguments and replace with real values.
+    if (count($this->view_key_from_arguments())) {
+      $values = $this->view_key_replace_arguments($values, $handler);
+    }
+
+    return $values;
+  }
+
+  /**
+   * Replaces values corresponding to argument values set dynamically.
+   */
+  function view_key_replace_arguments($values, &$handler) {
+    foreach ($values as $value) {
+      if (strpos($value, '__arg:') === 0) {
+        // Get the argument and make sure its actually on the view still.
+        $arg_id = drupal_substr($value, drupal_strlen('__arg:'));
+        if (isset($handler->view->argument[$arg_id]) && $handler->view->argument[$arg_id]->argument_validated) {
+          // Argument is there and ready to go!
+          $argument = clone($handler->view->argument[$arg_id]);
+          $arg_value = $argument->get_value();
+          // Might need to split this up.
+          if (!empty($argument->options['break_phrase'])) {
+            views_break_phrase($argument->get_value(), $argument);
+            foreach ($argument->value as $new_val) {
+              $values[$new_val] = $new_val;
+            }
+          }
+          else {
+            $new_val = $argument->get_value();
+            $values[$new_val] = $new_val;
+          }
+        }
+        // Always remove the dummy argument value.
+        unset($values[$value]);
+      }
+    }
+
+    return $values;
+  }
+
+  /**
+   * Returns an array of views arguments that can supply valid key values.
+   *
+   * Plugins can define types of arguments that can optionally be checked for
+   * key values when looking up cache segments.
+   *
+   * @return
+   *   An array of argument handler classes that this plugin supports.
+   */
+  function view_key_from_arguments() {
+    return array();
+  }
+
+  /**
+   * Handy helper method that scans the given view looking for arguments.
+   */
+  function additional_options_for_arguments(&$view) {
+    $options = array();
+
+    $arguments = $view->display_handler->get_handlers('argument');
+
+    if (is_array($arguments)) {
+      foreach ($arguments as $arg_id => $argument) {
+        foreach ($this->view_key_from_arguments() as $class) {
+          if (is_a($argument, $class)) {
+            // This argument can provide us with keys.
+            $options['__arg:' . $arg_id] = t('Value from argument: %title', array('%title' => $argument->ui_name()));
+          }
+        }
+      }
+    }
+
+    return $options;
+  }
+
+  /**
+   * The method by which this plugin's where clause will be combined with others.
+   *
+   * Can either be 'AND' or 'OR' at the moment.
+   */
+  function clause_mode() {
+    return 'AND';
+  }
+}
diff --git a/plugins/views_content_cache/comment.inc b/plugins/views_content_cache/comment.inc
new file mode 100644
index 0000000..40eaed2
--- /dev/null
+++ b/plugins/views_content_cache/comment.inc
@@ -0,0 +1,21 @@
+<?php
+
+class views_content_cache_key_comment extends views_content_cache_key {
+  function options_form($value) {
+    return array(
+      '#title' => t('Comments'),
+      '#description' => t('Checks for new or updated comments'),
+      '#type' => 'checkboxes',
+      '#options' => array(
+        'changed' => t('New or updated comments'),
+      ),
+      '#default_value' => $value,
+    );
+  }
+
+  function content_key($object, $object_type) {
+    if ($object_type === 'comment') {
+      return 'changed';
+    }
+  }
+}
diff --git a/plugins/views_content_cache/node.inc b/plugins/views_content_cache/node.inc
new file mode 100644
index 0000000..155c5c4
--- /dev/null
+++ b/plugins/views_content_cache/node.inc
@@ -0,0 +1,30 @@
+<?php
+
+class views_content_cache_key_node extends views_content_cache_key {
+  function options_form($value, &$handler) {
+    return array(
+      '#title' => t('Node types'),
+      '#description' => t('Checks for new or updated nodes of any of the selected types.'),
+      '#type' => 'checkboxes',
+      '#options' => array_merge(node_type_get_names(), $this->additional_options_for_arguments($handler->view)),
+      '#default_value' => $value,
+      '#weight' => -10,
+    );
+  }
+
+  function content_key($object, $object_type) {
+    if ($object_type === 'node') {
+      return $object->type;
+    }
+    elseif ($object_type === 'comment' && !empty($object['nid']) && ($node = node_load($object['nid']))) {
+      return $node->type;
+    }
+  }
+
+  /**
+   * We support using the node type argument for the view key
+   */
+  function view_key_from_arguments() {
+    return array('views_handler_argument_node_type');
+  }
+}
diff --git a/plugins/views_content_cache/node_only.inc b/plugins/views_content_cache/node_only.inc
new file mode 100644
index 0000000..3ed28c4
--- /dev/null
+++ b/plugins/views_content_cache/node_only.inc
@@ -0,0 +1,21 @@
+<?php
+
+class views_content_cache_key_node_only extends views_content_cache_key {
+  function options_form($value) {
+    return array(
+      '#title' => t('Node only'),
+      '#description' => t('Allows the node segment to be refined to only include main operations create/update/delete. Be careful about combing with other node related segments.'),
+      '#type' => 'checkboxes',
+      '#options' => array(
+        'node_changed' => t('Nodes updated/created/deleted'),
+      ),
+      '#default_value' => $value,
+    );
+  }
+
+  function content_key($object, $object_type) {
+    if ($object_type === 'node') {
+      return 'node_changed';
+    }
+  }
+}
diff --git a/plugins/views_content_cache/og.inc b/plugins/views_content_cache/og.inc
new file mode 100644
index 0000000..2a3be42
--- /dev/null
+++ b/plugins/views_content_cache/og.inc
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * Views content cache plugin for Organic Groups.
+ *
+ * This plugin allows using OG as a cache segment, views caching can depend on
+ * the current group context, and/or all the groups that the current user
+ * belongs to.
+ */
+class views_content_cache_key_og extends views_content_cache_key {
+  function options_form($value, &$handler) {
+    return array(
+      '#title' => t('Organic Groups'),
+      '#description' => t('Checks for updates related to Organic Groups'),
+      '#type' => 'checkboxes',
+      '#options' => array_merge(array(
+        'current' => t('Current group'),
+        'user' => t("Member's groups")
+      ), $this->additional_options_for_arguments($handler->view)),
+      '#default_value' => $value,
+    );
+  }
+
+  function content_key($object, $object_type) {
+    $keys = array();
+    if ($object_type === 'node' && !empty($object->og_groups)) {
+      foreach ($object->og_groups as $gid) {
+        $keys[] = $gid;
+      }
+    }
+    elseif ($object_type === 'comment' && !empty($object['nid']) && ($node = node_load($object['nid'])) && !empty($node->og_groups)) {
+      foreach ($node->og_groups as $gid) {
+        $keys[] = $gid;
+      }
+    }
+    return $keys;
+  }
+
+  function view_key($values, &$handler) {
+    $values = array_filter($values);
+    $groups = array();
+    if (!empty($values['current']) && ($current = og_get_group_context())) {
+      $groups[] = $current->nid;
+    }
+    if (!empty($values['user'])) {
+      global $user;
+      if (!empty($user->og_groups)) {
+        $groups = array_merge($groups, array_keys($user->og_groups));
+      }
+    }
+    unset($values['current'], $values['user']);
+    // Add in the arguments.
+    foreach ($this->view_key_replace_arguments($values, $handler) as $gid) {
+      $groups[] = $gid;
+    }
+    return array_unique($groups);
+  }
+
+  function view_key_from_arguments() {
+    return array('og_views_handler_argument_og_group_nid');
+  }
+}
diff --git a/plugins/views_content_cache/votingapi.inc b/plugins/views_content_cache/votingapi.inc
new file mode 100644
index 0000000..1aa0766
--- /dev/null
+++ b/plugins/views_content_cache/votingapi.inc
@@ -0,0 +1,40 @@
+<?php
+
+class views_content_cache_key_votingapi extends views_content_cache_key {
+
+  function options_form($value) {
+    // Get all of the possible tags that we could monitor:
+    $metadata = votingapi_metadata();
+    $options = array();
+    foreach ($metadata['tags'] as $tag => $data) {
+      $options['tag:' . $tag] = t('Tag: @name', array('@name' => $data['name']));
+    }
+    foreach ($metadata['functions'] as $function => $data) {
+      $options['function:' . $function] = t('Function: @name', array('@name' => $data['name']));
+    }
+
+    return array(
+      '#title' => t('Voting API'),
+      '#description' => t('Checks for updates to votes'),
+      '#type' => 'checkboxes',
+      '#options' => $options,
+      '#default_value' => $value,
+    );
+  }
+
+  function content_key($object, $object_type) {
+    $keys = array();
+    if ($object_type === 'votingapi_results') {
+      foreach ($object as $result) {
+        $keys[] = 'tag:' . $result['tag'];
+        $keys[] = 'function:' . $result['function'];
+      }
+    }
+    return $keys;
+  }
+  
+  function clause_mode() {
+    // We can't be combined with other cache segments:
+    return 'OR';
+  }
+}
diff --git a/plugins/votingapi.inc b/plugins/votingapi.inc
deleted file mode 100644
index 1aa0766..0000000
--- a/plugins/votingapi.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-class views_content_cache_key_votingapi extends views_content_cache_key {
-
-  function options_form($value) {
-    // Get all of the possible tags that we could monitor:
-    $metadata = votingapi_metadata();
-    $options = array();
-    foreach ($metadata['tags'] as $tag => $data) {
-      $options['tag:' . $tag] = t('Tag: @name', array('@name' => $data['name']));
-    }
-    foreach ($metadata['functions'] as $function => $data) {
-      $options['function:' . $function] = t('Function: @name', array('@name' => $data['name']));
-    }
-
-    return array(
-      '#title' => t('Voting API'),
-      '#description' => t('Checks for updates to votes'),
-      '#type' => 'checkboxes',
-      '#options' => $options,
-      '#default_value' => $value,
-    );
-  }
-
-  function content_key($object, $object_type) {
-    $keys = array();
-    if ($object_type === 'votingapi_results') {
-      foreach ($object as $result) {
-        $keys[] = 'tag:' . $result['tag'];
-        $keys[] = 'function:' . $result['function'];
-      }
-    }
-    return $keys;
-  }
-  
-  function clause_mode() {
-    // We can't be combined with other cache segments:
-    return 'OR';
-  }
-}
diff --git a/tests/views_content_cache.test b/tests/views_content_cache.test
index e6b8406..4f72ce9 100644
--- a/tests/views_content_cache.test
+++ b/tests/views_content_cache.test
@@ -13,27 +13,27 @@ class ViewsContentCacheTest extends DrupalWebTestCase {
   /**
    * Test that when a node is added the appropriate cache segment is updated.
    */
-  function testStoryContentAdded() {
-    $cid = array('node' => array('story'));
+  function testarticleContentAdded() {
+    $cid = array('node' => array('article'));
     //$this->verbose(views_content_cache_update_get($cid));
-    $this->assertFalse(views_content_cache_update_get($cid, TRUE), t('Ensure that the no timestamp has been set against the story cache segment.'));
+    $this->assertFalse(views_content_cache_update_get($cid, TRUE), t('Ensure that the no timestamp has been set against the article cache segment.'));
 
-    $timestamp_before = time();
-    $this->node = $this->drupalCreateNode(array('type' => 'story'));
-    $timestamp_after = time();
+    $timestamp_before = REQUEST_TIME;
+    $this->node = $this->drupalCreateNode(array('type' => 'article'));
+    $timestamp_after = REQUEST_TIME;
 
     // Now need to make sure that views content cache recorded the correct time:
-    $cid = array('node' => array('story'));
+    $cid = array('node' => array('article'));
     $updated = views_content_cache_update_get($cid, TRUE);
     $result = ($updated <= $timestamp_after) && ($updated >= $timestamp_before);
-    $this->assertTrue($result, t('Ensure that the timestamp against the story cache segment is updated.'));
+    $this->assertTrue($result, t('Ensure that the timestamp against the article cache segment is updated.'));
 
     // Make sure the page segment was untouched:
     $this->assertFalse(views_content_cache_update_get(array('node' => array('page')), TRUE), t('Ensure that the no timestamp has been set against the page cache segment.'));
   }
 
   /**
-   * Test that when a comment is added to a story the timestamp is recorded.
+   * Test that when a comment is added to a article the timestamp is recorded.
    *
    * We'll create a node and then post a comment on it, making sure that:
    * - The comment segment has no timestamp associated with it before we begin.
@@ -46,11 +46,11 @@ class ViewsContentCacheTest extends DrupalWebTestCase {
     $this->assertFalse(views_content_cache_update_get($cid, TRUE), t('Ensure that the no timestamp has been set against the global comment cache segment.'));
 
     // Create the node we'll be posting against.
-    $this->node = $this->drupalCreateNode(array('type' => 'story'));
+    $this->node = $this->drupalCreateNode(array('type' => 'article'));
 
-    $timestamp_before = time();
+    $timestamp_before = REQUEST_TIME;
     $this->comment = $this->postComment($this->node, $this->randomName(32));
-    $timestamp_after = time();
+    $timestamp_after = REQUEST_TIME;
 
     // Now need to make sure that views content cache recorded the correct time:
     // In the global comment segment.
@@ -59,16 +59,16 @@ class ViewsContentCacheTest extends DrupalWebTestCase {
     $result = ($updated <= $timestamp_after) && ($updated >= $timestamp_before);
     $this->assertTrue($result, t('Ensure that the timestamp against the global comment cache segment is updated.'));
 
-    // In the story node comment segment.
-    $cid = array('node' => array('story'), 'comment' => array('changed'));
+    // In the article node comment segment.
+    $cid = array('node' => array('article'), 'comment' => array('changed'));
     $updated = views_content_cache_update_get($cid, TRUE);
     $result = ($updated <= $timestamp_after) && ($updated >= $timestamp_before);
-    $this->assertTrue($result, t('Ensure that the timestamp against the story node comment cache segment is updated.'));
+    $this->assertTrue($result, t('Ensure that the timestamp against the article node comment cache segment is updated.'));
 
-    // In the story only node comment segment.
-    $cid = array('node' => array('story'), 'node_only' => array('node_changed'));
+    // In the article only node comment segment.
+    $cid = array('node' => array('article'), 'node_only' => array('node_changed'));
     $updated = views_content_cache_update_get($cid, TRUE);
-    $this->assertFalse($updated, t('Ensure that the timestamp against the story only node comment cache segment is not updated.'));
+    $this->assertFalse($updated, t('Ensure that the timestamp against the article only node comment cache segment is not updated.'));
 
     // In the page node comment segment.
     $cid = array('node' => array('page'), 'comment' => array('changed'));
@@ -81,8 +81,8 @@ class ViewsContentCacheTest extends DrupalWebTestCase {
     parent::setUp('views_content_cache', 'ctools', 'views', 'comment');  // Enable any modules required for the test
     // Create and log in our privileged user.
     $this->privileged_user = $this->drupalCreateUser(array(
-      'create story content',
-      'edit own story content',
+      'create article content',
+      'edit own article content',
       ));
     $this->drupalLogin($this->privileged_user);
   }
diff --git a/views/views_content_cache.views.inc b/views/views_content_cache.views.inc
index 2454cd8..9b5c214 100644
--- a/views/views_content_cache.views.inc
+++ b/views/views_content_cache.views.inc
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * Implementation of hook_views_plugins().
+ * Implements hook_views_plugins().
  */
 function views_content_cache_views_plugins() {
   return array(
diff --git a/views/views_content_cache_plugin_cache.inc b/views/views_content_cache_plugin_cache.inc
index de0d2ca..4b72aba 100644
--- a/views/views_content_cache_plugin_cache.inc
+++ b/views/views_content_cache_plugin_cache.inc
@@ -18,8 +18,13 @@ class views_content_cache_plugin_cache extends views_plugin_cache {
     return $options;
   }
 
+  function option_defaults(&$options) {
+    $options['results_max_lifespan'] = 21600;
+    $options['output_max_lifespan'] = 21600;
+  }
+
+
   function options_form(&$form, &$form_state) {
-    parent::options_form($form, $form_state);
     $form['keys'] = array(
       '#title' => t('Cache segments'),
       '#type' => 'fieldset',
@@ -93,14 +98,14 @@ class views_content_cache_plugin_cache extends views_plugin_cache {
 
     // If there's a minimum lifetime, enforce it:
     if ($min_lifespan = $this->options[$type . '_min_lifespan']) {
-      $min_lifespan = time() - $min_lifespan;
+      $min_lifespan = REQUEST_TIME - $min_lifespan;
       $cutoff = min($min_lifespan, $cutoff);
     }
 
     // Only enforce a maximum lifetime if it's been specifically selected:
     if ($max_lifespan = $this->options[$type . '_max_lifespan']) {
       if ($max_lifespan != -1) {
-        $max_lifespan = time() - $max_lifespan;
+        $max_lifespan = REQUEST_TIME - $max_lifespan;
         $cutoff = max($max_lifespan, $cutoff);
       }
     }
@@ -108,21 +113,56 @@ class views_content_cache_plugin_cache extends views_plugin_cache {
   }
 
 
+  /**
+   * An exact duplicate of DatabaseConnection::expandArguments().
+   *
+   * This is not a great solution but about the only one available to us if we
+   * still want VCC to work the way it always has in Drupal 7.
+   */
+  function expand_arguments(&$query, &$args) {
+    // If the placeholder value to insert is an array, assume that we need
+    // to expand it out into a comma-delimited set of placeholders.
+    foreach (array_filter($args, 'is_array') as $key => $data) {
+      $new_keys = array();
+      foreach ($data as $i => $value) {
+        // This assumes that there are no other placeholders that use the same
+        // name.  For example, if the array placeholder is defined as :example
+        // and there is already an :example_2 placeholder, this will generate
+        // a duplicate key.  We do not account for that as the calling code
+        // is already broken if that happens.
+        $new_keys[$key . '_' . $i] = $value;
+      }
+
+      // Update the query with the new placeholders.
+      // preg_replace is necessary to ensure the replacement does not affect
+      // placeholders that start with the same exact text. For example, if the
+      // query contains the placeholders :foo and :foobar, and :foo has an
+      // array of values, using str_replace would affect both placeholders,
+      // but using the following preg_replace would only affect :foo because
+      // it is followed by a non-word character.
+      $query = preg_replace('#' . $key . '\b#', implode(', ', array_keys($new_keys)), $query);
+
+      // Update the args array with the new placeholders.
+      unset($args[$key]);
+      $args += $new_keys;
+
+      $modified = TRUE;
+    }
+  }
+
   function get_results_key() {
     global $user;
 
     if (!isset($this->_results_key)) {
-
-      // This is a fix for the build info not including the actual query run:
-      // See:
-      $execute_info = $this->view->build_info;
-
-      $execute_info['query'] = db_rewrite_sql($execute_info['query'], $this->view->base_table, $this->view->base_field, array('view' => &$this->view));
-      $execute_info['count_query'] = db_rewrite_sql($execute_info['count_query'], $this->view->base_table, $this->view->base_field, array('view' => &$this->view));
-      $replacements = module_invoke_all('views_query_substitutions', $this->view);
-      $execute_info['query'] = str_replace(array_keys($replacements), $replacements, $execute_info['query']);
-      $execute_info['count_query'] = 'SELECT COUNT(*) FROM (' . str_replace(array_keys($replacements), $replacements, $execute_info['count_query']) . ') count_alias';
-      // End generating the execution info.
+      $execute_info = array();
+      foreach (array('query', 'count_query') as $v) {
+        $query = clone($this->view->build_info[$v]);
+        $args = $query->getArguments();
+
+        // For testing.
+        $this->expand_arguments($query, $args);
+        $execute_info[$v] = strtr((string)$query, $args);
+      }
 
       $key_data = array(
         'execute_info' => $execute_info,
diff --git a/views_content_cache.info b/views_content_cache.info
index c7375f0..d3d2bd2 100644
--- a/views_content_cache.info
+++ b/views_content_cache.info
@@ -6,12 +6,16 @@ dependencies[] = views
 dependencies[] = ctools
 
 ; Context plugins
-files[] = plugins/base.inc
-files[] = plugins/comment.inc
-files[] = plugins/node.inc
-files[] = plugins/node_only.inc
-files[] = plugins/og.inc
-files[] = plugins/votingapi.inc
+files[] = plugins/views_content_cache/base.inc
+files[] = plugins/views_content_cache/comment.inc
+files[] = plugins/views_content_cache/node.inc
+files[] = plugins/views_content_cache/node_only.inc
+files[] = plugins/views_content_cache/og.inc
+files[] = plugins/views_content_cache/votingapi.inc
 
 ; Views plugins
-files[] = views/views_content_cache_plugin_cache.inc
\ No newline at end of file
+files[] = views/views_content_cache_plugin_cache.inc
+he.inc
+
+; Tests
+files[] = tests/views_content_cache.test
diff --git a/views_content_cache.install b/views_content_cache.install
index 29537bf..fd66f97 100644
--- a/views_content_cache.install
+++ b/views_content_cache.install
@@ -6,20 +6,9 @@
  */
 
 /**
-* Implementation of hook_schema().
+* Implements hook_schema().
 */
 function views_content_cache_schema() {
-  return views_content_cache_schema_6001();
-}
-
-/**
- * Schema version 6001.
- *
- * We'va added a table here that can store timestamps against various cache
- * segments. These get dynamically mapped to real cache segments, like node type
- * or organic group ID.
- */
-function views_content_cache_schema_6001() {
   $schema = array();
   $schema['views_content_cache'] = array(
     'description' => 'Stores timestamps for various cache segments showing the last time the segment changed.',
@@ -94,13 +83,3 @@ function views_content_cache_schema_6001() {
   return $schema;
 }
 
-/**
- * Update 6001: Create tables for schema version 6001.
- */
-function views_content_cache_update_6001() {
-  $ret = array();
-  foreach (views_content_cache_schema_6001() as $name => $table) {
-    db_create_table($name, $table);
-  }
-  return $ret;
-}
diff --git a/views_content_cache.module b/views_content_cache.module
index de8cd3a..8bbb2bb 100644
--- a/views_content_cache.module
+++ b/views_content_cache.module
@@ -30,14 +30,14 @@ function views_content_cache_node_update($node) {
 }
 
 /**
- * Implements hook_node_insert().
+ * Implements hook_node_delete().
  */
 function views_content_cache_node_delete($node) {
   views_content_cache_update_set($node, 'node');
 }
 
 /**
- * Implements hook_node_insert().
+ * Implements hook_node_revision_delete().
  */
 function views_content_cache_node_revision_delete($node) {
   views_content_cache_update_set($node, 'node');
@@ -112,28 +112,30 @@ function views_content_cache_votingapi_results($cached, $content_type, $content_
  */
 function views_content_cache_update_set($object, $object_type, $timestamp = NULL) {
   $update = FALSE;
-  $timestamp = isset($timestamp) ? $timestamp : time();
+  $timestamp = isset($timestamp) ? $timestamp : REQUEST_TIME;
   if ($cids = views_content_cache_id_generate($object, $object_type)) {
-    dsm($cids);
     foreach ($cids as $cid) {
       if (!empty($cid)) {
         $update = TRUE;
         $mapped = views_content_cache_id_record($cid);
 
-        $delete = db_delete('views_content_cache');
-
         // Remove any update records that match this cid.
+        $where = array();
+        $args = array();
         foreach ($mapped as $key_id => $key_value) {
-          // @todo:
-          // Can't this if/elseif be joined as well?
           if (isset($key_value)) {
-            $delete->condition($key_id, $key_value);
+            $where[] = "{$key_id} = :{$key_id}";
+            $args[":{$key_id}"] = $key_value;
           }
           else {
-            $delete->condition($key_id);
+            $where[] = "{$key_id} IS NULL";
           }
         }
-        $delete->execute();
+
+        if (!empty($where)) {
+          $where = implode(' AND ', $where);
+          db_query("DELETE FROM {views_content_cache} WHERE {$where}", $args);
+        }
 
         $mapped['timestamp'] = $timestamp;
         drupal_write_record('views_content_cache', $mapped);
@@ -161,10 +163,6 @@ function views_content_cache_update_get($cid, $reset = FALSE) {
   if (!isset($cache[$hash]) || $reset) {
     $mapped = views_content_cache_id_record($cid);
 
-    $select = db_select('views_content_cache', 'vcc')
-      ->addField('vcc', 'timestamp')
-      ->orderBy('timestamp', 'DESC');
-
     // Generate the where clause from the cache id.
     $where_query = array(
       '#glue' => 'OR',
@@ -174,20 +172,27 @@ function views_content_cache_update_get($cid, $reset = FALSE) {
     );
     foreach ($mapped as $key_id => $key_value) {
       if (!empty($key_value)) {
-        $select->condition($key_id, $key_value);
+        // Use a simpler syntax for single value wheres:
+        if (count($key_value) == 1) {
+          $where = "{$key_id} = :{$key_id}";
+        }
+        else {
+          $where= "{$key_id} IN :{$key_id}";
+        }
+
         // Work out where the clause should be put in the query array:
         if ('AND' == views_content_cache_and_or_key_get($key_id)) {
           // AND queries go to a sub array of the clause:
           $where_query[0][] = array(
             '#clause' => $where,
-            '#args' => array_values($key_value),
+            '#args' => array(":{$key_id}" => array_values($key_value)),
           );
         }
         else {
           // OR queries go to the base clause:
           $where_query[] = array(
             '#clause' => $where,
-            '#args' => array_values($key_value),
+            '#args' => array(":{$key_id}" => array_values($key_value)),
           );
         }
       }
@@ -196,8 +201,7 @@ function views_content_cache_update_get($cid, $reset = FALSE) {
 
     // If there were arguments in the query, run it.
     if (!empty($built_clause['#args'])) {
-      $select->execute();
-      $cache[$hash] = $select->fetchField();
+      $cache[$hash] = db_query("SELECT timestamp FROM {views_content_cache} WHERE {$built_clause['#clause']} ORDER BY timestamp DESC", $built_clause['#args'])->fetchField();
     }
     else {
       $cache[$hash] = FALSE;
@@ -274,7 +278,7 @@ function views_content_cache_id_record($cid) {
     if ($key_id === 'timestamp') {
       $record[$key_id] = $key_value;
     }
-    else if (isset($map[$key_id]) && $column = $map[$key_id]) {
+    elseif (isset($map[$key_id]) && $column = $map[$key_id]) {
       $record[$column] = $key_value;
     }
   }
@@ -317,7 +321,7 @@ function views_content_cache_id_schema($reset = FALSE) {
       // If the newly generated map and the prior map do not match invalidate
       // all cache update records.
       if (empty($cache->data) || ($map != $cache->data)) {
-        db_truncate('views_content_cache');
+        db_truncate('views_content_cache')->execute();
 
         // This is probably too aggressive. @TODO: See if we can surgically
         // invalidate only views that use VCC.
@@ -392,6 +396,7 @@ function views_content_cache_query_builder($query_array) {
   }
 
   $glue = isset($query_array['#glue']) ? $query_array['#glue'] : 'AND';
+
   // If we are ORing, we need to add some brackets
   return array(
     '#clause' => '(' . implode(" $glue ", $clauses) . ')',
@@ -413,17 +418,28 @@ function views_content_cache_ctools_plugin_api($module, $api) {
 }
 
 /**
- * Implements hook_ctools_plugin_plugins().
+ * Implements hook_ctools_plugin_type().
  */
-function views_content_cache_ctools_plugin_plugins() {
+function views_content_cache_ctools_plugin_type() {
   return array(
-    'cache' => TRUE,
-    'use hooks' => TRUE,
+    'plugins' => array(
+      'cache' => TRUE,
+      'use hooks' => TRUE,
+    ),
   );
 }
 
 /**
- * Implements hook_context_plugins().
+ * Implements hook_ctools_plugin_directory().
+ */
+function views_content_cache_ctools_plugin_directory($owner, $plugin_type) {
+  if ($owner == 'views_content_cache') {
+    return "plugins/$plugin_type";
+  }
+}
+
+/**
+ * Implements hook_views_content_cache_plugins().
  *
  * This is a ctools plugins hook.
  */
