diff --git a/strongarm.admin.inc b/strongarm.admin.inc
index 32a3831..7a7eaa2 100644
--- a/strongarm.admin.inc
+++ b/strongarm.admin.inc
@@ -14,38 +14,51 @@ function strongarm_admin_form($form_state) {
       // If variable value does not match global $conf, this value has been
       // hardcoded (e.g. in settings.php) and has been allowed to pass
       // through. It cannot be reverted.
+      $hardcoded = FALSE;
+      $restorable = FALSE;
       if ($conf[$name] !== $variable->value) {
         $storage = t('Hardcoded');
         $hardcoded = TRUE;
       }
+      elseif (isset($variable->in_code_only)) {
+        $storage = t('In code');
+        $restorable = TRUE;
+      }
+      elseif ($variable->value != $default->value) {
+        $storage = t('Overridden');
+        $restorable = TRUE;
+      }
       else {
-        $storage = ($variable->value == $default->value) ? t('Default') : t('Overridden');
-        $hardcoded = FALSE;
+        $storage = t('Saved to DB');
       }
 
+      $value = $hardcoded ? $conf[$name] : $variable->value;
+
       // If the variable is in the database and differs from its code value,
       // allow administrator to revert its value.
-      if (!$hardcoded && ($variable->export_type & EXPORT_IN_DATABASE) && ($variable->value != $default->value)) {
+      if ($restorable) {
         $form['revert']['#tree'] = TRUE;
-        $form['revert'][$name] = array('#type' => 'checkbox');
+        $form['revert'][$name]['revert'] = array('#type' => 'checkbox');
+        $form['revert'][$name]['value'] = array('#type' => 'value', '#value' => $default->value);
       }
+
       if (module_exists('variable') && ($info = variable_get_info($name))) {
         $form['name'][$name] = array('#markup' => $info['title'] . '<br/>' . $name);
         $form['storage'][$name] = array('#markup' => $storage);
-        $info['value'] = $variable->value;
-        $form['value'][$name] = array('#markup' => variable_format_value($info));        
+        $info['value'] = $value;
+        $form['value'][$name] = array('#markup' => variable_format_value($info));
       }
       else {
         $form['name'][$name] = array('#markup' => $name);
         $form['storage'][$name] = array('#markup' => $storage);
-        $form['value'][$name] = array('#markup' => check_plain(_strongarm_readable($variable->value)));
+        $form['value'][$name] = array('#markup' => check_plain(_strongarm_readable($value)));
       }
     }
   }
   if (!empty($form['revert'])) {
     $form['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Reset to defaults'),
+      '#value' => t('Restore values to DB'),
       '#submit' => array('strongarm_admin_revert_submit'),
     );
   }
@@ -58,8 +71,8 @@ function strongarm_admin_form($form_state) {
 function strongarm_admin_revert_submit(&$form, &$form_state) {
   if (!empty($form_state['values']['revert'])) {
     foreach ($form_state['values']['revert'] as $name => $revert) {
-      if ($revert) {
-        variable_del($name);
+      if ($revert['revert']) {
+        variable_set($name, $revert['value']);
       }
     }
     strongarm_flush_caches();
@@ -111,7 +124,7 @@ function theme_strongarm_admin_form(&$vars) {
 
   drupal_add_js('misc/tableselect.js');
   $rows = $headers = array();
-  $headers[] = theme('table_select_header_cell');
+  $headers[] = array('class' => array('select-all'));
   $headers[] = t('Variable');
   $headers[] = t('Storage');
   $headers[] = t('Value');
diff --git a/strongarm.drush.inc b/strongarm.drush.inc
new file mode 100644
index 0000000..8d34bed
--- /dev/null
+++ b/strongarm.drush.inc
@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * Implementation of hook_drush_command().
+ */
+function strongarm_drush_command() {
+  $items = array();
+
+  $items['strongarm-revert'] = array(
+    'description' => 'Revert all strongarmed variables from code to the database.',
+    'options' => array(
+      'force' => 'Reset all variables, including those that are marked as already being set to the database.',
+    ),
+    'bootstrap' => 'DRUSH_BOOTSTRAP_DRUPAL_FULL',
+  );
+
+  return $items;
+}
+
+/**
+ * Command callback for strongarm_revert.
+ */
+function drush_strongarm_revert() {
+  _drush_strongarm_revert(drush_get_option('force', FALSE));
+  drush_log('Pushed variables from code to the database.', 'success');
+}
+
+/**
+ * Handle the revert of variables into the database.
+ */
+function _drush_strongarm_revert($force) {
+  global $conf;
+
+  $vars = strongarm_vars_load(TRUE, TRUE);
+  foreach ($vars as $name => $var) {
+    if ($force || isset($var->in_code_only)) {
+      if (!isset($conf[$name]) || $var->value != $conf[$name]) {
+        variable_set($name, $var->value);
+      }
+    }
+  }
+  cache_clear_all('variables', 'cache');
+}
diff --git a/strongarm.module b/strongarm.module
index 990d4c9..95c01bc 100644
--- a/strongarm.module
+++ b/strongarm.module
@@ -1,53 +1,6 @@
 <?php
 
 /**
- * Implements hook_init().
- */
-function strongarm_init() {
-  strongarm_set_conf();
-
-  // This is a workaround for the very early check of the 'site_frontpage'
-  // variable in the Drupal bootstrap process. The workaround re-runs
-  // drupal_path_initialize() to ensure the strongarm'ed version of
-  // 'site_frontpage' is used. Note that this may be too late if other modules
-  // weighted even lower than strongarm (which is a superlightweight -1000)
-  // rely on $_GET['q'] or 'site_frontpage' in hook_init().
-  $_GET['q'] = request_path();
-  drupal_path_initialize();
-}
-
-/**
- * Retrieve variable configuration from the cache.
- */
-function strongarm_set_conf($reset = FALSE) {
-  $varcache = cache_get('variables', 'cache_bootstrap');
-  $cache = cache_get('strongarm', 'cache');
-  // The > comparison here is cautious but ensures that the strongarm cache
-  // actually was populated after the variable cache. It is possible with
-  // >= for the var cache to be populated again during the same stale second.
-  if (!$reset && ($cache && $varcache && $cache->created > $varcache->created)) {
-    $var_conf = $cache->data;
-  }
-  else {
-    $var_conf = array();
-    foreach (strongarm_vars_load(FALSE, TRUE) as $var) {
-      $var_conf[$var->name] = $var->value;
-    }
-    cache_set('strongarm', $var_conf);
-  }
-  global $conf;
-
-  // Store the original variable values. This allows additional calls to
-  // strongarm_set_conf() to properly set Strongarm values.
-  static $original_conf;
-  if (!isset($original_conf)) {
-    $original_conf = $conf;
-  }
-
-  $conf = array_merge($var_conf, $original_conf);
-}
-
-/**
  * Implements hook_menu().
  */
 function strongarm_menu() {
@@ -79,7 +32,7 @@ function strongarm_form_system_module_alter(&$form, &$form_state) {
 function strongarm_theme() {
   return array(
     'strongarm_admin_form' => array(
-      'render element' => 'form', 
+      'render element' => 'form',
       'file' => 'strongarm.admin.inc',
       'path' => drupal_get_path('module', 'strongarm'),
     ),
@@ -155,11 +108,41 @@ function strongarm_vars_load($sorted = TRUE, $reset = FALSE) {
  */
 if (!function_exists('variable_features_revert')) {
   function variable_features_revert($module) {
-    ctools_component_features_revert('variable', $module);
+    $defaults = features_get_default('variable', $module);
+    if (empty($defaults)) {
+      return;
+    }
+
+    $vars = strongarm_vars_load(TRUE, TRUE);
+    foreach ($defaults as $name => $default) {
+      if (isset($default->in_code_only) || ($default->value !== $vars[$name]->value)) {
+        variable_set($name, $default->value);
+      }
+    }
     cache_clear_all('variables', 'cache');
   }
 }
 
+ /**
+ * Implements hook_features_rebuild().
+ * Same as revert, but we only want to force variables only in code into the database
+ */
+function variable_features_rebuild($module) {
+  $defaults = features_get_default('variable', $module);
+  if (empty($defaults)) {
+    return;
+  }
+
+  $vars = strongarm_vars_load(TRUE, TRUE);
+  foreach ($defaults as $name => $default) {
+    if (isset($vars[$name]->in_code_only) || (drupal_installation_attempted() && $vars[$name]->export_type & EXPORT_IN_CODE)) {
+      variable_set($name, $default->value);
+    }
+  }
+
+  cache_clear_all('variables', 'cache');
+}
+
 /**
  * Implements hook_features_pipe_alter() for node component.
  * Add node type variables on behalf of core modules.
