diff --git a/dev/js/src/state.js b/dev/js/src/state.js
index 69e2d54..7d0d25e 100644
--- a/dev/js/src/state.js
+++ b/dev/js/src/state.js
@@ -12,10 +12,9 @@
  *   can easily be serialized and kept between page turns (via cookie
  *   and/or query param)
  */
+"use strict";
+
 define(function () {
-
-  "use strict";
-
   return {
 
     /**
@@ -25,22 +24,25 @@
       return Object.create(this)._init(value);
     },
 
+
     // Initialize
     _init : function (values) {
-      this._assoc = [];
+      const t = this;
+      t._assoc = [];
       if (values == undefined) {
-        this.values = [false,true];
+        t.values = [false,true];
       }
       else if (Array.isArray(values)) {
-        this.values = values;
+        t.values = values;
       }
       else {
-        this.values = [values];
+        t.values = [values];
       }
-      this.value = this.values[0];
-      return this;
+      t.value = t.values[0];
+      return t;
     },
 
+
     /**
      * Associate the state with some objects.
      */
@@ -55,6 +57,7 @@
       }
     },
 
+
     /**
      * Set the state to a certain value.
      * This will set the state to all associated objects as well.
@@ -66,6 +69,7 @@
       };
     },
 
+
     /**
      * Get the state value
      */
@@ -81,6 +85,7 @@
       return this._assoc.length;
     },
 
+
     /**
      * Clear all associated objects
      */
@@ -88,6 +93,7 @@
       return this._assoc = [];
     },
 
+
     /**
      * Roll to the next value.
      * This may be used for toggling.
diff --git a/dev/js/src/tagger.js b/dev/js/src/tagger.js
index 3aeeb59..afd9de3 100644
--- a/dev/js/src/tagger.js
+++ b/dev/js/src/tagger.js
@@ -1,19 +1,18 @@
-define(['palette','util'], function (p) {
+"use strict";
 
-  // "use strict";
+define(['palette','util'], function (p) {
 
   return {
     create : function (elem) {
-      var obj = Object.create(this);
+      const obj = Object.create(this);
       obj._nr = 0;
       obj._elem = elem;
       elem.addE('div');
-      var newCat = elem.addE('input');
 
+      const newCat = elem.addE('input');
       newCat.setAttribute('type', 'text');
-
       newCat.addEventListener('keypress', function (e) {
-	      var key = e.keyCode || e.which;
+	      const key = e.keyCode || e.which;
 	      if (key === 13) {
 	        obj.addTag(this.value);
 	        this.value = '';
@@ -25,15 +24,12 @@
 
     addTag : function (name) {
       this._cat.push(name);
-
       this._nr++;
 
-      var cat = document.createElement('span');
+      const cat = document.createElement('span');
       cat.addT(name);
       cat.addE('span').setAttribute('class','close');
-
       cat.style.backgroundColor = p.getC(this._nr);
-
       this._elem.firstChild.appendChild(cat);
     }
   };
diff --git a/dev/js/src/util.js b/dev/js/src/util.js
index 5eab4b3..8e40c12 100644
--- a/dev/js/src/util.js
+++ b/dev/js/src/util.js
@@ -27,7 +27,7 @@
 
 // Add toggleClass method similar to jquery
 HTMLElement.prototype.toggleClass = function (c1, c2) {
-  var cl = this.classList;
+  const cl = this.classList;
   if (cl.contains(c1)) {
     cl.add(c2);
     cl.remove(c1);
@@ -78,7 +78,7 @@
  * https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript#8084248
  */
 function randomID (len) {
-  let arr = new Uint8Array((len || 40) / 2)
+  const arr = new Uint8Array((len || 40) / 2)
   window.crypto.getRandomValues(arr)
   return Array.from(arr, _dec2hex).join('')
 };
@@ -96,7 +96,7 @@
   // Add new stylesheet object lazily to document
   KorAP.newStyleSheet = function () {
     if (KorAP._sheet === undefined) {
-      var sElem = document.createElement('style');
+      const sElem = document.createElement('style');
       document.head.appendChild(sElem);
       KorAP._sheet = sElem.sheet;
     };
@@ -106,7 +106,8 @@
 
   // Default log message
   KorAP.log = KorAP.log || function (type, msg, src) {
-    if (src) msg += ' from ' + src;
+    if (src)
+      msg += ' from ' + src;
     console.log(type + ": " + msg);
   };
 
