diff --git a/docroot/sites/default/modules/contrib/nodequeue/smartqueue.install b/docroot/sites/default/modules/contrib/nodequeue/smartqueue.install
old mode 100644
new mode 100755
index defde08..281bc32
--- a/docroot/sites/default/modules/contrib/nodequeue/smartqueue.install
+++ b/docroot/sites/default/modules/contrib/nodequeue/smartqueue.install
@@ -24,6 +24,12 @@ function smartqueue_schema() {
         'size' => 'tiny',
         'default' => 0,
       ),
+      'keep_terms_synced' => array(
+        'description' => "Whether queue and term assignment should be kept in sync for nodes.",
+        'type' => 'int',
+        'size' => 'tiny',
+        'default' => 0,
+      ),
     ),
     'primary key' => array('qid'),
   );
@@ -90,3 +96,11 @@ function smartqueue_update_7001() {
       ->execute();
   }
 }
+
+/**
+ * Add the keep_terms_synced field in the {smartqueue} table
+ */
+function smartqueue_update_7003() {
+  $schema = drupal_get_schema('smartqueue');
+  db_add_field('smartqueue', 'keep_terms_synced', $schema['fields']['keep_terms_synced']);
+}
\ No newline at end of file
diff --git a/docroot/sites/default/modules/contrib/nodequeue/smartqueue.module b/docroot/sites/default/modules/contrib/nodequeue/smartqueue.module
old mode 100644
new mode 100755
index e3c134c..f6c0a14
--- a/docroot/sites/default/modules/contrib/nodequeue/smartqueue.module
+++ b/docroot/sites/default/modules/contrib/nodequeue/smartqueue.module
@@ -37,6 +37,13 @@ function smartqueue_taxonomy_nodequeue_form($queue, &$form) {
     '#default_value' => isset($queue->use_parents) ? $queue->use_parents : 0,
   );
 
+  $form['placeholder']['keep_terms_synced'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Keep assigned taxonomy terms and queue assignments in sync'),
+    '#description' => t("When a term is assigned to a node, it will be added to the associated queue automatically, removing a node from a term's subqueue removes the term from the node, etc. When switched off, assigning a term only means the associated queue is available for the node to be placed in."),
+    '#default_value' => isset($queue->keep_terms_synced) ? $queue->keep_terms_synced : 0,
+  );
+
   $form['subqueue_title'] = array(
     '#type' => 'textfield',
     '#title' => t('Subqueue title'),
@@ -58,8 +65,9 @@ function smartqueue_taxonomy_nodequeue_form($queue, &$form) {
  * Implements hook_nodequeue_form_validate().
  */
 function smartqueue_taxonomy_nodequeue_form_validate($queue, &$form_state, &$form) {
+  $field_names = array_keys(array_filter($form_state['values']['taxonomy_fields']));
+  
   if (!isset($queue->qid)) {
-    $field_names = array_keys(array_filter($form_state['values']['taxonomy_fields']));
     if (empty($field_names)) {
       form_error($form['placeholder']['taxonomy_fields'], t('You must select at least one field.'));
     }
@@ -67,6 +75,41 @@ function smartqueue_taxonomy_nodequeue_form_validate($queue, &$form_state, &$for
     // Convert this to our reference.
     form_set_value($form['reference'], implode('-', $field_names), $form_state);
   }
+
+  if($form_state['values']['keep_terms_synced']) {
+    // Check that only one field is selected.
+    // @todo Maybe one vocabulary limitation could be removed. But I don't see how it would be useful.
+    if(count($field_names) > 1) {
+      form_error($form['placeholder']['taxonomy_fields'], t('Only one term reference field is allowed when using sync.'));
+    }
+    else {
+      // Don't perform the next checks if more than one field is selected. It is
+      // a tradeoff between giving the user information about problems as soon
+      // as possible and potentially doing a lot of checks and giving confusing
+      // information (the only relevant error will be for the field that is
+      // eventually picked).
+
+      // Get the selected content types to compare to content type to which the field applies.
+      // @todo: This might potentially be automated. Why would I have to manually sync the node types in two places?
+      $queue_content_types = array_keys(array_filter($form_state['values']['types']));
+
+      // Compare field and queue
+      foreach ($field_names as $field_name) {
+        $instances = field_read_instances(array('field_name' => $field_name, 'entity_type' => 'node'));
+
+        $field_content_types = array();
+        foreach ($instances as $instance) {
+          $field_content_types[] = $instance['bundle'];
+        }
+
+        $in_queue_not_in_field = array_diff($queue_content_types, $field_content_types);
+        $in_field_not_in_queue = array_diff($field_content_types, $queue_content_types);
+        if (count($in_queue_not_in_field) || count($in_field_not_in_queue)) {
+          form_error($form['types'], t('Taxonomy queue %queue can not have different content types assigned to it than field %field_name is available on when assignments should be kept in sync.', array('%queue' => $form_state['values']['title'], '%field_name' => $field_name)));
+        }
+      }
+    }
+  }
 }
 
 /**
@@ -85,6 +128,7 @@ function smartqueue_taxonomy_nodequeue_form_submit_finish($queue, $form_state) {
     db_update('smartqueue')
       ->fields(array(
         'use_parents' => $form_state['values']['use_parents'],
+        'keep_terms_synced' => $form_state['values']['keep_terms_synced'],
       ))
       ->condition('qid', $queue->qid)
       ->execute();
@@ -95,6 +139,7 @@ function smartqueue_taxonomy_nodequeue_form_submit_finish($queue, $form_state) {
       ->fields(array(
         'qid' => $queue->qid,
         'use_parents' => $form_state['values']['use_parents'],
+        'keep_terms_synced' => $form_state['values']['keep_terms_synced'],
       ))
       ->execute();
   }
@@ -172,9 +217,10 @@ function smartqueue_nodequeue_alter(&$data, $type) {
   switch ($type) {
     case 'load_queues':
       $qids = array_keys($data);
-      $result = db_query("SELECT qid, use_parents FROM {smartqueue} WHERE qid IN (:qids)", array(':qids' => $qids));
+      $result = db_query("SELECT qid, use_parents, keep_terms_synced FROM {smartqueue} WHERE qid IN (:qids)", array(':qids' => $qids));
       foreach ($result as $queue) {
         $data[$queue->qid]->use_parents = $queue->use_parents;
+        $data[$queue->qid]->keep_terms_synced = $queue->keep_terms_synced;
       }
       break;
   }
@@ -293,3 +339,108 @@ function smartqueue_taxonomy_get_parents($tids) {
     return array();
   }
 }
+
+/**
+ * Implements hook_node_update()
+ */
+function smartqueue_node_update($node) {
+  // Get all term reference fields for which smartqueues exist
+  $query = db_select('nodequeue_queue', 'q');
+  $query->fields('q');
+
+  // Join in the smartqueue table to select only those queues which need to be
+  // kept in sync
+  $query->innerJoin('smartqueue', 's', 's.qid = q.qid');
+  $query->fields('s', array('use_parents', 'keep_terms_synced'));
+
+  // Join in the types table so we can get only the queues that apply to the
+  // current node type
+  $query->innerJoin('nodequeue_types', 't', 'q.qid = t.qid');
+  $query->condition('t.type', $node->type, '=');
+
+  $queues = $query->execute()->fetchAll(PDO::FETCH_OBJ);
+
+  foreach ($queues as $queue) {
+    // We could have requested all subqueues at once, but then we would not have
+    // known the field name for the parent queue.
+
+    // We know that the fields for the queues potentially have values for this
+    // node, because the node-type matches.
+    $subqueues = nodequeue_load_subqueues_by_queue(array($queue->qid));
+
+    // With the above call we may have missed new terms for which no queue
+    // exists yet. We can retrieve representations for them by also asking for
+    // the queues this node may be added to.
+    $node_subqueues = nodequeue_get_subqueues_by_node(array($queue), $node);
+
+    // Merge the two arrays. We can't use array_merge because we have numeric
+    // keys.
+    foreach ($node_subqueues as $tid => $subqueue) {
+      if (!isset($subqueues[$tid])) {
+        $subqueues[$tid] = $subqueue;
+      }
+    }
+
+
+    $items = field_get_items('node', $node, $queue->reference, $node->language);
+    $tids = array();
+    if ($items) {
+      foreach ($items as $item) {
+        $tids[] = $item['tid'];
+      }
+    }
+
+    // Record the fact we are in node update, we'll check this in our
+    // hook_nodequeue_remove.
+    drupal_static('smartqueue_in_node_update', TRUE);
+    foreach ($subqueues as $subqueue) {
+      if (in_array($subqueue->reference, $tids)) {
+        // Add to queue (or keep in queue)
+        $position = nodequeue_get_subqueue_position($subqueue->sqid, $node->nid);
+        if ($queue->keep_terms_synced && !$position) {
+          nodequeue_subqueue_add($queue, $subqueue, $node->nid);
+        }
+      }
+      else {
+        // Remove from queue (if it was in it)
+        nodequeue_subqueue_remove_node($subqueue->sqid, $node->nid);
+      }
+    }
+  }
+}
+
+/**
+ * Implements hook_node_insert()
+ */
+function smartqueue_node_insert($node) {
+  smartqueue_node_update($node);
+}
+
+/**
+ * Implements hook_nodequeue_remove()
+ *
+ * When node is removed from taxonomy sync queue, remove corresponding term from
+ * node.
+ */
+function smartqueue_nodequeue_remove($sqid, $nid) {
+  // Only do this if we are not already in smartqueue_node_update and thus
+  // removing node from the queue ourselves.
+  if (!drupal_static('smartqueue_in_node_update')) {
+    $subqueue = nodequeue_load_subqueue($sqid, TRUE);
+    $queue = nodequeue_load($subqueue->name);
+
+    if ($queue->keep_terms_synced) {
+      $node = node_load($nid);
+
+      if (field_get_items('node', $node, $queue->reference, $node->language)) {
+        foreach ($node->{$queue->reference}[$node->language] as $key => $value) {
+          if ($value['tid'] == $subqueue->reference) {
+            unset ($node->{$queue->reference}[$node->language][$key]);
+          }
+        }
+
+        node_save($node);
+      }
+    }
+  }
+}
\ No newline at end of file
