diff --git a/js/jquery.treeTable.js b/js/jquery.treeTable.js
index 847b8f3..e3ff32e 100644
--- a/js/jquery.treeTable.js
+++ b/js/jquery.treeTable.js
@@ -1,4 +1,3 @@
-
 /*
  * jQuery treeTable Plugin 2.3.0
  * http://ludo.cubicphuse.nl/jquery-plugins/treeTable/
@@ -6,20 +5,21 @@
  * Copyright 2010, Ludo van den Boom
  * Dual licensed under the MIT or GPL Version 2 licenses.
  */
-(function($) {
-  // Helps to make options available to all functions
-  // TODO: This gives problems when there are both expandable and non-expandable
-  // trees on a page. The options shouldn't be global to all these instances!
+(function ($) {
+  'use strict';
+  /* Helps to make options available to all functions
+   TODO: This gives problems when there are both expandable and non-expandable
+   trees on a page. The options shouldn't be global to all these instances! */
   var options;
   var defaultPaddingLeft;
 
-  $.fn.treeTable = function(opts) {
+  $.fn.treeTable = function (opts) {
     options = $.extend({}, $.fn.treeTable.defaults, opts);
 
-    return this.each(function() {
-      $(this).addClass("treeTable").find("tbody tr").each(function() {
+    return this.each(function () {
+      $(this).addClass("treeTable").find("tbody tr").each(function () {
         // Initialize root nodes only if possible
-        if(!options.expandable || $(this)[0].className.search(options.childPrefix) == -1) {
+        if (!options.expandable || $(this)[0].className.search(options.childPrefix) === -1) {
           // To optimize performance of indentation, I retrieve the padding-left
           // value of the first root node. This way I only have to call +css+
           // once.
@@ -28,7 +28,8 @@
           }
 
           initialize($(this));
-        } else if(options.initialState == "collapsed") {
+        }
+        else if (options.initialState === "collapsed") {
           this.style.display = "none"; // Performance! $(this).hide() is slow...
         }
       });
@@ -45,11 +46,11 @@
   };
 
   // Recursively hide all node's children in a tree
-  $.fn.collapse = function() {
+  $.fn.collapse = function () {
     $(this).addClass("collapsed");
 
-    childrenOf($(this)).each(function() {
-      if(!$(this).hasClass("collapsed")) {
+    childrenOf($(this)).each(function () {
+      if (!$(this).hasClass("collapsed")) {
         $(this).collapse();
       }
 
@@ -60,13 +61,13 @@
   };
 
   // Recursively show all node's children in a tree
-  $.fn.expand = function() {
+  $.fn.expand = function () {
     $(this).removeClass("collapsed").addClass("expanded");
 
-    childrenOf($(this)).each(function() {
+    childrenOf($(this)).each(function () {
       initialize($(this));
 
-      if($(this).is(".expanded.parent")) {
+      if ($(this).is(".expanded.parent")) {
         $(this).expand();
       }
 
@@ -78,8 +79,8 @@
   };
 
   // Reveal a node by expanding all ancestors
-  $.fn.reveal = function() {
-    $(ancestorsOf($(this)).reverse()).each(function() {
+  $.fn.reveal = function () {
+    $(ancestorsOf($(this)).reverse()).each(function () {
       initialize($(this));
       $(this).expand().show();
     });
@@ -88,11 +89,11 @@
   };
 
   // Add an entire branch to +destination+
-  $.fn.appendBranchTo = function(destination) {
+  $.fn.appendBranchTo = function (destination) {
     var node = $(this);
     var parent = parentOf(node);
 
-    var ancestorNames = $.map(ancestorsOf($(destination)), function(a) { return a.id; });
+    var ancestorNames = $.map(ancestorsOf($(destination)), function (a) { return a.id; });
 
     // Conditions:
     // 1: +node+ should not be inserted in a location in a branch if this would
@@ -101,10 +102,10 @@
     //    same as +node+'s current parent (this last condition prevents +node+
     //    from being moved to the same location where it already is).
     // 3: +node+ should not be inserted as a child of +node+ itself.
-    if($.inArray(node[0].id, ancestorNames) == -1 && (!parent || (destination.id != parent[0].id)) && destination.id != node[0].id) {
+    if ($.inArray(node[0].id, ancestorNames) === -1 && (!parent || (destination.id !== parent[0].id)) && destination.id !== node[0].id) {
       indent(node, ancestorsOf(node).length * options.indent * -1); // Remove indentation
 
-      if(parent) { node.removeClass(options.childPrefix + parent[0].id); }
+      if (parent) { node.removeClass(options.childPrefix + parent[0].id); }
 
       node.addClass(options.childPrefix + destination.id);
       move(node, destination); // Recursively move nodes to new location
@@ -115,15 +116,16 @@
   };
 
   // Add reverse() function from JS Arrays
-  $.fn.reverse = function() {
+  $.fn.reverse = function () {
     return this.pushStack(this.get().reverse(), arguments);
   };
 
   // Toggle an entire branch
-  $.fn.toggleBranch = function() {
-    if($(this).hasClass("collapsed")) {
+  $.fn.toggleBranch = function () {
+    if ($(this).hasClass("collapsed")) {
       $(this).expand();
-    } else {
+    }
+    else {
       $(this).removeClass("expanded").collapse();
     }
 
@@ -134,7 +136,7 @@
 
   function ancestorsOf(node) {
     var ancestors = [];
-    while(node = parentOf(node)) {
+    while (node = parentOf(node)) {
       ancestors[ancestors.length] = node[0];
     }
     return ancestors;
@@ -153,49 +155,49 @@
     var cell = $(node.children("td")[options.treeColumn]);
     cell[0].style.paddingLeft = getPaddingLeft(cell) + value + "px";
 
-    childrenOf(node).each(function() {
+    childrenOf(node).each(function () {
       indent($(this), value);
     });
   };
 
   function initialize(node) {
-    if(!node.hasClass("initialized")) {
+    if (!node.hasClass("initialized")) {
       node.addClass("initialized");
 
       var childNodes = childrenOf(node);
 
-      if(!node.hasClass("parent") && childNodes.length > 0) {
+      if (!node.hasClass("parent") && childNodes.length > 0) {
         node.addClass("parent");
       }
 
-      if(node.hasClass("parent")) {
+      if (node.hasClass("parent")) {
         var cell = $(node.children("td")[options.treeColumn]);
         var padding = getPaddingLeft(cell) + options.indent;
 
-        childNodes.each(function() {
+        childNodes.each(function () {
           $(this).children("td")[options.treeColumn].style.paddingLeft = padding + "px";
         });
 
-        if(options.expandable) {
+        if (options.expandable) {
           cell.prepend('<span style="margin-left: -' + options.indent + 'px; padding-left: ' + options.indent + 'px" class="expander"></span>');
-          $(cell[0].firstChild).click(function() { node.toggleBranch(); });
+          $(cell[0].firstChild).click(function () { node.toggleBranch(); });
 
-          if(options.clickableNodeNames) {
+          if (options.clickableNodeNames) {
             cell[0].style.cursor = "pointer";
-            $(cell).click(function(e) {
+            $(cell).click(function (e) {
               // Don't double-toggle if the click is on the existing expander icon
-              if (e.target.className != 'expander') {
+              if (e.target.className !== 'expander') {
                 node.toggleBranch();
               }
             });
           }
 
           // Check for a class set explicitly by the user, otherwise set the default class
-          if(!(node.hasClass("expanded") || node.hasClass("collapsed"))) {
+          if (!(node.hasClass("expanded") || node.hasClass("collapsed"))) {
             node.addClass(options.initialState);
           }
 
-          if(node.hasClass("expanded")) {
+          if (node.hasClass("expanded")) {
             node.expand();
           }
         }
@@ -205,14 +207,14 @@
 
   function move(node, destination) {
     node.insertAfter(destination);
-    childrenOf(node).reverse().each(function() { move($(this), node[0]); });
+    childrenOf(node).reverse().each(function () { move($(this), node[0]); });
   };
 
   function parentOf(node) {
     var classNames = node[0].className.split(' ');
 
-    for(key in classNames) {
-      if(classNames[key].match(options.childPrefix)) {
+    for (var key in classNames) {
+      if (classNames[key].match(options.childPrefix)) {
         return $(node).siblings("#" + classNames[key].substring(options.childPrefix.length));
       }
     }
diff --git a/js/token.js b/js/token.js
index 8683621..a58e3d8 100644
--- a/js/token.js
+++ b/js/token.js
@@ -1,7 +1,7 @@
 
 (function ($) {
 
-  "use strict";
+  'use strict';
 
   Drupal.behaviors.tokenTree = {
     attach: function (context, settings) {
