diff --git a/hierarchical_select.features.inc b/hierarchical_select.features.inc
index e69932a..ce8a38e 100644
--- a/hierarchical_select.features.inc
+++ b/hierarchical_select.features.inc
@@ -88,6 +88,9 @@ function hierarchical_select_features_revert($module) {
 function hierarchical_select_features_rebuild($module) {
   $configs = module_invoke($module, 'hierarchical_select_default_configs');
   if (!empty($configs)) {
+    // Apply the configuration.
+    require_once(drupal_get_path('module', 'hierarchical_select') .'/includes/common.inc');
+    
     foreach ($configs as $config_id => $config) {
       hierarchical_select_common_config_set($config_id, $config);
     }
diff --git a/includes/common.inc b/includes/common.inc
index 1451721..c3d58b1 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -11,7 +11,8 @@
  * modules to provide their own meaningful defaults.
  *
  * @param $config_id
- *   A config id, typically of the form "module-someid", e.g. "taxonomy-vid".
+ *   A config id, typically of the form "module-someid", e.g.
+ *   "taxonomy-vocab_machine_name".
  * @param $defaults_override
  *   Optionally override the defaults.
  */
diff --git a/modules/hs_taxonomy.install b/modules/hs_taxonomy.install
index 226eddf..94b6c05 100644
--- a/modules/hs_taxonomy.install
+++ b/modules/hs_taxonomy.install
@@ -62,3 +62,25 @@ function hs_taxonomy_update_7300() {
 function hs_taxonomy_update_7301() {
   variable_set('taxonomy_override_selector', TRUE);
 }
+
+/**
+ * Convert Taxonomy vocabulary config IDs to use machine name instead of serial
+ * vocabulary ID.
+ */
+function hs_taxonomy_update_7302() {
+  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'hierarchical_select') . '/includes/common.inc';  
+  
+  $vocabularies = taxonomy_vocabulary_get_names();
+
+  foreach ($vocabularies as $machine_name => $vocabulary) {
+    $old_config_id = "taxonomy-{$vocabulary->vid}";
+    $new_config_id = "taxonomy-{$machine_name}";
+
+    $old_config = variable_get('hs_config_' . $old_config_id, NULL);
+
+    if (!empty($old_config)) {
+      hierarchical_select_common_config_set($new_config_id, $old_config);
+      hierarchical_select_common_config_del($old_config_id);
+    }
+  }
+}
\ No newline at end of file
diff --git a/modules/hs_taxonomy.module b/modules/hs_taxonomy.module
index 2fc3fb4..1d920fe 100644
--- a/modules/hs_taxonomy.module
+++ b/modules/hs_taxonomy.module
@@ -55,7 +55,7 @@ function hs_taxonomy_form_field_ui_widget_type_form_alter(&$form, &$form_state)
       'root_term'                  => NULL,
       'entity_count_for_node_type' => NULL,
     );
-    $config_id = "taxonomy-$vid";
+    $config_id = hs_taxonomy_get_config_id($vocabulary);
     $defaults = array(
       // Enable the save_lineage setting by default if the multiple parents
       // vocabulary option is enabled.
@@ -109,7 +109,7 @@ function hs_taxonomy_form_field_ui_widget_type_form_alter(&$form, &$form_state)
 function hs_taxonomy_field_settings_submit(&$form, &$form_state) {
   $field = field_info_field($form['#field_name']);
   $vocabulary = taxonomy_vocabulary_machine_name_load($field['settings']['allowed_values'][0]['vocabulary']);
-  $config = hierarchical_select_common_config_get("taxonomy-$vocabulary->vid");
+  $config = hs_taxonomy_get_config($vocabulary);
 
   if ($config['dropbox']['status'] || $config['save_lineage']) {
     $field = field_info_field($form['#field_name']);
@@ -132,7 +132,7 @@ function hs_taxonomy_form_field_ui_field_edit_form_alter(&$form, &$form_state) {
     require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'hierarchical_select') . '/includes/common.inc';
 
     $vocabulary = taxonomy_vocabulary_machine_name_load($form['#field']['settings']['allowed_values'][0]['vocabulary']);
-    $config = hierarchical_select_common_config_get("taxonomy-$vocabulary->vid");
+    $config = hs_taxonomy_get_config($vocabulary);
 
     if ($config['dropbox']['status'] || $config['save_lineage']) {
       $form['field']['cardinality']['#disabled'] = TRUE;
@@ -154,9 +154,10 @@ function hs_taxonomy_form_taxonomy_form_term_alter(&$form, &$form_state) {
 
   // Build an appropriate config, that inherits the level_labels settings
   // from the vocabulary's Hierarchical Select config.
-  $vid = $form['#vocabulary']->vid;
+  $vocabulary = $form['#vocabulary'];
+  $vid = $vocabulary->vid;
   module_load_include('inc', 'hierarchical_select', 'includes/common');
-  $vocabulary_config = hierarchical_select_common_config_get("taxonomy-$vid");
+  $vocabulary_config = hierarchical_select_common_config_get(hs_taxonomy_get_config_id($vocabulary));
   $config = array(
     'module' => 'hs_taxonomy',
     'params' => array(
@@ -192,6 +193,43 @@ function hs_taxonomy_form_taxonomy_form_term_alter(&$form, &$form_state) {
   $form['relations']['parent']['#config']['dropbox']['title'] = t('All parent terms');
 }
 
+/**
+ * <p>Implementation of <code>hook_taxonomy_vocabulary_save()</code>.</p>
+ * 
+ * <p>This enables us to rename HS configs appropriately when machine names of
+ * taxonomy vocabularies change.</p>
+ * 
+ * @param stdClass  $vocabulary
+ *                  The vocabulary that is being updated.
+ */
+function hs_taxonomy_taxonomy_vocabulary_update(stdClass $vocabulary) {
+  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'hierarchical_select') . '/includes/common.inc';
+  
+  if (isset($vocabulary->original) && ($vocabulary->machine_name != $vocabulary->original->machine_name)) {
+    $config = hs_taxonomy_get_config($vocabulary->original);
+    
+    if (!empty($config)) {
+      $old_config_id = hs_taxonomy_get_config_id($vocabulary->original);
+      
+      hs_taxonomy_set_config($vocabulary, $config);
+      hierarchical_select_common_config_del($old_config_id);
+    }
+  } 
+}
+
+/**
+ * <p>Implementation of <code>hook_taxonomy_vocabulary_delete()</code>.</p>
+ * 
+ * <p>This enables us to delete HS configs when vocabularies are deleted.</p>
+ * 
+ * @param  stdClass  $vocabulary
+ *                   The vocabulary that is being deleted.
+ */
+function hs_taxonomy_taxonomy_vocabulary_delete(stdClass $vocabulary) {
+  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'hierarchical_select') . '/includes/common.inc';
+  
+  hierarchical_select_common_config_del(hs_taxonomy_get_config_id($vocabulary));
+}
 
 //----------------------------------------------------------------------------
 // FAPI callbacks.
@@ -255,7 +293,7 @@ function hs_taxonomy_field_widget_form(&$form, &$form_state, $field, $instance,
     '#default_value' => $tids,
   );
 
-  hierarchical_select_common_config_apply($element, "taxonomy-$vocabulary->vid");
+  hs_taxonomy_apply_config($element, $vocabulary);
 
   // Append another #process callback that transforms #return_value to the
   // format that Field API/Taxonomy Field expects.
@@ -355,7 +393,7 @@ function hs_taxonomy_field_formatter_prepare_view($entity_type, $entities, $fiel
 
   // Get the config for this field.
   module_load_include('inc', 'hierarchical_select', 'includes/common');
-  $config_id = "taxonomy-$vid";
+  $config_id = hs_taxonomy_get_config_id($vocabulary);
   $config = hierarchical_select_common_config_get($config_id);
   $config += array(
     'module' => 'hs_taxonomy',
@@ -792,8 +830,9 @@ function hs_taxonomy_hierarchical_select_config_info() {
           if ($instance['widget']['type'] == 'taxonomy_hs') {
             $bundles_info = field_info_bundles($entity_type);
             $entity_info = entity_get_info($entity_type);
-            $vocabulary = taxonomy_vocabulary_machine_name_load($field['settings']['allowed_values'][0]['vocabulary']);
-            $config_id = "taxonomy-$vocabulary->vid";
+            $machine_name = $field['settings']['allowed_values'][0]['vocabulary'];
+            $vocabulary = taxonomy_vocabulary_machine_name_load($machine_name);
+            $config_id = hs_taxonomy_get_config_id($vocabulary);
             $config_info[$config_id] = array(
               'config_id'      => $config_id,
               'hierarchy type' => t('Taxonomy'),
@@ -1040,6 +1079,59 @@ function _hs_taxonomy_hierarchical_select_get_tree($vid, $parent = 0, $depth = -
 }
 
 /**
+ * Load the HS taxonomy config for the provided taxonomy vocabulary.
+ * 
+ * @param   stdClass  $vocabulary
+ *                    The vocabulary for which a config will be loaded.
+ * 
+ * @return  array     The config; or, an empty array if the config could not
+ *                    be loaded. 
+ */
+function hs_taxonomy_get_config(stdClass $vocabulary) {
+  return hierarchical_select_common_config_get(hs_taxonomy_get_config_id($vocabulary));
+}
+
+/**
+ * Apply the HS taxonomy config for the provided taxonomy vocabulary to the
+ * provided form element.
+ * 
+ * @param  array     $element
+ *                   The form element.
+ * 
+ * @param  stdClass  $vocabulary
+ *                   The vocabulary for which a config will be applied.
+ */
+function hs_taxonomy_apply_config(array &$element, stdClass $vocabulary) {
+  hierarchical_select_common_config_apply($element, hs_taxonomy_get_config_id($vocabulary));
+}
+
+/**
+ * Store the HS taxonomy config for the provided taxonomy vocabulary.
+ *
+ * @param   stdClass  $vocabulary
+ *                    The vocabulary for which a config will be loaded.
+ *
+ * @return  array     $config
+ *                    The config to set.
+ */
+function hs_taxonomy_set_config(stdClass $vocabulary, array $config) {
+  hierarchical_select_common_config_set(hs_taxonomy_get_config_id($vocabulary), $config);
+}
+
+/**
+ * Return the configuration ID that would be used for the specified taxonomy
+ * vocabulary.
+ * 
+ * @param   stdClass  $vocabulary
+ *                    The vocabulary for which a config ID will be returned.
+ * 
+ * @return  string    The config id for the provided vocabulary.
+ */
+function hs_taxonomy_get_config_id(stdClass $vocabulary) {
+  return "taxonomy-{$vocabulary->machine_name}";
+}
+
+/**
  * Drupal core's taxonomy_term_count_nodes() is buggy. See
  * http://drupal.org/node/144969#comment-843000.
  */
