diff --git a/xos/core/xoslib/.eslintignore b/xos/core/xoslib/.eslintignore
new file mode 100644
index 0000000..be5c014
--- /dev/null
+++ b/xos/core/xoslib/.eslintignore
@@ -0,0 +1,4 @@
+node_modules/**/*.js
+static/js/xsh/**/*.js
+static/js/vendor/**/*.js
+spec/helpers/*.js
\ No newline at end of file
diff --git a/xos/core/xoslib/.eslintrc b/xos/core/xoslib/.eslintrc
index 211611c..3615cae 100644
--- a/xos/core/xoslib/.eslintrc
+++ b/xos/core/xoslib/.eslintrc
@@ -1,9 +1,9 @@
 {
+  "extends": "defaults/configurations/google",
   "env" : {
     "browser": true
   },
   "rules" : {
-    "quotes": [1, "double"],
     "camelcase": [0],
     "no-underscore-dangle": [0],
     "eqeqeq": [1],
@@ -13,9 +13,15 @@
         "beforeColon": false,
         "afterColon": true
     }],
-    "indent": [2, 4],
-    "valid-jsdoc": 2
+    "valid-jsdoc": 2,
+    "max-len": [1, 120, 4, {"ignoreComments": true, "ignoreUrls": true}],
+    brace-style: [2, "stroustrup"]
   },
   "globals": {
+    "$": false,
+    "_": false,
+    "Backbone": false,
+    "Marionette": false,
+    "xos": false
   }
 }
diff --git a/xos/core/xoslib/package.json b/xos/core/xoslib/package.json
index 831f182..cc23dbf 100644
--- a/xos/core/xoslib/package.json
+++ b/xos/core/xoslib/package.json
@@ -11,13 +11,14 @@
   "author": "",
   "license": "BSD-2-Clause",
   "devDependencies": {
-    "karma": "~0.13.10",
+    "eslint": "~1.6.0",
+    "eslint-config-defaults": "^7.0.1",
     "jasmine-core": "~2.3.4",
-    "karma-jasmine": "~0.3.6",
-    "phantomjs": "~1.9.18",
-    "karma-phantomjs-launcher": "~0.2.1",
-    "karma-mocha-reporter": "~1.1.1",
+    "karma": "~0.13.10",
     "karma-babel-preprocessor": "~5.2.2",
-    "eslint": "~1.6.0"
+    "karma-jasmine": "~0.3.6",
+    "karma-mocha-reporter": "~1.1.1",
+    "karma-phantomjs-launcher": "~0.2.1",
+    "phantomjs": "~1.9.18"
   }
 }
diff --git a/xos/core/xoslib/spec/.eslintrc b/xos/core/xoslib/spec/.eslintrc
index 1fbd34e..eb98f18 100644
--- a/xos/core/xoslib/spec/.eslintrc
+++ b/xos/core/xoslib/spec/.eslintrc
@@ -29,7 +29,9 @@
         "beforeColon": false,
         "afterColon": true
     }],
-    "indent": [2, 2]
+    "indent": [2, 2],
+    "no-undef": [0],
+    "newline-after-var": [0]
   },
   "globals": {
     "console": false,
@@ -41,6 +43,8 @@
     "beforeEach": false,
     "after": false,
     "afterEach": false,
-    "expect": false
+    "expect": false,
+    "jasmine": false,
+    "spyOn": false
   }
 }
diff --git a/xos/core/xoslib/spec/views/helloworld.test.js b/xos/core/xoslib/spec/views/helloworld.test.js
new file mode 100644
index 0000000..1d8ea86
--- /dev/null
+++ b/xos/core/xoslib/spec/views/helloworld.test.js
@@ -0,0 +1,12 @@
+'use strict';
+
+describe('The HelloWorld template', () => {
+
+  beforeEach(() => {
+    spyOn(xos.slices, 'startPolling');
+  });
+
+  xit('should call startPolling method', () => {
+    expect(xos.slices.startPolling).toHaveBeenCalled();
+  });
+});
diff --git a/xos/core/xoslib/spec/xoslib/xos-backbone.test.js b/xos/core/xoslib/spec/xoslib/xos-backbone.test.js
index fa749d3..f14275d 100644
--- a/xos/core/xoslib/spec/xoslib/xos-backbone.test.js
+++ b/xos/core/xoslib/spec/xoslib/xos-backbone.test.js
@@ -1,7 +1,7 @@
 'use strict';
 
 describe('The Xos Backbone', () => {
-  
+
   beforeEach(() => {
     xosdefaults = {
       test: {config: true}
@@ -23,7 +23,7 @@
   });
 
   describe('The extend_defaults method', () => {
-    
+
     it('should return an extended config', () => {
       let extended = extend_defaults('test', {extended: true});
       expect(extended).toEqual({config: true, extended: true});
@@ -37,6 +37,11 @@
   });
 
   describe('getCookie method with no cookie', () => {
+
+    beforeEach(() => {
+      document.cookie = 'fakeCookie=true=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
+    });
+
     it('should return null', () => {
       let res = getCookie('fakeCookie');
       expect(res).toBeNull();
@@ -44,11 +49,11 @@
   });
 
   describe('getCookie method with a fake cookie', () => {
-  
+
     beforeEach(() => {
       document.cookie = 'fakeCookie=true';
     });
-  
+
     it('should return a cookie value', () => {
       let res = getCookie('fakeCookie');
       expect(res).toEqual('true');
@@ -68,18 +73,18 @@
     it('should set the correct url', () => {
       const ctx = {attributes: {resource_uri: 'onlab.us'}};
       let res = model.url.apply(ctx);
-      expect(res).toEqual('onlab.us/?no_hyperlinks=1')
+      expect(res).toEqual('onlab.us/?no_hyperlinks=1');
     });
 
     it('should remove query params', () => {
       const ctx = {attributes: {resource_uri: 'onlab.us?query=params'}};
       let res = model.url.apply(ctx);
-      expect(res).toEqual('onlab.us/?no_hyperlinks=1')
+      expect(res).toEqual('onlab.us/?no_hyperlinks=1');
     });
   });
 
   describe('listMethods method', () => {
-    
+
     const instance = {
       m1: () => {},
       m2: () => {}
@@ -132,7 +137,7 @@
 
     const instance = {
       validators: {'network_ports': ['portspec']}
-    }
+    };
 
     const validAttrs = {network_ports: 'tcp 123'};
 
diff --git a/xos/core/xoslib/spec/xoslib/xos-utils.test.js b/xos/core/xoslib/spec/xoslib/xos-utils.test.js
index ec06768..fd0193e 100644
--- a/xos/core/xoslib/spec/xoslib/xos-utils.test.js
+++ b/xos/core/xoslib/spec/xoslib/xos-utils.test.js
@@ -60,12 +60,12 @@
   describe('The fieldNameToHumanReadable method', () => {
     it('should convert lodash to spaces and apply toTitleCase', () => {
       let res = fieldNameToHumanReadable('tEst_fIelD');
-      expect(res).toEqual('Test Field')
+      expect(res).toEqual('Test Field');
     });
   });
 
   describe('The limitTableRows', () => {
-    
+
     beforeEach(() => {
       f.load('table_rows.html');
     });
@@ -169,8 +169,8 @@
 
     it('should set elements to same width', () => {
       make_same_width('.container', 'div');
-      $('.container div').each(function(){
-        expect($(this)).toHaveCss({width: '400px'});
+      $('.container div').each(function(index, item) {
+        expect($(item)).toHaveCss({width: '400px'});
       });
     });
   });
@@ -218,14 +218,14 @@
     it('should throw an error for malformed separator', () => {
       let res = () => {
         return parse_portlist('tcp+123, tcp+124');
-      }
+      };
       expect(res).toThrow('malformed port specifier tcp+123, format example: "tcp 123, tcp 201:206, udp 333"');
     });
 
     it('should should throw if unknown protocol', () => {
       let res = () => {
         parse_portlist('abc 123');
-      }
+      };
       expect(res).toThrow('unknown protocol abc');
     });
   });
diff --git a/xos/core/xoslib/static/js/gentle.js b/xos/core/xoslib/static/js/gentle.js
index f79bde2..008886a 100644
--- a/xos/core/xoslib/static/js/gentle.js
+++ b/xos/core/xoslib/static/js/gentle.js
@@ -1,49 +1,50 @@
+
 var ContactManager = new Marionette.Application();
 
 ContactManager.addRegions({
-    mainRegion: "#main-region"
+  mainRegion: '#main-region'
 });
 
 ContactManager.Contact = Backbone.Model.extend({});
 
 ContactManager.ContactCollection = Backbone.Collection.extend({
-    model: ContactManager.Contact
+  model: ContactManager.Contact
 });
 
 ContactManager.ContactItemView = Marionette.ItemView.extend({
-    tagName: "li",
-    template: "#contact-list-item"
+  tagName: 'li',
+  template: '#contact-list-item'
 });
 
 ContactManager.ContactsView = Marionette.CollectionView.extend({
-    tagName: "ul",
-    childView: ContactManager.ContactItemView
+  tagName: 'ul',
+  childView: ContactManager.ContactItemView
 });
 
-ContactManager.on("start", function(){
-    var contacts = new ContactManager.ContactCollection([
-        {
-            firstName: "Bob",
-            lastName: "Brigham",
-            phoneNumber: "555-0163"
-        },
-        {
-            firstName: "Alice",
-            lastName: "Arten",
-            phoneNumber: "555-0184"
-        },
-        {
-            firstName: "Charlie",
-            lastName: "Campbell",
-            phoneNumber: "555-0129"
-        }
-    ]);
+ContactManager.on('start', function() {
+  var contacts = new ContactManager.ContactCollection([
+    {
+      firstName: 'Bob',
+      lastName: 'Brigham',
+      phoneNumber: '555-0163'
+    },
+    {
+      firstName: 'Alice',
+      lastName: 'Arten',
+      phoneNumber: '555-0184'
+    },
+    {
+      firstName: 'Charlie',
+      lastName: 'Campbell',
+      phoneNumber: '555-0129'
+    }
+  ]);
 
-    var contactsView = new ContactManager.ContactsView({
-        collection: contacts
-    });
+  var contactsView = new ContactManager.ContactsView({
+    collection: contacts
+  });
 
-    ContactManager.mainRegion.show(contactsView);
+  ContactManager.mainRegion.show(contactsView);
 });
 
 ContactManager.start();
diff --git a/xos/core/xoslib/static/js/helloworld.js b/xos/core/xoslib/static/js/helloworld.js
index 1563094..d34a968 100644
--- a/xos/core/xoslib/static/js/helloworld.js
+++ b/xos/core/xoslib/static/js/helloworld.js
@@ -1,27 +1,38 @@
+/* eslint-disable guard-for-in */
+
 // helloworld.js
 function updateHelloWorldData() {
-    var html = "<table class='table table-bordered table-striped'>";
-    for (var slicekey in xos.slices.models) {
-        slice = xos.slices.models[slicekey]
-        html = html + "<tr><td>" + slice.get("name") + "</td><td>" + slice.get("description") + "</td></tr>";
-    }
-    html = html + "</table>";
-    $('#dynamicTableOfInterestingThings').html(html);
+  var html = '<table class="table table-bordered table-striped">';
+
+  for (var slicekey in xos.slices.models) {
+    var slice = xos.slices.models[slicekey];
+
+    html = html + '<tr><td>' + slice.get('name') + '</td><td>' + slice.get('description') + '</td></tr>';
+  }
+  html = html + '</table>';
+  $('#dynamicTableOfInterestingThings').html(html);
 }
 
-$(document).ready(function(){
-    xos.slices.on("change", function() { updateHelloWorldData(); });
-    xos.slices.on("remove", function() { updateHelloWorldData(); });
-    xos.slices.on("sort", function() { updateHelloWorldData();  });
+$(document).ready(function() {
+  xos.slices.on('change', function() {
+    updateHelloWorldData();
+  });
+  xos.slices.on('remove', function() {
+    updateHelloWorldData();
+  });
+  xos.slices.on('sort', function() {
+    updateHelloWorldData();
+  });
 
-    xos.slices.startPolling();
+  xos.slices.startPolling();
 });
 
 // helloworld.js
 $(document).ready(function() {
-    $('#submitNewDescription').bind('click', function() {
-        newDescription = $("#newDescription").val();
-        xos.slices.models[0].set("description", newDescription);
-        xos.slices.models[0].save();
-    });
+  $('#submitNewDescription').bind('click', function() {
+    var newDescription = $('#newDescription').val();
+
+    xos.slices.models[0].set('description', newDescription);
+    xos.slices.models[0].save();
+  });
 });
diff --git a/xos/core/xoslib/static/js/picker.js b/xos/core/xoslib/static/js/picker.js
index 075bdc5..35b6cd1 100644
--- a/xos/core/xoslib/static/js/picker.js
+++ b/xos/core/xoslib/static/js/picker.js
@@ -1,54 +1,55 @@
-function init_picker(selector, ordered) {
-    //console.log("init_picker");
-    //console.log($(selector));
-
-    var addBtn = $(selector).find(".btn-picker-add");
-    var removeBtn = $(selector).find(".btn-picker-remove");
-    var upBtn = $(selector).find(".btn-picker-up");
-    var downBtn = $(selector).find(".btn-picker-down");
-    var from = $(selector).find(".select-picker-from");
-    var to = $(selector).find(".select-picker-to");
-
-    if (!ordered) {
-        upBtn.hide();
-        downBtn.hide();
-    }
-
-    addBtn.click(function(){
-        console.log("add");
-        from.find(":selected").each( function() {
-            to.append("<option value='"+$(this).val()+"'>"+$(this).text()+"</option>");
-            $(this).remove();
-        });
+function init_picker(selector, ordered) {
+  //console.log("init_picker");
+  //console.log($(selector));
+
+  var addBtn = $(selector).find('.btn-picker-add');
+  var removeBtn = $(selector).find('.btn-picker-remove');
+  var upBtn = $(selector).find('.btn-picker-up');
+  var downBtn = $(selector).find('.btn-picker-down');
+  var from = $(selector).find('.select-picker-from');
+  var to = $(selector).find('.select-picker-to');
+
+  if (!ordered) {
+    upBtn.hide();
+    downBtn.hide();
+  }
+
+  addBtn.click(function() {
+    from.find(':selected').each(function() {
+      to.append('<option value="' + $(this).val() + '"">' + $(this).text() + '</option>');
+      $(this).remove();
     });
-    removeBtn.click(function(){
-        console.log("remove");
-        to.find(":selected").each( function() {
-            from.append("<option value='"+$(this).val()+"'>"+$(this).text()+"</option>");
-            $(this).remove();
-        });
+  });
+  removeBtn.click(function() {
+    to.find(':selected').each(function() {
+      from.append('<option value="' + $(this).val() + '">' + $(this).text() + '</option>');
+      $(this).remove();
     });
-    upBtn.bind('click', function() {
-        to.find(":selected").each( function() {
-            var newPos = to.find('option').index(this) - 1;
-            if (newPos > -1) {
-                to.find("option").eq(newPos).before("<option value='"+$(this).val()+"' selected='selected'>"+$(this).text()+"</option>");
-                $(this).remove();
-            }
-        });
+  });
+  upBtn.bind('click', function() {
+    to.find(':selected').each(function() {
+      var newPos = to.find('option').index(this) - 1;
+
+      if (newPos > -1) {
+        to.find('option').eq(newPos).before('<option value="' + $(this).val() + '" selected="selected">' + $(this).text() + '</option>');
+        $(this).remove();
+      }
     });
-    downBtn.bind('click', function() {
-        var countOptions = to.find("option").size();
-        to.find(":selected").each( function() {
-            var newPos = to.find("option").index(this) + 1;
-            if (newPos < countOptions) {
-                to.find("option").eq(newPos).after("<option value='"+$(this).val()+"' selected='selected'>"+$(this).text()+"</option>");
-                $(this).remove();
-            }
-        });
+  });
+  downBtn.bind('click', function() {
+    var countOptions = to.find('option').size();
+
+    to.find(':selected').each(function() {
+      var newPos = to.find('option').index(this) + 1;
+
+      if (newPos < countOptions) {
+        to.find('option').eq(newPos).after('<option value="' + $(this).val() + '" selected="selected">' + $(this).text() + '</option>');
+        $(this).remove();
+      }
     });
+  });
 };
 
 function init_spinner(selector, value) {
-     var spinner = $(selector).spinner( "value", value);
+  $(selector).spinner('value', value);
 };
diff --git a/xos/core/xoslib/static/js/sliceEditor.js b/xos/core/xoslib/static/js/sliceEditor.js
index c629944..12ed86f 100644
--- a/xos/core/xoslib/static/js/sliceEditor.js
+++ b/xos/core/xoslib/static/js/sliceEditor.js
@@ -1,23 +1,24 @@
-/* This is a demo of using xoslib with Marionette
-
-   The main window is split into two halves. The left half has a CollectionView
-   (SliceListView) that lists all slices the user has access to. The right half
-   has an ItemView (SliceDetailView) that allows the user to edit the
-   name and description of a slice, as well as a <Save> button to save it.
-*/
-
-SliceEditorApp = new Marionette.Application();
-
-SliceEditorApp.addRegions({
-  sliceList: "#sliceEditorList",
-  sliceDetail: "#sliceEditorDetail",
-});
-
-/* SliceListItemView: This is the item view that is used by SliceListView to
-   display slice names.
-*/
-
-SliceEditorApp.SliceListItemView = Marionette.ItemView.extend({
+/* eslint-disable */
+/* This is a demo of using xoslib with Marionette
+
+   The main window is split into two halves. The left half has a CollectionView
+   (SliceListView) that lists all slices the user has access to. The right half
+   has an ItemView (SliceDetailView) that allows the user to edit the
+   name and description of a slice, as well as a <Save> button to save it.
+*/
+
+SliceEditorApp = new Marionette.Application();
+
+SliceEditorApp.addRegions({
+  sliceList: "#sliceEditorList",
+  sliceDetail: "#sliceEditorDetail",
+});
+
+/* SliceListItemView: This is the item view that is used by SliceListView to
+   display slice names.
+*/
+
+SliceEditorApp.SliceListItemView = Marionette.ItemView.extend({
   template: "#sliceeditor-listitem-template",
   tagName: 'li',
   className: 'sliceeditor-listitem',
@@ -47,8 +48,8 @@
 
 /* SliceListView: This displays a list of slice names.
 */
-
-SliceEditorApp.SliceListView = Marionette.CollectionView.extend({
+
+SliceEditorApp.SliceListView = Marionette.CollectionView.extend({
   tagName: "ul",
   childView: SliceEditorApp.SliceListItemView,
 
@@ -95,16 +96,16 @@
         this.dirty = false;
     },
 });
-
-SliceEditorApp.on("start", function() {
-  var sliceListView = new SliceEditorApp.SliceListView({
+
+SliceEditorApp.on("start", function() {
+  var sliceListView = new SliceEditorApp.SliceListView({
     collection: xos.slicesPlus
   });
   SliceEditorApp.sliceList.show(sliceListView);
   xos.slicesPlus.startPolling();
-});
-
-$(document).ready(function(){
-  SliceEditorApp.start();
-});
-
+});
+
+$(document).ready(function(){
+  SliceEditorApp.start();
+});
+/* eslint-enable */
diff --git a/xos/core/xoslib/static/js/sliverListTest.js b/xos/core/xoslib/static/js/sliverListTest.js
index 3a0c1fb..4b60697 100644
--- a/xos/core/xoslib/static/js/sliverListTest.js
+++ b/xos/core/xoslib/static/js/sliverListTest.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
 (function(){
 
 window.InstanceView = Backbone.View.extend({
@@ -144,3 +145,4 @@
     });
 });
 })();
+/* eslint-enable */
diff --git a/xos/core/xoslib/static/js/test.js b/xos/core/xoslib/static/js/test.js
index bb32760..9135134 100644
--- a/xos/core/xoslib/static/js/test.js
+++ b/xos/core/xoslib/static/js/test.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
 TestApp = new XOSApplication();
 
 TestApp.addRegions({
@@ -19,22 +20,22 @@
 });
 
 //TestApp.navigateToDetail = function(detailView) {
-//     $(TestApp.detailBoxId).show();
-//     TestApp.detail.show(detailView);
-//};
-
-TestApp.navigateToModel = function(app, detailClass, detailNavLink, model) {
-
-    var detailView = new detailClass({
-        model: model,
-    });
-
-    $(app.detailBoxId).show();
-    app.detail.show(detailView);
-    detailView.showLinkedItems();
-};
-
-TestApp.on("start", function() {
+//     $(TestApp.detailBoxId).show();
+//     TestApp.detail.show(detailView);
+//};
+
+TestApp.navigateToModel = function(app, detailClass, detailNavLink, model) {
+
+    var detailView = new detailClass({
+        model: model,
+    });
+
+    $(app.detailBoxId).show();
+    app.detail.show(detailView);
+    detailView.showLinkedItems();
+};
+
+TestApp.on("start", function() {
      var objs = ['deployment', 'image', 'networkTemplate', 'network', 'port', 'networkDeployment', 'node', 'service', 'site', 'slice', 'sliceDeployment', 'slicePrivilege', 'instance', 'user', 'sliceRole', 'userDeployment'];
 
      for (var index in objs) {
@@ -46,9 +47,9 @@
          region_name = name + "List";
 
          detailClass = XOSDetailView.extend({
-            template: detail_template,
-            app: TestApp,
-         });
+            template: detail_template,
+            app: TestApp,
+         });
 
          itemViewClass = XOSItemView.extend({
              detailClass: detailClass,
@@ -81,4 +82,4 @@
 $(document).ready(function(){
     TestApp.start();
 });
-
+/* eslint-enable */
diff --git a/xos/core/xoslib/static/js/xosAdminSite.js b/xos/core/xoslib/static/js/xosAdminSite.js
index 13f1d67..78e6f8d 100644
--- a/xos/core/xoslib/static/js/xosAdminSite.js
+++ b/xos/core/xoslib/static/js/xosAdminSite.js
@@ -1,34 +1,35 @@
-OBJS = ['deployment', 'image', 'networkTemplate', 'network', 'port',
-        'node', 'service', 'site', 'slice',  'slicePrivilege', 'instance',
-        'user', 'sliceRole',  'flavor', 'controller', 'siteDeployment',
-        'controller_image', 'controller_network', 'controller_slice', 'controller_user'];
-NAV_OBJS = ['deployment', 'site', 'slice', 'user'];
-
-REWRITES = {"/admin/core/deployment/": "#deployments",
-            "/admin/core/site/" : "#sites",
-            "/admin/core/slice/" : "#slices",
-            "/admin/core/user/" : "#users"};
-
-XOSAdminApp = new XOSApplication({
-    logTableId: "#logTable",
-    statusMsgId: "#statusMsg",
-    hideTabsByDefault: true
-});
-
-XOSAdminApp.addRegions({
-    navigation: "#navigationPanel",
-
-    detail: "#detail",
-    linkedObjs1: "#linkedObjs1",
-    linkedObjs2: "#linkedObjs2",
-    linkedObjs3: "#linkedObjs3",
-    linkedObjs4: "#linkedObjs4",
-
-    addChildDetail: "#xos-addchild-detail",
-
-    rightButtonPanel: "#rightButtonPanel"
-});
-
+/* eslint-disable */
+OBJS = ['deployment', 'image', 'networkTemplate', 'network', 'port',
+        'node', 'service', 'site', 'slice',  'slicePrivilege', 'instance',
+        'user', 'sliceRole',  'flavor', 'controller', 'siteDeployment',
+        'controller_image', 'controller_network', 'controller_slice', 'controller_user'];
+NAV_OBJS = ['deployment', 'site', 'slice', 'user'];
+
+REWRITES = {"/admin/core/deployment/": "#deployments",
+            "/admin/core/site/" : "#sites",
+            "/admin/core/slice/" : "#slices",
+            "/admin/core/user/" : "#users"};
+
+XOSAdminApp = new XOSApplication({
+    logTableId: "#logTable",
+    statusMsgId: "#statusMsg",
+    hideTabsByDefault: true
+});
+
+XOSAdminApp.addRegions({
+    navigation: "#navigationPanel",
+
+    detail: "#detail",
+    linkedObjs1: "#linkedObjs1",
+    linkedObjs2: "#linkedObjs2",
+    linkedObjs3: "#linkedObjs3",
+    linkedObjs4: "#linkedObjs4",
+
+    addChildDetail: "#xos-addchild-detail",
+
+    rightButtonPanel: "#rightButtonPanel"
+});
+
 XOSAdminApp.navigate = function(what, modelName, modelId) {
     console.log("XOSAsminApp.navigate");
     collection_name = modelName + "s";
@@ -82,35 +83,35 @@
      XOSAdminApp["genericListView"] = genericListViewClass;
 
      for (var index in OBJS) {
-         name = OBJS[index];
-         tr_template = '#xosAdmin-' + name + '-listitem-template';
-         table_template = '#xosAdmin-' + name + '-list-template';
-         detail_template = '#xosAdmin-' + name + '-detail-template';
-         add_child_template = '#xosAdmin-' + name + '-add-child-template';
-         collection_name = name + "s";
-         region_name = name + "List";
-
-         if (window["XOSDetailView_" + name]) {
-             detailClass = window["XOSDetailView_" + name].extend({template: "#xos-detail-template",
-                                                                    app: XOSAdminApp});
-         } else {
-             detailClass = genericDetailClass;
-         }
-         if ($(detail_template).length) {
-             detailClass = detailClass.extend({
+         name = OBJS[index];
+         tr_template = '#xosAdmin-' + name + '-listitem-template';
+         table_template = '#xosAdmin-' + name + '-list-template';
+         detail_template = '#xosAdmin-' + name + '-detail-template';
+         add_child_template = '#xosAdmin-' + name + '-add-child-template';
+         collection_name = name + "s";
+         region_name = name + "List";
+
+         if (window["XOSDetailView_" + name]) {
+             detailClass = window["XOSDetailView_" + name].extend({template: "#xos-detail-template",
+                                                                    app: XOSAdminApp});
+         } else {
+             detailClass = genericDetailClass;
+         }
+         if ($(detail_template).length) {
+             detailClass = detailClass.extend({
                 template: detail_template,
              });
          }
          XOSAdminApp[collection_name + "DetailView"] = detailClass;
 
          if (window["XOSDetailView_" + name]) {
-             addClass = window["XOSDetailView_" + name].extend({template: "#xos-add-template",
-                                                                    app: XOSAdminApp});
-         } else {
-             addClass = genericAddChildClass;
-         }
-         if ($(add_child_template).length) {
-             addClass = detailClass.extend({
+             addClass = window["XOSDetailView_" + name].extend({template: "#xos-add-template",
+                                                                    app: XOSAdminApp});
+         } else {
+             addClass = genericAddChildClass;
+         }
+         if ($(add_child_template).length) {
+             addClass = detailClass.extend({
                 template: add_child_template,
              });
          }
@@ -119,30 +120,30 @@
          if ($(tr_template).length) {
              itemViewClass = XOSItemView.extend({
                  template: tr_template,
-                 app: XOSAdminApp,
-             });
-         } else {
-             itemViewClass = genericItemViewClass;
-         }
-
-         if ($(table_template).length) {
-             listViewClass = XOSListView.extend({
-                 childView: itemViewClass,
-                 template: table_template,
-                 collection: xos[collection_name],
-                 title: name + "s",
-                 app: XOSAdminApp,
-             });
-         } else {
-             listViewClass = genericListViewClass.extend( { childView: itemViewClass,
-                                                            collection: xos[collection_name],
-                                                            title: name + "s",
-                                                           } );
-         }
-
-         XOSAdminApp[collection_name + "ListView"] = listViewClass;
-
-         xos[collection_name].fetch(); //startPolling();
+                 app: XOSAdminApp,
+             });
+         } else {
+             itemViewClass = genericItemViewClass;
+         }
+
+         if ($(table_template).length) {
+             listViewClass = XOSListView.extend({
+                 childView: itemViewClass,
+                 template: table_template,
+                 collection: xos[collection_name],
+                 title: name + "s",
+                 app: XOSAdminApp,
+             });
+         } else {
+             listViewClass = genericListViewClass.extend( { childView: itemViewClass,
+                                                            collection: xos[collection_name],
+                                                            title: name + "s",
+                                                           } );
+         }
+
+         XOSAdminApp[collection_name + "ListView"] = listViewClass;
+
+         xos[collection_name].fetch(); //startPolling();
      }
 };
 
@@ -226,22 +227,22 @@
 };
 
 XOSAdminApp.on("start", function() {
-     XOSAdminApp.buildViews();
-
-     XOSAdminApp.initRouter();
-
-     XOSAdminApp.updateNavigationPanel();
-
-     XOSAdminApp.rewriteLinks();
-
-     // fire it once to initially show the progress bar
-     XOSAdminApp.collectionLoadChange();
-
-     // fire it each time the collection load status is updated
-     Backbone.on("xoslib:collectionLoadChange", XOSAdminApp.collectionLoadChange);
-});
-
-$(document).ready(function(){
-    XOSAdminApp.start();
-});
-
+     XOSAdminApp.buildViews();
+
+     XOSAdminApp.initRouter();
+
+     XOSAdminApp.updateNavigationPanel();
+
+     XOSAdminApp.rewriteLinks();
+
+     // fire it once to initially show the progress bar
+     XOSAdminApp.collectionLoadChange();
+
+     // fire it each time the collection load status is updated
+     Backbone.on("xoslib:collectionLoadChange", XOSAdminApp.collectionLoadChange);
+});
+
+$(document).ready(function(){
+    XOSAdminApp.start();
+});
+/* eslint-enable */
diff --git a/xos/core/xoslib/static/js/xosCord.js b/xos/core/xoslib/static/js/xosCord.js
index f666b77..c9be375 100644
--- a/xos/core/xoslib/static/js/xosCord.js
+++ b/xos/core/xoslib/static/js/xosCord.js
@@ -1,25 +1,26 @@
-OBJS = ['cordSubscriber', 'cordUser']
-
-CordAdminApp = new XOSApplication({
-    logTableId: "#logTable",
-    statusMsgId: "#statusMsg",
-    hideTabsByDefault: true
-});
-
-CordAdminApp.addRegions({
-    navigation: "#navigationPanel",
-
-    detail: "#detail",
-    linkedObjs1: "#linkedObjs1",
-    linkedObjs2: "#linkedObjs2",
-    linkedObjs3: "#linkedObjs3",
-    linkedObjs4: "#linkedObjs4",
-
-    addChildDetail: "#xos-addchild-detail",
-
-    rightButtonPanel: "#rightButtonPanel"
-});
-
+/* eslint-disable */
+OBJS = ['cordSubscriber', 'cordUser'];
+
+CordAdminApp = new XOSApplication({
+    logTableId: "#logTable",
+    statusMsgId: "#statusMsg",
+    hideTabsByDefault: true
+});
+
+CordAdminApp.addRegions({
+    navigation: "#navigationPanel",
+
+    detail: "#detail",
+    linkedObjs1: "#linkedObjs1",
+    linkedObjs2: "#linkedObjs2",
+    linkedObjs3: "#linkedObjs3",
+    linkedObjs4: "#linkedObjs4",
+
+    addChildDetail: "#xos-addchild-detail",
+
+    rightButtonPanel: "#rightButtonPanel"
+});
+
 CordAdminApp.navigate = function(what, modelName, modelId) {
     collection_name = modelName + "s";
     if (what=="list") {
@@ -51,36 +52,36 @@
      CordAdminApp["genericListView"] = genericListViewClass;
 
      for (var index in OBJS) {
-         name = OBJS[index];
-         tr_template = '#xosAdmin-' + name + '-listitem-template';
-         table_template = '#xosAdmin-' + name + '-list-template';
-         detail_template = '#xosAdmin-' + name + '-detail-template';
-         add_child_template = '#xosAdmin-' + name + '-add-child-template';
-         collection_name = name + "s";
-         region_name = name + "List";
-         templates = {cordSubscriber: "#xos-cord-subscriber-template"};
-
-         if (window["XOSDetailView_" + name]) {
-             detailClass = window["XOSDetailView_" + name].extend( {template: templates[name] || "#xos-detail-template",
-                                                                    app: CordAdminApp});
-         } else {
-             detailClass = genericDetailClass.extend( {template: templates[name] || "#xos-detail-template", });
-         }
-         if ($(detail_template).length) {
-             detailClass = detailClass.extend({
+         name = OBJS[index];
+         tr_template = '#xosAdmin-' + name + '-listitem-template';
+         table_template = '#xosAdmin-' + name + '-list-template';
+         detail_template = '#xosAdmin-' + name + '-detail-template';
+         add_child_template = '#xosAdmin-' + name + '-add-child-template';
+         collection_name = name + "s";
+         region_name = name + "List";
+         templates = {cordSubscriber: "#xos-cord-subscriber-template"};
+
+         if (window["XOSDetailView_" + name]) {
+             detailClass = window["XOSDetailView_" + name].extend( {template: templates[name] || "#xos-detail-template",
+                                                                    app: CordAdminApp});
+         } else {
+             detailClass = genericDetailClass.extend( {template: templates[name] || "#xos-detail-template", });
+         }
+         if ($(detail_template).length) {
+             detailClass = detailClass.extend({
                 template: detail_template,
              });
          }
          CordAdminApp[collection_name + "DetailView"] = detailClass;
 
          if (window["XOSDetailView_" + name]) {
-             addClass = window["XOSDetailView_" + name].extend({template: "#xos-add-template",
-                                                                    app: CordAdminApp});
-         } else {
-             addClass = genericAddChildClass;
-         }
-         if ($(add_child_template).length) {
-             addClass = detailClass.extend({
+             addClass = window["XOSDetailView_" + name].extend({template: "#xos-add-template",
+                                                                    app: CordAdminApp});
+         } else {
+             addClass = genericAddChildClass;
+         }
+         if ($(add_child_template).length) {
+             addClass = detailClass.extend({
                 template: add_child_template,
              });
          }
@@ -89,30 +90,30 @@
          if ($(tr_template).length) {
              itemViewClass = XOSItemView.extend({
                  template: tr_template,
-                 app: CordAdminApp,
-             });
-         } else {
-             itemViewClass = genericItemViewClass;
-         }
-
-         if ($(table_template).length) {
-             listViewClass = XOSListView.extend({
-                 childView: itemViewClass,
-                 template: table_template,
-                 collection: xos[collection_name],
-                 title: name + "s",
-                 app: CordAdminApp,
-             });
-         } else {
-             listViewClass = genericListViewClass.extend( { childView: itemViewClass,
-                                                            collection: xos[collection_name],
-                                                            title: name + "s",
-                                                           } );
-         }
-
-         CordAdminApp[collection_name + "ListView"] = listViewClass;
-
-         xos[collection_name].fetch(); //startPolling();
+                 app: CordAdminApp,
+             });
+         } else {
+             itemViewClass = genericItemViewClass;
+         }
+
+         if ($(table_template).length) {
+             listViewClass = XOSListView.extend({
+                 childView: itemViewClass,
+                 template: table_template,
+                 collection: xos[collection_name],
+                 title: name + "s",
+                 app: CordAdminApp,
+             });
+         } else {
+             listViewClass = genericListViewClass.extend( { childView: itemViewClass,
+                                                            collection: xos[collection_name],
+                                                            title: name + "s",
+                                                           } );
+         }
+
+         CordAdminApp[collection_name + "ListView"] = listViewClass;
+
+         xos[collection_name].fetch(); //startPolling();
      }
 };
 
@@ -179,18 +180,18 @@
 };
 
 CordAdminApp.on("start", function() {
-     CordAdminApp.buildViews();
-
-     CordAdminApp.initRouter();
-
-     // fire it once to initially show the progress bar
-     CordAdminApp.collectionLoadChange();
-
-     // fire it each time the collection load status is updated
-     Backbone.on("xoslib:collectionLoadChange", CordAdminApp.collectionLoadChange);
-});
-
-$(document).ready(function(){
-    CordAdminApp.start();
-});
-
+     CordAdminApp.buildViews();
+
+     CordAdminApp.initRouter();
+
+     // fire it once to initially show the progress bar
+     CordAdminApp.collectionLoadChange();
+
+     // fire it each time the collection load status is updated
+     Backbone.on("xoslib:collectionLoadChange", CordAdminApp.collectionLoadChange);
+});
+
+$(document).ready(function(){
+    CordAdminApp.start();
+});
+/* eslint-enable */
diff --git a/xos/core/xoslib/static/js/xosDeveloper.js b/xos/core/xoslib/static/js/xosDeveloper.js
index aef640e..e4e5afb 100644
--- a/xos/core/xoslib/static/js/xosDeveloper.js
+++ b/xos/core/xoslib/static/js/xosDeveloper.js
@@ -1,62 +1,64 @@
-/* This is an example that uses xoslib + marionette to display the developer
-   view.
+/* eslint-disable guard-for-in, no-undef*/
+/* This is an example that uses xoslib + marionette to display the developer
+   view.
 
-   For an example that uses xoslib + datatables, see xosDeveloper_datatables.js
-*/
+   For an example that uses xoslib + datatables, see xosDeveloper_datatables.js
+*/
 
-DeveloperApp = new Marionette.Application();
+DeveloperApp = new Marionette.Application();
 
 DeveloperApp.addRegions({
-  mainRegion: "#developerView"
-});
-
-DeveloperApp.SliceDetailView = Marionette.ItemView.extend({
-  template: "#developer-slicedetail-template",
+  mainRegion: '#developerView'
+});
+
+DeveloperApp.SliceDetailView = Marionette.ItemView.extend({
+  template: '#developer-slicedetail-template',
   tagName: 'tr',
   className: 'developer_slicedetail'
-});
-
-DeveloperApp.SliceListView = Marionette.CompositeView.extend({
-  tagName: "table",
-  className: "table table-bordered table-striped",
-  template: "#developer-slicetable-template",
-  childView: DeveloperApp.SliceDetailView,
-  childViewContainer: "tbody",
+});
 
-  events: {"click .sort": "changeSort"},
+DeveloperApp.SliceListView = Marionette.CompositeView.extend({
+  tagName: 'table',
+  className: 'table table-bordered table-striped',
+  template: '#developer-slicetable-template',
+  childView: DeveloperApp.SliceDetailView,
+  childViewContainer: 'tbody',
+
+  events: {'click .sort': 'changeSort'},
 
   initialize: function() {
-      this.listenTo(this.collection, 'change', this._renderChildren);
+    this.listenTo(this.collection, 'change', this._renderChildren);
   },
 
   changeSort: function(e) {
-      parts=$(e.currentTarget).attr("id").split('-');
-      order=parts[1];
-      fieldName=parts[2];
-      this.collection.sortVar = fieldName;
-      this.collection.sortOrder = order;
-      this.collection.sort();
+    parts = $(e.currentTarget).attr('id').split('-');
+    order = parts[1];
+    fieldName = parts[2];
+    this.collection.sortVar = fieldName;
+    this.collection.sortOrder = order;
+    this.collection.sort();
   },
 
   attachHtml: function(compositeView, childView, index) {
-      // The REST API will let admin users see everything. For the developer
-      // view we still want to hide slices we are not members of.
-      if (childView.model.get("sliceInfo").roles.length == 0) {
-          return;
-      }
-      DeveloperApp.SliceListView.__super__.attachHtml(compositeView, childView, index);
+    // The REST API will let admin users see everything. For the developer
+    // view we still want to hide slices we are not members of.
+    if(childView.model.get('sliceInfo').roles.length == 0) {
+      return;
+    }
+    DeveloperApp.SliceListView.__super__.attachHtml(compositeView, childView, index);
   },
 });
-
-DeveloperApp.on("start", function() {
-  var developerSliceListView = new DeveloperApp.SliceListView({
+
+DeveloperApp.on('start', function() {
+  var developerSliceListView = new DeveloperApp.SliceListView({
     collection: xos.slicesPlus
   });
+
   DeveloperApp.mainRegion.show(developerSliceListView);
   xos.slicesPlus.startPolling();
-});
-
-$(document).ready(function(){
-  DeveloperApp.start();
-});
-
+});
+
+$(document).ready(function() {
+  DeveloperApp.start();
+});
+
diff --git a/xos/core/xoslib/static/js/xosDeveloper_datatables.js b/xos/core/xoslib/static/js/xosDeveloper_datatables.js
index ed88a9f..fc0153b 100644
--- a/xos/core/xoslib/static/js/xosDeveloper_datatables.js
+++ b/xos/core/xoslib/static/js/xosDeveloper_datatables.js
@@ -1,50 +1,62 @@
+/* eslint-disable guard-for-in, no-undef, indent*/
+
+// TODO write test and then fix lint errors
+
 /* This is an example that uses xoslib + datatables to display the developer
-   view.
-
-   For an example that uses xoslib + marionette, see xosDeveloper.js
-*/
-
-function updateSliceTable(data) {
-    $('#developerView').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="dynamicusersliceinfo"></table>' );
+   view.
+
+   For an example that uses xoslib + marionette, see xosDeveloper.js
+*/
+
+function updateSliceTable(data) {
+    $('#developerView').html('<table cellpadding="0" cellspacing="0" border="0" class="display" id="dynamicusersliceinfo"></table>');
     var actualEntries = [];
 
     for (rowkey in data.models) {
         row = data.models[rowkey];
-        slicename = row.get("name");
-        sliceid = row.get("id");
-        role = row.get("sliceInfo").roles[0] || "";
-        instancecount = row.get("sliceInfo").instanceCount;
-        sitecount = row.get("sliceInfo").siteCount;
-        backendHtml = row.get("backendHtml")
+        slicename = row.get('name');
+        sliceid = row.get('id');
+        role = row.get('sliceInfo').roles[0] || '';
+        instancecount = row.get('sliceInfo').instanceCount;
+        sitecount = row.get('sliceInfo').siteCount;
+        backendHtml = row.get('backendHtml');
 
         //if (! role) {
         //    continue;
         //}
 
-        if (! row.get("current_user_can_see") ) {
+        if (! row.get('current_user_can_see')) {
             continue;
         }
 
-        actualEntries.push([backendHtml + ' <a href="/admin/core/slice/' + sliceid + '">' + slicename + '</a>',
-                            role, instancecount, sitecount]);
+        actualEntries.push([backendHtml +
+            ' <a href="/admin/core/slice/' + sliceid + '">' +
+            slicename + '</a>',
+            role, instancecount, sitecount]);
     }
-    oTable = $('#dynamicusersliceinfo').dataTable( {
-        "bJQueryUI": true,
-        "aaData":  actualEntries ,
-        "bStateSave": true,
-        "aoColumns": [
-            { "sTitle": "Slice" },
-            { "sTitle": "Privilege" , sClass: "alignCenter"},
-            { "sTitle": "Number of Instances" , sClass: "alignCenter"},
-            { "sTitle": "Number of Sites" , sClass: "alignCenter"},
+    oTable = $('#dynamicusersliceinfo').dataTable({
+        'bJQueryUI': true,
+        'aaData': actualEntries,
+        'bStateSave': true,
+        'aoColumns': [
+            {'sTitle': 'Slice'},
+            {'sTitle': 'Privilege' , sClass: 'alignCenter'},
+            {'sTitle': 'Number of Instances' , sClass: 'alignCenter'},
+            {'sTitle': 'Number of Sites' , sClass: 'alignCenter'},
         ]
-    } );
+    });
 }
 
-$(document).ready(function(){
-    xos.slicesPlus.on("change", function() { /*console.log("change");*/ updateSliceTable(xos.slicesPlus); });
-    xos.slicesPlus.on("remove", function() { /*console.log("sort");*/ updateSliceTable(xos.slicesPlus); });
-    xos.slicesPlus.on("sort", function() { /*console.log("sort");*/ updateSliceTable(xos.slicesPlus); });
+$(document).ready(function() {
+    xos.slicesPlus.on('change', function() {
+        updateSliceTable(xos.slicesPlus);
+    });
+    xos.slicesPlus.on('remove', function() {
+        updateSliceTable(xos.slicesPlus);
+    });
+    xos.slicesPlus.on('sort', function() {
+        updateSliceTable(xos.slicesPlus);
+    });
 
     xos.slicesPlus.startPolling();
 });
diff --git a/xos/core/xoslib/static/js/xosHpc.js b/xos/core/xoslib/static/js/xosHpc.js
index a87fdd1..e0b0437 100644
--- a/xos/core/xoslib/static/js/xosHpc.js
+++ b/xos/core/xoslib/static/js/xosHpc.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
 SC_RR = 60;
 SC_HPC_PROBE = 600;
 SC_HPC_FETCH = 3600;
@@ -101,5 +102,4 @@
 
     xos.hpcview.startPolling();
 });
-
-
+/* eslint-enable */
diff --git a/xos/core/xoslib/static/js/xosHpcNodes.js b/xos/core/xoslib/static/js/xosHpcNodes.js
index 729e167..850aeca 100644
--- a/xos/core/xoslib/static/js/xosHpcNodes.js
+++ b/xos/core/xoslib/static/js/xosHpcNodes.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
 SC_HPC_FETCH = 3600;
 
 var hpc_data = null;
@@ -104,5 +105,5 @@
 
     xos.hpcview.startPolling();
 });
-
+/* eslint-enable */
 
diff --git a/xos/core/xoslib/static/js/xosHpcUrls.js b/xos/core/xoslib/static/js/xosHpcUrls.js
index 3a8cfe0..cda7b2d 100644
--- a/xos/core/xoslib/static/js/xosHpcUrls.js
+++ b/xos/core/xoslib/static/js/xosHpcUrls.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
 SC_HPC_FETCH = 3600;
 
 var hpc_data = null;
@@ -88,4 +89,4 @@
     xos.hpcview.startPolling();
 });
 
-
+/* eslint-enable */
diff --git a/xos/core/xoslib/static/js/xosTenant.js b/xos/core/xoslib/static/js/xosTenant.js
index 414cb48..d2a3b4e 100644
--- a/xos/core/xoslib/static/js/xosTenant.js
+++ b/xos/core/xoslib/static/js/xosTenant.js
@@ -1,152 +1,154 @@
-XOSTenantSite = XOSModel.extend( {
-    listFields: ["name", "allocated"],
-    modelName: "tenantSite",
-    collectionName: "tenantSites"
-});
-
-XOSTenantSiteCollection = XOSCollection.extend( {
-    listFields: ["name", "allocated", "ready"],
-    modelName: "tenantSite",
-    collectionName: "tenantSites",
-
-    getFromSlice: function(slice) {
-        var tenantSites = [];
-        var id = 0;
-        for (siteName in slice.attributes.site_allocation) {
-            allocated = slice.attributes.site_allocation[siteName];
-            ready = slice.attributes.site_ready[siteName] || 0;
-            tenantSites.push(new XOSTenantSite( { name: siteName, allocated: allocated, ready: ready, id: id} ));
-            id = id + 1;
-        }
-        for (index in xos.tenantview.models[0].attributes.blessed_site_names) {
-            siteName = xos.tenantview.models[0].attributes.blessed_site_names[index];
-            if (! (siteName in slice.attributes.site_allocation)) {
-                tenantSites.push(new XOSTenantSite( { name: siteName, allocated: 0, ready: 0, id: id} ));
-                id = id + 1;
-            }
-        }
-        this.set(tenantSites);
-
-        var that=this;
-        this.listenTo(slice, 'change', function() { that.getReadyFromSlice(slice); })
-    },
-
-    getReadyFromSlice: function(slice) {
-        for (siteName in slice.attributes.site_ready) {
-            ready = slice.attributes.site_ready[siteName];
-            for (index in this.models) {
-                tenantSite = this.models[index];
-                if (tenantSite.attributes.name == siteName) {
-                    tenantSite.set("ready", ready);
-                }
-            }
-        }
-    },
-
-    putToSlice: function(slice) {
-        slice.attributes.site_allocation = {};
-        for (index in this.models) {
-            var model = this.models[index];
-            slice.attributes.site_allocation[ model.attributes.name ] = model.attributes.allocated;
-        }
-    },
-});
-
-XOSEditUsersView = Marionette.ItemView.extend({
-            template: "#tenant-edit-users",
-            viewInitializers: [],
-
-            onShow: function() {
-                _.each(this.viewInitializers, function(initializer) {
-                    initializer();
-                });
-            },
-
-            templateHelpers: function() { return { detailView: this, model: this.model }; },
-
-            });
-
-XOSTenantSummaryView = XOSDetailView.extend({
-            events: {"change": "onChange"},
-
-            onChange: function(e) {
-                XOSTenantApp.setDirty(true);
-            },
-
-            saveSuccess: function() {
-                console.log("saveSuccess!");
-                XOSTenantApp.setDirty(false);
-            },
-
-            });
-
-
-XOSTenantButtonView = Marionette.ItemView.extend({
-            template: "#xos-tenant-buttons-template",
-
-            events: {"click button.btn-tenant-create": "createClicked",
-                     "click button.btn-tenant-delete": "deleteClicked",
-                     "click button.btn-tenant-add-user": "addUserClicked",
-                     "click button.btn-tenant-save": "saveClicked",
-                     "click button.btn-tenant-download-ssh": "downloadClicked",
-                     },
-
-            createClicked: function(e) {
-                     XOSTenantApp.addSlice();
-                     },
-
-            deleteClicked: function(e) {
-                     XOSTenantApp.deleteSlice(this.options.linkedView.model);
-                     },
-
-            addUserClicked: function(e) {
-                     XOSTenantApp.editUsers(this.options.linkedView.model);
-                     },
-
-            downloadClicked: function(e) {
-                     XOSTenantApp.downloadSSH(this.options.linkedView.model);
-                     },
-
-            saveClicked: function(e) {
-                     model = this.options.linkedView.model;
-                     model.tenantSiteCollection.putToSlice(model);
-                     model.attributes.users = model.usersBuffer;
-
-                     e.preventDefault();
-                     this.options.linkedView.save();
-                     //this.options.linkedView.submitContinueClicked.call(this.options.linkedView, e);
-                     //XOSTenantApp.setDirty(false);
-                     },
-            });
-
-XOSTenantApp = new XOSApplication({
-    logTableId: "#logTable",
-    statusMsgId: "#statusMsg",
-    hideTabsByDefault: true,
-    dirty: false,
-    varName: "XOSTenantApp",
-});
-
-XOSTenantApp.addRegions({
-    tenantSliceSelector: "#tenantSliceSelector",
-    tenantSummary: "#tenantSummary",
-    tenantSiteList: "#tenantSiteList",
-    tenantButtons: "#tenantButtons",
-    tenantAddSliceInterior: "#tenant-addslice-interior",
-    tenantEditUsersInterior: "#tenant-edit-users-interior",
-    tenantSSHCommandsInterior: "#tenant-ssh-commands-interior",
-});
-
-XOSTenantApp.setDirty = function(dirty) {
-    XOSTenantApp.dirty = dirty;
-    if (dirty) {
-        $("button.btn-tenant-save").addClass("btn-success");
-    } else {
-        $("button.btn-tenant-save").removeClass("btn-success");
-    }
-};
-
-XOSTenantApp.buildViews = function() {
+/* eslint-disable */
+
+XOSTenantSite = XOSModel.extend( {
+    listFields: ["name", "allocated"],
+    modelName: "tenantSite",
+    collectionName: "tenantSites"
+});
+
+XOSTenantSiteCollection = XOSCollection.extend( {
+    listFields: ["name", "allocated", "ready"],
+    modelName: "tenantSite",
+    collectionName: "tenantSites",
+
+    getFromSlice: function(slice) {
+        var tenantSites = [];
+        var id = 0;
+        for (siteName in slice.attributes.site_allocation) {
+            allocated = slice.attributes.site_allocation[siteName];
+            ready = slice.attributes.site_ready[siteName] || 0;
+            tenantSites.push(new XOSTenantSite( { name: siteName, allocated: allocated, ready: ready, id: id} ));
+            id = id + 1;
+        }
+        for (index in xos.tenantview.models[0].attributes.blessed_site_names) {
+            siteName = xos.tenantview.models[0].attributes.blessed_site_names[index];
+            if (! (siteName in slice.attributes.site_allocation)) {
+                tenantSites.push(new XOSTenantSite( { name: siteName, allocated: 0, ready: 0, id: id} ));
+                id = id + 1;
+            }
+        }
+        this.set(tenantSites);
+
+        var that=this;
+        this.listenTo(slice, 'change', function() { that.getReadyFromSlice(slice); })
+    },
+
+    getReadyFromSlice: function(slice) {
+        for (siteName in slice.attributes.site_ready) {
+            ready = slice.attributes.site_ready[siteName];
+            for (index in this.models) {
+                tenantSite = this.models[index];
+                if (tenantSite.attributes.name == siteName) {
+                    tenantSite.set("ready", ready);
+                }
+            }
+        }
+    },
+
+    putToSlice: function(slice) {
+        slice.attributes.site_allocation = {};
+        for (index in this.models) {
+            var model = this.models[index];
+            slice.attributes.site_allocation[ model.attributes.name ] = model.attributes.allocated;
+        }
+    },
+});
+
+XOSEditUsersView = Marionette.ItemView.extend({
+            template: "#tenant-edit-users",
+            viewInitializers: [],
+
+            onShow: function() {
+                _.each(this.viewInitializers, function(initializer) {
+                    initializer();
+                });
+            },
+
+            templateHelpers: function() { return { detailView: this, model: this.model }; },
+
+            });
+
+XOSTenantSummaryView = XOSDetailView.extend({
+            events: {"change": "onChange"},
+
+            onChange: function(e) {
+                XOSTenantApp.setDirty(true);
+            },
+
+            saveSuccess: function() {
+                console.log("saveSuccess!");
+                XOSTenantApp.setDirty(false);
+            },
+
+            });
+
+
+XOSTenantButtonView = Marionette.ItemView.extend({
+            template: "#xos-tenant-buttons-template",
+
+            events: {"click button.btn-tenant-create": "createClicked",
+                     "click button.btn-tenant-delete": "deleteClicked",
+                     "click button.btn-tenant-add-user": "addUserClicked",
+                     "click button.btn-tenant-save": "saveClicked",
+                     "click button.btn-tenant-download-ssh": "downloadClicked",
+                     },
+
+            createClicked: function(e) {
+                     XOSTenantApp.addSlice();
+                     },
+
+            deleteClicked: function(e) {
+                     XOSTenantApp.deleteSlice(this.options.linkedView.model);
+                     },
+
+            addUserClicked: function(e) {
+                     XOSTenantApp.editUsers(this.options.linkedView.model);
+                     },
+
+            downloadClicked: function(e) {
+                     XOSTenantApp.downloadSSH(this.options.linkedView.model);
+                     },
+
+            saveClicked: function(e) {
+                     model = this.options.linkedView.model;
+                     model.tenantSiteCollection.putToSlice(model);
+                     model.attributes.users = model.usersBuffer;
+
+                     e.preventDefault();
+                     this.options.linkedView.save();
+                     //this.options.linkedView.submitContinueClicked.call(this.options.linkedView, e);
+                     //XOSTenantApp.setDirty(false);
+                     },
+            });
+
+XOSTenantApp = new XOSApplication({
+    logTableId: "#logTable",
+    statusMsgId: "#statusMsg",
+    hideTabsByDefault: true,
+    dirty: false,
+    varName: "XOSTenantApp",
+});
+
+XOSTenantApp.addRegions({
+    tenantSliceSelector: "#tenantSliceSelector",
+    tenantSummary: "#tenantSummary",
+    tenantSiteList: "#tenantSiteList",
+    tenantButtons: "#tenantButtons",
+    tenantAddSliceInterior: "#tenant-addslice-interior",
+    tenantEditUsersInterior: "#tenant-edit-users-interior",
+    tenantSSHCommandsInterior: "#tenant-ssh-commands-interior",
+});
+
+XOSTenantApp.setDirty = function(dirty) {
+    XOSTenantApp.dirty = dirty;
+    if (dirty) {
+        $("button.btn-tenant-save").addClass("btn-success");
+    } else {
+        $("button.btn-tenant-save").removeClass("btn-success");
+    }
+};
+
+XOSTenantApp.buildViews = function() {
      XOSTenantApp.tenantSites = new XOSTenantSiteCollection();
 
      tenantSummaryClass = XOSTenantSummaryView.extend({template: "#xos-detail-template",
@@ -250,22 +252,22 @@
     detailView.dialog = $("#tenant-addslice-dialog");
     app.tenantAddSliceInterior.show(detailView);
     $("#tenant-addslice-dialog").dialog({
-       autoOpen: false,
-       modal: true,
-       width: 640,
-       buttons : {
-            "Create Slice" : function() {
-              var addDialog = this;
-              console.log("SAVE!!!");
-              detailView.synchronous = true;
-              detailView.afterSave = function() { $(addDialog).dialog("close"); XOSTenantApp.navToSlice(detailView.model.id); }
-              detailView.save();
-            },
-            "Cancel" : function() {
-              $(this).dialog("close");
-            }
-          }
-        });
+       autoOpen: false,
+       modal: true,
+       width: 640,
+       buttons : {
+            "Create Slice" : function() {
+              var addDialog = this;
+              console.log("SAVE!!!");
+              detailView.synchronous = true;
+              detailView.afterSave = function() { $(addDialog).dialog("close"); XOSTenantApp.navToSlice(detailView.model.id); }
+              detailView.save();
+            },
+            "Cancel" : function() {
+              $(this).dialog("close");
+            }
+          }
+        });
     $("#tenant-addslice-dialog").dialog("open");
 };
 
@@ -275,25 +277,25 @@
     detailView.dialog = $("#tenant-edit-users-dialog");
     app.tenantEditUsersInterior.show(detailView);
     $("#tenant-edit-users-dialog").dialog({
-       autoOpen: false,
-       modal: true,
-       width: 640,
-       buttons : {
-            "Ok" : function() {
-              var editDialog = this;
-              user_ids = all_options($("#tenant-edit-users-dialog").find(".select-picker-to"));
-              user_ids = user_ids.map( function(x) { return parseInt(x,10); } );
-              if (!array_same_elements(user_ids, model.usersBuffer)) {
-                  XOSTenantApp.setDirty(true);
-              }
-              model.usersBuffer = user_ids;
-              $(editDialog).dialog("close");
-            },
-            "Cancel" : function() {
-              $(this).dialog("close");
-            }
-          }
-        });
+       autoOpen: false,
+       modal: true,
+       width: 640,
+       buttons : {
+            "Ok" : function() {
+              var editDialog = this;
+              user_ids = all_options($("#tenant-edit-users-dialog").find(".select-picker-to"));
+              user_ids = user_ids.map( function(x) { return parseInt(x,10); } );
+              if (!array_same_elements(user_ids, model.usersBuffer)) {
+                  XOSTenantApp.setDirty(true);
+              }
+              model.usersBuffer = user_ids;
+              $(editDialog).dialog("close");
+            },
+            "Cancel" : function() {
+              $(this).dialog("close");
+            }
+          }
+        });
     $("#tenant-edit-users-dialog").dialog("open");
 };
 
@@ -313,23 +315,23 @@
     XOSTenantApp.tenantSSHCommandsInterior.show(htmlView);
 
     $("#tenant-ssh-commands-dialog").dialog({
-       autoOpen: false,
-       modal: true,
-       width: 640,
-       buttons : {
-            "Download": function() {
-                var dlLink = document.createElement('a');
-                dlLink.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(sshCommands));
-                dlLink.setAttribute('download', 'sshcommands.txt');
-                dlLink.click();
-
-                //window.open('data:text/text,' + encodeURIComponent(sshCommands));
-            },
-            "Close" : function() {
-              $(this).dialog("close");
-            },
-          }
-        });
+       autoOpen: false,
+       modal: true,
+       width: 640,
+       buttons : {
+            "Download": function() {
+                var dlLink = document.createElement('a');
+                dlLink.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(sshCommands));
+                dlLink.setAttribute('download', 'sshcommands.txt');
+                dlLink.click();
+
+                //window.open('data:text/text,' + encodeURIComponent(sshCommands));
+            },
+            "Close" : function() {
+              $(this).dialog("close");
+            },
+          }
+        });
     $("#tenant-ssh-commands-dialog").dialog("open");
 };
 
@@ -439,16 +441,16 @@
 };
 
 XOSTenantApp.on("start", function() {
-     XOSTenantApp.buildViews();
-
-     // fire it once to initially show the progress bar
-     XOSTenantApp.collectionLoadChange();
-
-     // fire it each time the collection load status is updated
-     Backbone.on("xoslib:collectionLoadChange", XOSTenantApp.collectionLoadChange);
-});
-
-$(document).ready(function(){
-    XOSTenantApp.start();
-});
-
+     XOSTenantApp.buildViews();
+
+     // fire it once to initially show the progress bar
+     XOSTenantApp.collectionLoadChange();
+
+     // fire it each time the collection load status is updated
+     Backbone.on("xoslib:collectionLoadChange", XOSTenantApp.collectionLoadChange);
+});
+
+$(document).ready(function(){
+    XOSTenantApp.start();
+});
+/* eslint-enable */
diff --git a/xos/core/xoslib/static/js/xoslib/xos-backbone.js b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
index 3e43279..6fb6cc1 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -1,4 +1,6 @@
-if (! window.XOSLIB_LOADED ) {
+/* eslint-disable*/
+
+if (! window.XOSLIB_LOADED) {
     window.XOSLIB_LOADED=true;
 
     XOS_BASE = "/xos";
@@ -59,7 +61,8 @@
             if (!url) {
                 if (this.id) {
                     url = this.urlRoot + this.id;
-                } else {
+                }
+                else {
                     // this happens when creating a new model.
                     url = this.urlRoot;
                 }
@@ -67,12 +70,12 @@
 
             if (!url) {
                 // XXX I'm not sure this does anything useful
-                url = ( _.isFunction( this.collection.url ) ? this.collection.url() : this.collection.url );
+                url = _.isFunction(this.collection.url) ? this.collection.url() : this.collection.url;
                 url = url || this.urlRoot;
             }
 
             // remove any existing query parameters
-            url && ( url.indexOf("?") > -1 ) && ( url = url.split("?")[0] );
+            url && url.indexOf("?") > -1  && (url = url.split("?")[0]);
 
             url && ( url += ( url.length > 0 && url.charAt( url.length - 1 ) === '/' ) ? '' : '/' );
 
@@ -135,7 +138,7 @@
                 _.each(validatorList, function(validator) {
                     if (fieldName in attrs) {
                         // call validateField method in xos-utils.js
-                        validatorResult = validateField(validator, attrs[fieldName], this)
+                        validatorResult = validateField(validator, attrs[fieldName], this);
                         if (validatorResult != true) {
                             errors[fieldName] = validatorResult;
                             foundErrors = true;
@@ -160,16 +163,18 @@
 
     XOSCollection = Backbone.Collection.extend({
         objects: function() {
-            return this.models.map(function(element) { return element.attributes; });
+            return this.models.map(function(element) {
+                return element.attributes;
+            });
         },
 
-        initialize: function(){
+        initialize: function() {
             this.isLoaded = false;
             this.failedLoad = false;
             this.startedLoad = false;
             this.sortVar = 'name';
             this.sortOrder = 'asc';
-            this.on( "sort", this.sorted );
+            this.on('sort', this.sorted);
         },
 
         relatedCollections: [],
@@ -183,7 +188,7 @@
             //console.log("sorted " + this.modelName);
         },
 
-        simpleComparator: function( model ){
+        simpleComparator: function(model) {
             parts=this.sortVar.split(".");
             result = model.get(parts[0]);
             for (index=1; index<parts.length; ++index) {
@@ -192,16 +197,21 @@
             return result;
         },
 
-        comparator: function (left, right) {
+        comparator: function(left, right) {
             var l = this.simpleComparator(left);
             var r = this.simpleComparator(right);
 
-            if (l === void 0) return -1;
-            if (r === void 0) return 1;
+            if (l === void 0) {
+                return -1;
+            }
+            if (r === void 0) {
+                return 1;
+            }
 
             if (this.sortOrder == "desc") {
                 return l < r ? 1 : l > r ? -1 : 0;
-            } else {
+            }
+            else {
                 return l < r ? -1 : l > r ? 1 : 0;
             }
         },
@@ -223,7 +233,7 @@
         fetchFailure: function(collection, response, options) {
             //console.log("fetch failed " + collection.modelName);
             this.fetching = false;
-            if ((!this.isLoaded) && (!this.failedLoad)) {
+            if (!this.isLoaded && !this.failedLoad) {
                 this.failedLoad=true;
                 Backbone.trigger("xoslib:collectionLoadChange", this);
             }
@@ -235,6 +245,7 @@
 
         fetch: function(options) {
             var self=this;
+
             this.fetching=true;
             //console.log("fetch " + this.modelName);
             if (!this.startedLoad) {
@@ -247,7 +258,9 @@
             }
             options["orig_success"] = options["success"];
             options["orig_failure"] = options["failure"];
-            options["success"] = function(collection, response, options) { self.fetchSuccess.call(self, collection, response, options); };
+            options["success"] = function(collection, response, options) {
+                self.fetchSuccess.call(self, collection, response, options);
+            };
             options["failure"] = this.fetchFailure;
             Backbone.Collection.prototype.fetch.call(this, options);
         },
@@ -255,7 +268,10 @@
         startPolling: function() {
             if (!this._polling) {
                 var collection=this;
-                setInterval(function() { collection.fetch(); }, 10000);
+
+                setInterval(function() {
+                    collection.fetch();
+                }, 10000);
                 this._polling=true;
                 this.fetch();
             }
@@ -823,3 +839,4 @@
         };
     })();
 }
+/* eslint-enable */
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xoslib/xos-defaults.js b/xos/core/xoslib/static/js/xoslib/xos-defaults.js
index 12d2755..0f4ab27 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-defaults.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-defaults.js
@@ -1,3 +1,4 @@
+/* eslint-disable quotes, no-undef, max-len, new-cap*/
 /* eslint indent: [2, 2]*/
 function xos_get_defaults() {
   this.account = {"updated": null, "policed": null, "created": null, "deleted": false, "site": null, "lazy_blocked": false, "backend_register": "{}", "write_protect": false, "backend_status": "0 - Provisioning in progress", "no_sync": false, "enacted": null};
@@ -65,3 +66,4 @@
   this.userDashboardView = {"updated": null, "policed": null, "created": null, "deleted": false, "dashboardView": null, "lazy_blocked": false, "backend_register": "{}", "write_protect": false, "user": null, "backend_status": "0 - Provisioning in progress", "order": 0, "no_sync": false, "enacted": null};
 };
 xosdefaults = new xos_get_defaults();
+/* eslint-enable quotes, no-undef, max-len, new-cap*/
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xoslib/xos-util.js b/xos/core/xoslib/static/js/xoslib/xos-util.js
index 7512290..66c01ce 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-util.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-util.js
@@ -1,9 +1,12 @@
-// misc utility functions
+/* eslint-disable indent*/
+////////////////////////////
+// misc utility functions //
+////////////////////////////
 
 function idInArray(id, arr) {
     // because sometimes ids are strings and sometimes they're integers
-    for (index in arr) {
-        if (id.toString() == arr[index].toString()) {
+    for (var index in arr) {
+        if (id.toString() === arr[index].toString()) {
             return true;
         }
     }
@@ -24,113 +27,140 @@
     return s.charAt(0).toUpperCase() + s.slice(1);
 }
 
-function toTitleCase(str)
-{
-    return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
+function toTitleCase(str) {
+    return str.replace(/\w\S*/g, function(txt) {
+        return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
+    });
 }
 
-function fieldNameToHumanReadable(str)
-{
-    str = str.replace("_", " ");
+function fieldNameToHumanReadable(str) {
+    str = str.replace('_', ' ');
     return toTitleCase(str);
 }
 
 // http://stackoverflow.com/questions/2117320/set-maximum-displayed-rows-count-for-html-table
 function limitTableRows(tableSelector, maxRows) {
-    var table = $(tableSelector)[0] //document.getElementById(tableId);
+    var table = $(tableSelector)[0]; //document.getElementById(tableId);
     var wrapper = table.parentNode;
     var rowsInTable = table.rows.length;
+
     try {
         var border = getComputedStyle(table.rows[0].cells[0], '').getPropertyValue('border-top-width');
+
         border = border.replace('px', '') * 1;
-    } catch (e) {
+    }
+    catch (e) {
         var border = table.rows[0].cells[0].currentStyle.borderWidth;
-        border = (border.replace('px', '') * 1) / 2;
+
+        border = border.replace('px', '') * 1 / 2;
     }
     var height = 0;
+
     if (rowsInTable > maxRows) {
         for (var i = 0; i < maxRows; i++) {
             height += table.rows[i].clientHeight + border;
-            //console.log("XXX " + height + " " + table.rows[i].clientHeight + " " + border);
+            //console.log('XXX ' + height + ' ' + table.rows[i].clientHeight + ' ' + border);
         }
-        wrapper.style.height = height + "px";
+        wrapper.style.height = height + 'px';
     }
 }
 
 function validateField(validatorName, value, obj) {
-    if (validatorName=="notBlank") {
-        if ((value==undefined) || (value=="")) {
-            return "can not be blank";
+    if (validatorName === 'notBlank') {
+        if (value === undefined || value === null || value === '') {
+            return 'can not be blank';
         }
     }
 
     // if notBlank wasn't set, and the field is blank, then we can return
-    if ((value==undefined) || (value=="")) {
+    if (value === undefined || value === null || value === '') {
         return true;
     }
-
+    /* eslint-disable default-case */
     switch (validatorName) {
-        case "url":
-            if (! /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value)) {
-                return "must be a valid url";
-            }
-            break;
+    case 'url':
+        if (! /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value)) {
+            return 'must be a valid url';
+        }
+        break;
 
-        case "portspec":
-            if (! $.trim(value).match(portlist_regexp())) {
-                return "must be a valid portspec (example: 'tcp 123, udp 456-789')"
-            }
-            break;
+    case 'portspec':
+        if (! $.trim(value).match(portlist_regexp())) {
+            return 'must be a valid portspec (example: \'tcp 123, udp 456-789\')';
+        }
+        break;
+    // TODO test this before add
+    // default:
+    //     return true;
+    //     break;
+    /* eslint-enable default-case */
     }
 
     return true;
 }
 
-function array_diff(a1, a2)
-{
-  var a=[], diff=[];
-  for(var i=0;i<a1.length;i++)
-    a[a1[i]]=true;
-  for(var i=0;i<a2.length;i++)
-    if(a[a2[i]]) delete a[a2[i]];
-    else a[a2[i]]=true;
-  for(var k in a)
-    diff.push(k);
-  return diff;
+function array_diff(a1, a2) {
+    var a = [], diff = [];
+
+    for(var i = 0;i < a1.length;i++) {
+        a[a1[i]] = true;
+    }
+
+    for(var i = 0;i < a2.length;i++) {
+        if(a[a2[i]]) {
+            delete a[a2[i]];
+        }
+        else {
+            a[a2[i]] = true;
+        }
+    }
+
+    for(var k in a) {
+        // check that the property in not inherithed
+        if ({}.hasOwnProperty.call(a, k)) {
+            diff.push(k);
+        }
+    }
+
+    return diff;
 }
 
-function array_subtract(a1, a2)
-{
-    result=[]
-    for (index in a1) {
-        value = a1[index];
-        if (!$.inArray(value, a2) >= 0) {
-            result.push(value);
+function array_subtract(a1, a2) {
+    var result = [];
+
+    // why not for ... of, move to lodash instead
+    for (var index in a1) {
+        if ({}.hasOwnProperty.call(a1, index)) {
+            var value = a1[index];
+
+            if (!$.inArray(value, a2) >= 0) {
+                result.push(value);
+            }
         }
+
     }
     return result;
 }
 
-function array_same_elements(arr1, arr2)
-{
+function array_same_elements(arr1, arr2) {
     // return true if arrays have same elements, even if order is different
-    return ($(arr1).not(arr2).length == 0 && $(arr2).not(arr1).length == 0);
+    return $(arr1).not(arr2).length === 0 && $(arr2).not(arr1).length === 0;
 }
 
-function array_pair_lookup(x, names, values)
-{
-    for (index in values) {
-        if (values[index] == x) {
+function array_pair_lookup(x, names, values) {
+    for (var index in values) {
+        if (values[index] === x) {
             return names[index];
         }
     }
-    return "object #" + x;
+    return 'object #' + x;
 }
 
 function all_options(selector) {
-    el = $(selector);
-    result = [];
-    _.each(el.find("option"), function(option) {
+    var el = $(selector);
+    var result = [];
+
+    _.each(el.find('option'), function(option) {
         result.push($(option).val());
     });
     return result;
@@ -138,77 +168,93 @@
 
 function make_same_width(containerSelector, itemSelector) {
     var maxWidth = 0;
-    $(containerSelector).find(itemSelector).each( function(index) { maxWidth = Math.max(maxWidth, $(this).width()); });
-    console.log(maxWidth);
-    $(containerSelector).find(itemSelector).each( function(index) { $(this).width(maxWidth); });
+
+    $(containerSelector).find(itemSelector).each(function() {
+        maxWidth = Math.max(maxWidth, $(this).width());
+    });
+
+    $(containerSelector).find(itemSelector).each(function() {
+        $(this).width(maxWidth);
+    });
 }
 
 function strip_scripts(s) {
-    var div = document.createElement('div');
-    div.innerHTML = s;
-    var scripts = div.getElementsByTagName('script');
-    var i = scripts.length;
-    while (i--) {
-      scripts[i].parentNode.removeChild(scripts[i]);
-    }
-    return div.innerHTML;
-  }
+    var div = document.createElement('div');
+
+    div.innerHTML = s;
+    var scripts = div.getElementsByTagName('script');
+    var i = scripts.length;
+
+    while (i--) {
+        scripts[i].parentNode.removeChild(scripts[i]);
+    }
+    return div.innerHTML;
+}
 
 function parse_portlist(ports) {
-    /* Support a list of ports in the format "protocol:port, protocol:port, ..."
+    /* Support a list of ports in the format 'protocol:port, protocol:port, ...'
         examples:
             tcp 123
             tcp 123:133
             tcp 123, tcp 124, tcp 125, udp 201, udp 202
 
-        User can put either a "/" or a " " between protocol and ports
-        Port ranges can be specified with "-" or ":"
+        User can put either a '/' or a ' ' between protocol and ports
+        Port ranges can be specified with '-' or ':'
 
         This is a straightforward port of the code in core/models/network.py
     */
 
     var nats = [];
+
     if (ports) {
-        parts = ports.split(",")
+        var parts = ports.split(',');
+        var parts2, protocol, first, last, portStr;
+
         $.each(parts, function(index, part) {
             part = $.trim(part);
-            if (part.indexOf("/")>=0) {
-                parts2 = part.split("/",2);
-                protocol=parts2[0];
-                ports=parts2[1];
-            } else if (part.indexOf(" ")>=0) {
-                parts2 = part.split(" ",2);
-                protocol=parts2[0];
-                ports=parts2[1];
-            } else {
-                throw 'malformed port specifier ' + part + ', format example: "tcp 123, tcp 201:206, udp 333"';
+            if (part.indexOf('/') >= 0) {
+                parts2 = part.split('/',2);
+
+                protocol = parts2[0];
+                ports = parts2[1];
+            }
+            else if (part.indexOf(' ') >= 0) {
+                parts2 = part.split(' ',2);
+                protocol = parts2[0];
+                ports = parts2[1];
+            }
+            else {
+                throw 'malformed port specifier ' +
+                    part + ', format example: "tcp 123, tcp 201:206, udp 333"';
             }
 
             protocol = $.trim(protocol);
             ports = $.trim(ports);
 
-            if (protocol!="tcp" && protocol!="udp") {
+            if (protocol !== 'tcp' && protocol !== 'udp') {
                 throw 'unknown protocol ' + protocol;
             }
 
-            if (ports.indexOf("-")>=0) {
-                parts2 = ports.split("-");
+            if (ports.indexOf('-') >= 0) {
+                parts2 = ports.split('-');
                 first = parseInt($.trim(parts2[0]));
                 last = parseInt($.trim(parts2[1]));
-                portStr = first + ":" + last;
-            } else if (ports.indexOf(":")>=0) {
-                parts2 = ports.split(":");
+                portStr = first + ':' + last;
+            }
+            else if (ports.indexOf(':') >= 0) {
+                parts2 = ports.split(':');
                 first = parseInt($.trim(parts2[0]));
                 last = parseInt($.trim(parts2[1]));
-                portStr = first + ":" + last;
-            } else {
+                portStr = first + ':' + last;
+            }
+            else {
                 portStr = parseInt(ports).toString();
             }
 
-            nats.push( {l4_protocol: protocol, l4_port: portStr} );
+            nats.push({l4_protocol: protocol, l4_port: portStr});
         }); /* end $.each(ports) */
     }
-    return nats
+    return nats;
 }
 
 function portlist_regexp() {
@@ -216,23 +262,32 @@
        specifiers. Saved here in long form, in case we need to change it
        in the future.
     */
+    var paren, whitespace, protocol,
+        protocolSlash, numbers, range,
+        protoPorts, protoPortsCommas,
+        numbersOrRange, portSpec, multiProtoPorts;
 
-    paren = function(x) { return "(?:" + x + ")"; }
-    whitespace = " *";
-    protocol = paren("tcp|udp");
-    protocolSlash = protocol + paren(whitespace + "|\/");
-    numbers = paren("[0-9]+");
-    range = paren(numbers + paren("-|:") + numbers);
-    numbersOrRange = paren(numbers + "|" + range);
+    paren = function(x) {
+        return '(?:' + x + ')';
+    };
+
+    whitespace = ' *';
+    protocol = paren('tcp|udp');
+    protocolSlash = protocol + paren(whitespace + '|\/');
+    numbers = paren('[0-9]+');
+    range = paren(numbers + paren('-|:') + numbers);
+    numbersOrRange = paren(numbers + '|' + range);
     protoPorts = paren(protocolSlash + numbersOrRange);
-    protoPortsCommas = paren(paren(protoPorts + "," + whitespace)+"+");
+    protoPortsCommas = paren(paren(protoPorts + ',' + whitespace) + '+');
     multiProtoPorts = paren(protoPortsCommas + protoPorts);
-    portSpec = "^" + paren(protoPorts + "|" + multiProtoPorts) + "$";
+    portSpec = '^' + paren(protoPorts + '|' + multiProtoPorts) + '$';
     return RegExp(portSpec);
 }
 
 function portlist_selftest() {
-    r = portlist_regexp();
+    var r = portlist_regexp();
+
+/* eslint-disable quotes, max-len*/
     assert(! "tcp".match(r), 'should not have matched: "tcp"');
     assert("tcp 1".match(r), 'should have matched: "tcp 1"');
     assert("tcp 123".match(r), 'should have matched: "tcp 123"');
@@ -248,7 +303,8 @@
     assert("tcp 123,  udp 456".match(r), 'should have matched: "tcp 123,  udp 456"');
     assert("tcp 123-45, udp 456".match(r), 'should have matched: "tcp 123-45, udp 456"');
     assert("tcp 123-45, udp 456, tcp 11, tcp 22:45, udp 76, udp 47:49, udp 60-61".match(r), 'should have matched: "tcp 123-45, udp 456, tcp 11, tcp 22:45, udp 76, udp 47:49, udp 60-61"');
-    return "done";
+    /* eslint-enable quotes, max-len*/
+    return 'done';
 }
 
 //portlist_selftest();
diff --git a/xos/core/xoslib/static/js/xoslib/xos-validators.js b/xos/core/xoslib/static/js/xoslib/xos-validators.js
index bbba624..ecee144 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-validators.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-validators.js
@@ -1,3 +1,5 @@
+/* eslint-disable quotes, no-undef, max-len, new-cap*/
+/* eslint indent: [2, 2]*/
 function xos_get_validators() {
   this.account = {"updated": [], "policed": [], "created": [], "deleted": [], "site": ["notBlank"], "lazy_blocked": [], "backend_register": ["notBlank"], "write_protect": [], "backend_status": ["notBlank"], "id": [], "no_sync": [], "enacted": []};
   this.charge = {"updated": [], "slice": [], "policed": [], "created": [], "deleted": [], "amount": ["notBlank"], "object": ["notBlank"], "account": ["notBlank"], "kind": ["notBlank"], "lazy_blocked": [], "backend_register": ["notBlank"], "write_protect": [], "state": ["notBlank"], "coreHours": ["notBlank"], "invoice": [], "date": ["notBlank"], "backend_status": ["notBlank"], "id": [], "no_sync": [], "enacted": []};
@@ -64,3 +66,4 @@
   this.userDashboardView = {"updated": [], "policed": [], "created": [], "deleted": [], "dashboardView": ["notBlank"], "lazy_blocked": [], "backend_register": ["notBlank"], "write_protect": [], "user": ["notBlank"], "backend_status": ["notBlank"], "order": ["notBlank"], "id": [], "no_sync": [], "enacted": []};
 };
 xosvalidators = new xos_get_validators();
+/* eslint-enable quotes, no-undef, max-len, new-cap*/
diff --git a/xos/core/xoslib/static/js/xoslib/xosHelper.js b/xos/core/xoslib/static/js/xoslib/xosHelper.js
index 54ecba5..cad242f 100644
--- a/xos/core/xoslib/static/js/xoslib/xosHelper.js
+++ b/xos/core/xoslib/static/js/xoslib/xosHelper.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
 HTMLView = Marionette.ItemView.extend({
   render: function() {
       this.$el.append(this.options.html);
@@ -1172,3 +1173,4 @@
         return String(s).replace(/"/g,'&quot;')
     }
 }
+/* eslint-enable */
\ No newline at end of file
