diff --git a/js/cells/DMACell.js b/js/cells/DMACell.js
index 612f6e4ba3014c40cd9c2354116f8873ede33b8f..2f0d6f2a51ee5d07b99fc1ebff2f342d6889bff3 100644
--- a/js/cells/DMACell.js
+++ b/js/cells/DMACell.js
@@ -13,7 +13,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', '
         if (json.index) this.index = new THREE.Vector3(json.index.x, json.index.y, json.index.z);
         if (superCell) this.superCell = superCell;
 
-        this.material = json.material || appState.get("materialType");
+        this.materialName = json.materialName || appState.get("materialType");
 
         //object 3d is parent to all 3d elements owned by cell: cell mesh and wireframe, parts, beams, nodes, etc
         this.object3D = this._buildObject3D();
@@ -155,7 +155,8 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', '
     DMACell.prototype.setDeleteMode = function(state){
 
         var material;
-        if (state) material = materials.deleteMaterial;
+        if (!state && !this.materialName) return;//cell may be deleted by now
+        if (state) material = materials.deleteMaterial.threeMaterial;
         else  material = this.getMaterial(true);
         if (!material) return;//cell may be deleted by now
         if (this.object3D.children[0].material == material) return;
@@ -222,20 +223,20 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', '
     };
 
     DMACell.prototype.getMaterial = function(returnTHREEObject){
-        if (!this.material) {
+        if (!this.materialName) {
             console.warn("no material type set for cell");
             return null;
         }
-        if (!returnTHREEObject) return materials[this.material];
-        if (!materials[this.material]) {
-            console.warn("no material object found of type " + this.materials);
+        if (!returnTHREEObject) return materials[this.materialName];
+        if (!materials[this.materialName]) {
+            console.warn("no material object found of type " + this.materialNames);
             return null;
         }
-        if (!materials[this.material].threeMaterial){
-            console.warn("no three material object found for type "+ this.material);
+        if (!materials[this.materialName].threeMaterial){
+            console.warn("no three material object found for type "+ this.materialName);
             return null;
         }
-        return materials[this.material].threeMaterial;
+        return materials[this.materialName].threeMaterial;
     };
 
     DMACell.prototype.setOpacity = function(opacity){
@@ -358,7 +359,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', '
         this.nodes = null;
         this.beams = null;
         this.superCell = null;
-        this.material = null;
+        this.materialName = null;
         this.index = null;
     };
 
@@ -372,9 +373,9 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', '
 
     DMACell.prototype.toJSON = function(){
         var data = {
-            material: this.material
+            material: this.materialName
         };
-        if (materials[this.material].cells) return data;//material definition in material composites
+        if (materials[this.materialName].cells) return data;//material definition in material composites
         if (this.cells) data.cells = this.cells;
         return data;
     };
diff --git a/js/cells/supercells/CompositeCell.js b/js/cells/supercells/CompositeCell.js
index 867326d5844280e829c94f8ebedcde746d15616b..49a0021a61c477682da9919a4190d8d1e09e42dc 100644
--- a/js/cells/supercells/CompositeCell.js
+++ b/js/cells/supercells/CompositeCell.js
@@ -12,7 +12,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'superCell',
     CompositeCell.prototype = Object.create(DMASuperCell.prototype);
 
     CompositeCell.prototype._getGeometry = function(){
-        var dimensions = materials[this.material].dimensions;
+        var dimensions = materials[this.materialName].dimensions;
         var geo = new THREE.BoxGeometry(dimensions.x*lattice.xScale(), dimensions.y*lattice.yScale(), dimensions.z*lattice.zScale());
         geo.applyMatrix(new THREE.Matrix4().makeTranslation(dimensions.x/2-0.5, dimensions.y/2-0.5, dimensions.z/2-0.5));
         return geo;
diff --git a/js/cells/supercells/DMASuperCell.js b/js/cells/supercells/DMASuperCell.js
index c75708fa0f106870457093e5800f213cb6ac12e7..1dfaade0ff1e8b734a29c91dc583af583eb7ecf1 100644
--- a/js/cells/supercells/DMASuperCell.js
+++ b/js/cells/supercells/DMASuperCell.js
@@ -15,6 +15,8 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cell'],
 
         var material = this.getMaterial();
         var range = appState.get("superCellRange");
+        console.log(material);
+        if (material.dimensions) range = material.dimensions;
         if (material.cellsMax) range = (new THREE.Vector3(1,1,1)).add(material.cellsMax).sub(material.cellsMin);
         this.cells = this._makeChildCells(range, material);
 
@@ -25,6 +27,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cell'],
     DMASuperCell.prototype = Object.create(DMACell.prototype);
 
     DMASuperCell.prototype._makeChildCells = function(range, material){
+        console.log(range);
         var cells = [];
         for (var x=0;x<range.x;x++){
             cells.push([]);
@@ -33,7 +36,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cell'],
                 for (var z=0;z<range.z;z++){
                     //child cells add themselves to object3D
 
-                    var cellMaterial = this.material;
+                    var cellMaterial = this.materialName;
                     cells[x][y].push(null);
 
                     if (material.sparseCells){
@@ -59,7 +62,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cell'],
 
     DMASuperCell.prototype._makeSubCellForIndex = function(json, callback){
         var subclassFile = lattice.getCellSubclassFile();
-        if (json.material && json.material.substr(0,5) == "super") subclassFile = "compositeCell";
+        if (json.materialName && json.materialName.substr(0,5) == "super") subclassFile = "compositeCell";
         var self = this;
         require([subclassFile], function(CellSubclass){
             var cell = new CellSubclass(json, self);
diff --git a/js/cells/supercells/GIKSuperCell.js b/js/cells/supercells/GIKSuperCell.js
index f80081c45c16e30397753571804049b848597dde..dd6d54f4766a67dea2bdda5abca9cc1f764e7c06 100644
--- a/js/cells/supercells/GIKSuperCell.js
+++ b/js/cells/supercells/GIKSuperCell.js
@@ -4,11 +4,11 @@
 
 
 
-define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'superCell', 'gikCell'],
-    function(_, THREE, three, lattice, appState, DMASuperCell, GIKCell){
+define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'superCell', 'gikCell', 'materials'],
+    function(_, THREE, three, lattice, appState, DMASuperCell, GIKCell, materials){
 
     var unitGeos = {};
-    var materials = {};
+    var gikMaterials = {};
 
     function makePartWithLength(length){
         var geo = new THREE.BoxGeometry(lattice.xScale(0),lattice.yScale(0),lattice.zScale(0));
@@ -43,19 +43,16 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'superCell',
         if (returnTHREEObject){
             return DMASuperCell.prototype.getMaterial.call(this, returnTHREEObject);
         }
-        if (!materials[this.material]) materials[this.material] = {};
         var length = this.getLength();
-        if (!materials[this.material]["length" + (length+1)]) {
-            materials[this.material]["length" + (length+1)] =
-            {
-                material: this.material,
-                cellsMin: new THREE.Vector3(0,0,0),
-                cellsMax: new THREE.Vector3(length, 0, 0),
-                dimensions: new THREE.Vector3(length+1, 1, 1)
+        var name = this.materialName + "length" + (length+1);
+        if (!gikMaterials[name]) {
+            gikMaterials[name] = {
+                materialName: this.materialName,
+                dimensions: new THREE.Vector3(length+1, 1, 1),
+                threeMaterial: materials[this.materialName].threeMaterial
             };
         }
-        console.log(materials[this.material]);
-        return materials[this.material]["length" + (length+1)];
+        return gikMaterials[name];
     };
 
     GIKSuperCell.prototype._buildWireframe = function(mesh){
diff --git a/js/lattice/LatticeBase.js b/js/lattice/LatticeBase.js
index 8f695957ae40e43b25d31274d121eca58189626a..f4d40a86ca71a66fa3659810c3f173224144dabc 100644
--- a/js/lattice/LatticeBase.js
+++ b/js/lattice/LatticeBase.js
@@ -93,7 +93,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
 
         makeCellForLatticeType: function(json, callback){
             var subclassFile = this.getCellSubclassFile();
-            if (json.material && json.material.substr(0,5) == "super") subclassFile = "compositeCell";
+            if (json.materialName && json.materialName.substr(0,5) == "super") subclassFile = "compositeCell";
             require([subclassFile], function(CellSubclass){
                 var cell = new CellSubclass(json);
                 if (callback) callback(cell);
@@ -131,7 +131,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
             if (!this.sparseCells[relIndex.x][relIndex.y][relIndex.z]) {
                 var self = this;
                 if (!noRender || noRender === undefined) three.setRenderFlag();
-                this.makeCellForLatticeType({index:index, material:material}, function(cell){
+                this.makeCellForLatticeType({index:index, materialName:material}, function(cell){
                     self.sparseCells[relIndex.x][relIndex.y][relIndex.z] = cell;
                     self.set("numCells", self.get("numCells")+1);
                 });