diff --git a/taxonomy_menu.module b/taxonomy_menu.module
index 87cd626..a853b87 100644
--- a/taxonomy_menu.module
+++ b/taxonomy_menu.module
@@ -70,8 +70,8 @@ function taxonomy_menu_form_alter(&$form, &$form_state, $form_id) {
     );
 
     //get taxonomy menu form options
-    //$form['taxonomy_menu']['options'] = _taxonomy_menu_create_options($form['vid']['#value']);
-    //
+    $form['taxonomy_menu']['options'] = _taxonomy_menu_create_options($form['vid']['#value']);
+    
     //rebuild the menu
     $form['taxonomy_menu']['options']['rebuild'] = array(
       '#type' => 'checkbox',
@@ -88,6 +88,12 @@ function taxonomy_menu_form_alter(&$form, &$form_state, $form_id) {
     $form['#submit'][] = 'taxonomy_menu_vocab_submit';
 
   }
+  elseif ($form_id == "taxonomy_overview_terms") {
+    // add an extra submit handler to sync the rearranged terms with menu
+    // @ TODO: using hook_taxonomy_vocabulary_update is nicer then callback, but gives less info and 
+    //         does not always fire.
+    $form['#submit'][] = 'taxonomy_menu_overview_submit';
+  }
 }
 
 /**
@@ -179,6 +185,30 @@ function taxonomy_menu_vocab_submit($form, &$form_state) {
 }
 
 /**
+ * Submit handler, reacting on taxonomy term overview page
+ */
+function taxonomy_menu_overview_submit(&$form, &$form_state) {
+  // Only sync if taxonomy_menu is enabled for this vocab and the 'sync'
+  // option has been checked.
+  $vid = $form['#vocabulary']->vid;
+  $menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $vid), 0);
+  $sync = variable_get(_taxonomy_menu_build_variable('sync', $vid), 0);
+
+  if ($menu_name && $sync) {
+    // Update all menu items (do not rebuild the menu).
+    $message = _taxonomy_menu_update_link_items($vid);
+
+    // Report status.
+    if (isset($message)) {
+      drupal_set_message($message, 'status');
+    }
+
+    // Rebuild the menu.
+    menu_cache_clear($menu_name);
+  }
+}
+
+/**
  * rebuilds a menu
  *
  * @param $vid
@@ -254,12 +284,11 @@ function _taxonomy_menu_update_link_items($vid) {
  * @param $vid
  */
 function _taxonomy_menu_insert_link_items($vid) {
-  $menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $vid), FALSE);
   // Check to see if we should had a vocab item
   if (variable_get(_taxonomy_menu_build_variable('voc_item', $vid), FALSE)) {
       $args = array(
         'vid' => $vid,
-        'menu_name' => $menu_name,
+        'menu_name' => variable_get(_taxonomy_menu_build_variable('vocab_menu', $vid), FALSE),
       );
       $mlid = taxonomy_menu_handler('insert', $args);
     }
@@ -278,87 +307,32 @@ function taxonomy_menu_taxonomy_vocabulary_delete($vocabulary) {
 }
 
 /**
+ * Implementation of hook_taxonomy_vocabulary_update().
+ */
+// @ TODO: using hook_taxonomy_vocabulary_update is nicer then callback, but gives less info and 
+//         does not always fire.
+//function taxonomy_menu_taxonomy_vocabulary_update($vocabulary) {
+//}
+
+/**
  * Implementation of hook_taxonomy_term_insert($term).
  */
 function taxonomy_menu_taxonomy_term_insert($term) {
-  // only sync if taxonomy_menu is enabled for this vocab and the 'sync'
-  // option has been checked.
-  $menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $term->vid), 0);
-  $sync = variable_get(_taxonomy_menu_build_variable('sync', $term->vid), 0);
-
-  if ($menu_name && $sync) {
-    //we have to pull from the args because using a taxonomy function pulls from the cache
-    $item = array(
-      'term' => $term,
-      'menu_name' => $menu_name,
-    );
-    $message = t('Term %term has been added to taxonomy menu %menu_name.', array('%term' => $term->name, '%menu_name' => $menu_name));
-
-    // Run function.
-    taxonomy_menu_handler('insert', $item);
-    // Report status.
-    drupal_set_message($message, 'status');
-
-    // Rebuild the menu.
-    menu_cache_clear($menu_name);
-  }
+  _taxonomy_menu_taxonomy_termapi_helper($term, 'insert');
 }
 
 /**
  * Implementation of hook_taxonomy_term_update().
  */
 function taxonomy_menu_taxonomy_menu_term_update($term) {
-  // Only sync if taxonomy_menu is enabled for this vocab and the 'sync'
-  // option has been checked.
-  $menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $term->vid), 0);
-  $sync = variable_get(_taxonomy_menu_build_variable('sync', $term->vid), 0);
-
-  if ($menu_name && $sync) {
-    $item = array(
-      'term' => $term,
-      'menu_name' => $menu_name,
-      'mlid' => _taxonomy_menu_get_mlid($term->tid, $term->vid),
-    );
-    $message = t('Term %term has been updated in taxonomy menu %menu_name.', array('%term' => $term->name, '%menu_name' => $menu_name));
-    break;
-
-    // run function
-    taxonomy_menu_handler('update', $item);
-    // report status
-    drupal_set_message($message, 'status');
-
-    // rebuild the menu
-    menu_cache_clear($menu_name);
-  }
+  _taxonomy_menu_taxonomy_termapi_helper($term, 'update');
 }
 
 /**
  * Implementation of hook_taxonomy_term_delete()
  */
 function taxonomy_menu_taxonomy_term_delete($term) {
-      // only sync if taxonomy_menu is enabled for this vocab and the 'sync'
-  // option has been checked.
-  $menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $term->vid), 0);
-  $sync = variable_get(_taxonomy_menu_build_variable('sync', $term->vid), 0);
-
-  if ($menu_name && $sync) {
-    $item = array(
-      'tid' => $term->tid,
-      'vid' => $term->vid,
-      'menu_name' => $menu_name,
-      'term' => $term,
-      'mlid' => _taxonomy_menu_get_mlid($term->tid, $term->vid),
-    );
-    $message = t('Term %term has been deleted from taxonomy menu %menu_name.', array('%term' => $term->name, '%menu_name' => $menu_name));
-
-      // run function
-    taxonomy_menu_handler('delete', $item);
-    // report status
-    drupal_set_message($message, 'status');
-
-    // rebuild the menu
-    menu_cache_clear($menu_name);
-  }
+  _taxonomy_menu_taxonomy_termapi_helper($term, 'delete');
 }
 
 /**
@@ -413,6 +387,48 @@ function taxonomy_menu_node_delete($node) {
 }
 
 /**
+ * Abstraction of hook_taxonomy_term_<operation>()
+ */
+function _taxonomy_menu_taxonomy_termapi_helper($term, $operation) {
+  // Only sync if taxonomy_menu is enabled for this vocab and the 'sync'
+  // option has been checked.
+  $menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $term->vid), 0);
+  $sync = variable_get(_taxonomy_menu_build_variable('sync', $term->vid), 0);
+
+  if ($menu_name && $sync) {
+    $item = array(
+      'tid' => $term->tid,
+      'vid' => $term->vid,
+      'term' => $term,
+      'menu_name' => $menu_name,
+      'mlid' => _taxonomy_menu_get_mlid($term->tid, $term->vid),
+    );
+
+    switch ($operation) {
+      case 'insert':
+        $text = 'Added term %term to taxonomy menu %menu_name.';
+        break;
+      case 'update':
+        $text = 'Updated term %term in taxonomy menu %menu_name.';
+        break;
+      case 'delete':
+        $text = 'Deleted term %term from taxonomy menu %menu_name.';
+        break;
+    }
+    $message = t($text, array('%term' => $term->name, '%menu_name' => $menu_name));
+
+      // run function
+    taxonomy_menu_handler($operation, $item);
+
+    // report status
+    drupal_set_message($message, 'status');
+
+    // rebuild the menu
+    menu_cache_clear($menu_name);
+  }
+}
+
+/**
  * Helper function to
  * @param $tids
  * @param $node
@@ -432,47 +448,35 @@ function _taxonomy_menu_nodeapi_helper($op, $terms = array(), $node) {
     $menu_num = variable_get(_taxonomy_menu_build_variable('display_num', $term->vid), TRUE);
     $hide_empty = variable_get(_taxonomy_menu_build_variable('hide_empty_terms', $term->vid), FALSE);
     if ($menu_name && $vocb_sync && ($menu_num || $hide_empty)) {
+      //build argument array to save menu_item
+      $args = array(
+        'tid' => $term->tid,
+        'vid' => $term->vid,
+        'term' => $term,
+        'menu_name' => $menu_name,
+        'mlid' => _taxonomy_menu_get_mlid($term->tid, $term->vid),
+      );
+
       switch ($op) {
         case 'update':
-          //build argument array to save menu_item
-          $args = array(
-            'tid' => $term->tid,
-            'vid' => $term->vid,
-            'term' => $term,
-            'menu_name' => $menu_name,
-            'mlid' => _taxonomy_menu_get_mlid($term->tid, $term->vid),
-          );
           //since taxonomy_get_term does not return the parents, fetch them now
           $args['term']->parents = _taxonomy_menu_get_parents($term->tid);
           break;
 
         case 'insert':
-          //build argument array to save menu_item
-          $args = array(
-            'tid' => $term->tid,
-            'vid' => $term->vid,
-            'term' => $term,
-            'menu_name' => $menu_name,
-            'mlid' => _taxonomy_menu_get_mlid($term->tid, $term->vid),
-          );
           //since taxonomy_get_term does not return the parents, fetch them now
           $args['term']->parents = _taxonomy_menu_get_parents($term->tid);
           break;
 
         case 'delete':
-          $args = array(
-            'term' => $term,
-            'tid' => $term->tid,
-            'vid' => $term->vid,
-            'menu_name' => $menu_name,
-            'mlid' => _taxonomy_menu_get_mlid($term->tid, $term->vid),
-          );
           /* Turn the op to 'update' here since we really do want to update the item
            * and not delete/recreate it, since the latter will break hierarchy and
            * customizations.
            */
           $op = 'update';
+          break;
       }
+
       taxonomy_menu_handler($op, $args, $node);
     }
   }
@@ -528,6 +532,7 @@ function taxonomy_menu_handler($op, $args = array(), $node = NULL, $item = array
  * standard taxonomy $term object. This is because this function is also
  * called from hook_taxonomy(), which doesn't have a $term object. Rather
  * have one consistent method of passing the data.
+ * @TODO: Update this docu: hook_taxonomy() does not exist in D7
  *
  * @param $item
  *   array with the following key/value pairs:
@@ -578,7 +583,8 @@ function _taxonomy_menu_save($item) {
    if (strpos($split[1], '?') !== FALSE) {
      // the query split didn't work, too many question marks
      // error?
-   } else {
+   } 
+   else {
      $link['options']['query'] = $split[1];
      $link['link_path'] = $split[0];
    }
@@ -615,6 +621,7 @@ function _taxonomy_menu_save($item) {
   if (isset($item['remove']) && $item['remove']) {
     $link['hidden'] = 1;
   }
+
   // Save the menu item
   if ($mlid = menu_link_save($link)) {
     //if inserting a new menu item then insert a record into the table
@@ -696,7 +703,7 @@ function taxonomy_menu_path_default($vid, $tid) {
         }
         if ($tids) {
           $end = implode(' ', $tids);
-          $path .= ' '. $end;
+          $path .= ' ' . $end;
         }
       }
     }
@@ -737,7 +744,6 @@ function taxonomy_menu_taxonomy_menu_delete(&$item) {
  *  The node object.
  */
 function _taxonomy_menu_create_item($args = array(), $node) {
-
   //if tid = 0 then we are creating a vocab item
 
   if (isset($args['tid']) && isset($args['vid']) && $args['tid'] == 0 && variable_get(_taxonomy_menu_build_variable('voc_item', $args['vid']), 0)) {
@@ -759,31 +765,41 @@ function _taxonomy_menu_create_item($args = array(), $node) {
     $term = $args['term'];
   }
 
-  // get the first parent
-  if (is_array($term->parents)) {
-    foreach ($term->parents as $key => $val) {
-      $ptid = $val;
-      break;
+  // Sometimes $term->parents is not set so we find it.
+  if (!isset($term->parent)) {
+    $parents = taxonomy_get_parents($term->tid);
+    foreach ($parents as $index => $parent) {
+      $term->parent = array($index);
     }
   }
-  else {
-    $ptid = $term->parents;
+  if (isset($term->parent)) {
+    if (is_array($term->parent)) {
+      foreach ($term->parent as $parent) {
+        if (!empty($parent)) {
+          $ptid = $parent;
+          break;
+        }
+      }
+    }
+    else {
+      $ptid = $term->parent ? $term->parent : 0;
+    }
   }
 
-  //if ptid is empty, then set it to 0
-  if (empty($ptid)) {
+  // If ptid is empty, then set it to 0
+  if(empty($ptid)) {
     $ptid = 0;
   }
 
   // turn the term into the correct $item array form
   $item = array(
     'tid' => $term->tid,
+    'vid' => $term->vid,
+    'menu_name' => $args['menu_name'],
     'name' => $term->name,
     'description' => $term->description,
     'weight' => $term->weight,
-    'vid' => $term->vid,
     'ptid' => $ptid,
-    'menu_name' => $args['menu_name'],
     'language' => isset($term->language) ? $term->language : ($node ? $node->language : $GLOBALS['language']->language),
   );
 
@@ -844,9 +860,10 @@ function _taxonomy_menu_item($item) {
       }
       $item['name'] .= " ($num)";
     }*/
-  } elseif ($item['tid'] == 0) {
+  } 
+  elseif ($item['tid'] == 0) {
     //if custom name is provided, use that name
-    $custom_name = variable_get(_taxonomy_menu_build_variable('voc_name',$item['vid']), '');
+    $custom_name = variable_get(_taxonomy_menu_build_variable('voc_name', $item['vid']), '');
     if (!empty($custom_name)) {
       $item['name'] = $custom_name;
     }
@@ -917,10 +934,10 @@ function _taxonomy_menu_create_options($vid) {
       $options[$field_name]['#type'] = 'checkbox';
     }
 
-    //set the option feildset values
-    $options['#type'] = 'fieldset';
-    $options['#title'] = t('Options');
-    $options['#collapsible'] = TRUE;
+//    //set the option fieldset values
+//    $options['#type'] = 'fieldset';
+//    $options['#title'] = t('Options');
+//    $options['#collapsible'] = TRUE;
 
     //remove the default value from the array so we don't pass it to the form
     unset($options[$field_name]['default']);
@@ -952,6 +969,7 @@ function taxonomy_menu_taxonomy_menu_options() {
     'default' => TRUE,
   );
 
+/*
   $options['display_num'] = array(
     '#title' => t('Display number of items'),
     '#description' => t('Display the number of items per taxonomy terms. Will not show up for vocabulary menu items.'),
@@ -995,7 +1013,7 @@ function taxonomy_menu_taxonomy_menu_options() {
     'default' => FALSE,
     '#description' => t('This changes tid+tid+tid to "All" in term when <em>Display descendants</em> has been selected.<br />Only used if <em>Menu path type</em> is "Default path".<br />Works with default taxonomy page.'),
   );
-
+*/
   return $options;
 }
 
@@ -1037,14 +1055,14 @@ function taxonomy_menu_translated_menu_link_alter(&$item, $map) {
 
           if ($item['title'] != ($term->name . $display_num)) {
             // Should not happen
-            watchdog('error', t('Menu and taxonomy name mismatch: @title != @name', array('@title' => $item['title'], '@name' => $term->name . $display_num)));
+            watchdog('error', 'Menu and taxonomy name mismatch: @title != @name', array('@title' => $item['title'], '@name' => $term->name . $display_num));
           }
           $item['title'] = $item['link_title'] = i18n_taxonomy_term_name($term) . $display_num;
         }
         // is a vocabulary
         else {
           $vocab = taxonomy_vocabulary_load($t->vid);
-          $item['title'] = i18n_string('taxonomy:vocabulary:'. $vocab->vid .':name', $vocab->name);
+          $item['title'] = i18n_string('taxonomy:vocabulary:' . $vocab->vid . ':name', $vocab->name);
         }
       }
     }
