diff --git a/js/main.js b/js/main.js
index 2e38b74ee81b960525675684db60f8ce3656b639..c88cfa2ac24c3a2bfbfb100df456ce051476f364 100644
--- a/js/main.js
+++ b/js/main.js
@@ -10,15 +10,15 @@ $(function(){
 
     //init threeJS and geometry models
     window.three = new ThreeModel();
-    var lattice = new Lattice();
+    window.lattice = new OctaFaceLattice();
 
     //setup ui
-    var appState = new AppState({lattice:lattice});
-    new MenuWrapper({lattice:lattice, model:appState});
+    var appState = new AppState({lattice:window.lattice});
+    new MenuWrapper({lattice:window.lattice, model:appState});
     new NavBar({model:appState});
 
     //threeJS View
-    new ThreeView({model:window.three, lattice:lattice, appState:appState});
+    new ThreeView({model:window.three, lattice:window.lattice, appState:appState});
 
-    lattice.addCellAtIndex({x:0,y:0,z:0});
+    window.lattice.addCellAtIndex({x:0,y:0,z:0});
 });
diff --git a/js/models/Lattice.js b/js/models/Lattice.js
index 72d5616f9797ee3aafa65d97dc6139b79cb5e077..b3d9e3b19f6bbe28787c985cebd057f92589dcce 100644
--- a/js/models/Lattice.js
+++ b/js/models/Lattice.js
@@ -53,27 +53,21 @@ Lattice = Backbone.Model.extend({
     ///////////////////////////////ADD/REMOVE CELLS/////////////////////////////////////
     ////////////////////////////////////////////////////////////////////////////////////
 
-    addCellAtPosition: function(absPosition){
+    addCellAtIndex: function(indices){
 
-        //calc indices in cell matrix
         var scale = this.get("scale");
-        var octHeight = 2*scale/Math.sqrt(6);
-        var triHeight = scale/2*Math.sqrt(3);
-        var position = {};
-        position.x = Math.round(absPosition.x/scale);
-        position.y = Math.round(absPosition.y/triHeight);
-        position.z = Math.round(absPosition.z/octHeight);
-        if (position.z%2 == 1) position.y += 1;
+        var cells = this.get("cells");
+        this._checkForMatrixExpansion(cells, indices);
 
-        this.addCellAtIndex(position);
+        var index = this._subtract(indices, this.get("cellsMin"));
+        if (!cells[index.x][index.y][index.z]) cells[index.x][index.y][index.z] = this._makeCellForLatticeType(indices, scale);
+        else console.warn("already a cell there");
+        this.set("numCells", this.get("numCells")+1);
+        window.three.render();
     },
 
-    addCellAtIndex: function(indices){
-
-        var cells = this.get("cells");
-        var scale = this.get("scale");
+    _checkForMatrixExpansion: function(cells, indices){
 
-        //check for matrix expansion
         var lastMax = this.get("cellsMax");
         var lastMin = this.get("cellsMin");
         var newMax = this._updateCellsMax(indices, lastMax);
@@ -86,12 +80,6 @@ Lattice = Backbone.Model.extend({
             this._expandCellsArray(cells, this._subtract(lastMin, newMin), true);
             this.set("cellsMin", newMin);
         }
-
-        var index = this._subtract(indices, this.get("cellsMin"));
-        if (!cells[index.x][index.y][index.z]) cells[index.x][index.y][index.z] = new DMASideOctaCell(this.get("cellMode"), indices, scale, this);
-        else console.warn("already a cell there");
-        this.set("numCells", this.get("numCells")+1);
-        window.three.render();
     },
 
     removeCell: function(cell){
@@ -253,4 +241,47 @@ Lattice = Backbone.Model.extend({
         });
     }
 
-});
\ No newline at end of file
+});
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////FACE CONN OCTA LATTICE////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////
+
+
+OctaFaceLattice = Lattice.extend({
+
+    addCellAtPosition: function(absPosition){
+
+        //calc indices in cell matrix
+        var scale = this.get("scale");
+        var octHeight = 2*scale/Math.sqrt(6);
+        var triHeight = scale/2*Math.sqrt(3);
+        var position = {};
+        position.x = Math.round(absPosition.x/scale);
+        position.y = Math.round(absPosition.y/triHeight);
+        position.z = Math.round(absPosition.z/octHeight);
+        if (position.z%2 == 1) position.y += 1;
+
+        this.addCellAtIndex(position);
+    },
+
+    _makeCellForLatticeType: function(indices, scale){
+        return new DMASideOctaCell(this.get("cellMode"), indices, scale, this);
+    }
+
+});
+
+////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////EDGE CONN OCTA LATTICE////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////VERTEX CONN OCTA LATTICE//////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////CUBE LATTICE//////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////
\ No newline at end of file