diff --git a/CMakeLists.txt b/CMakeLists.txt
index d898674205ebf6f18c5560a52a7ce99dcacf80f5..0bb1ac05957f9271f670725cc44e31accc9efe56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,9 +36,27 @@ if(PYTHON_VERSION_MAJOR VERSION_EQUAL 3)
     set(WITH_GUI OFF)
 endif( )
 
+# On debian or ubuntu, --install-layout=deb needs to be passed.
+if(UNIX AND NOT APPLE)
+    find_program(LSB_RELEASE lsb_release)
+    if(LSB_RELEASE)
+        execute_process(COMMAND ${LSB_RELEASE} -is
+            OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
+            OUTPUT_STRIP_TRAILING_WHITESPACE
+            )
+        if(${LSB_RELEASE_ID_SHORT} STREQUAL "Ubuntu" 
+                OR ${LSB_RELEASE_ID_SHORT} STREQUAL "Debian" )
+            message(STATUS "Debian based LINUX: ${LSB_RELEASE_ID_SHORT}" )
+            set(CMAKE_PYMOOSE_ARGS "-DDISTUTILS_EXTRA_ARGS=\"--install-layout=deb\"" )
+        endif( )
+    endif( )
+endif( )
+
+
+
 add_custom_target(moose ALL)
 
-## intialize paths
+
 set(PYMOOSE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/moose-core")
 set(PYMOOSE_BUILD_DIR ${CMAKE_BINARY_DIR}/__moose-core_build)
 set(PYMOOSE_INSTALL_DIR ${CMAKE_BINARY_DIR}/__moose-core_install)
@@ -114,8 +132,11 @@ if(WITH_GUI)
         )
 endif()
 
-configure_file( ${CMAKE_SOURCE_DIR}/cmake/moose.in ${CMAKE_BINARY_DIR}/moose )
-install(PROGRAMS ${CMAKE_BINARY_DIR}/moose DESTINATION bin)
+configure_file( 
+    ${CMAKE_SOURCE_DIR}/cmake/moosegui.in
+    ${CMAKE_BINARY_DIR}/moosegui 
+    )
+install(PROGRAMS ${CMAKE_BINARY_DIR}/moosegui DESTINATION bin)
 
 # UNINSTALL
 add_custom_command(OUTPUT __uninstall_moose-core__
@@ -131,7 +152,7 @@ if(WITH_GUI)
         ${CMAKE_INSTALL_PREFIX}/lib/moose/gui
         COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_INSTALL_PREFIX}/bin/moose
         )
-    add_dependencies( uninstall __uninstall_moose-gui__ )
+    #add_dependencies( uninstall __uninstall_moose-gui__ )
 endif()
 
 ################################################################################
diff --git a/README.md b/README.md
index e475309168094fc4f6a8f9b8340c0067f8306290..930068a04d418060943e9531c1f6424dcb07a7ac 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,6 @@
 [![Build Status - master](https://travis-ci.org/BhallaLab/moose.svg?branch=master)](https://travis-ci.org/BhallaLab/moose)   [![Documentation Status](https://readthedocs.org/projects/moose/badge/?version=latest)](https://readthedocs.org/projects/moose/?badge=latest)
+| [__Linux Packages__](https://software.opensuse.org//download.html?project=home%3Amoose&package=moose) | 
+[__Document__](http://moose.readthedocs.io/en/latest/)
 
 This is the parent repository of [MOOSE simulator](https://moose.ncbs.res.in).
 It keeps the snanshots of its components: core (written in C++) and python 
diff --git a/_travis/build_on_linux.sh b/_travis/build_on_linux.sh
index b761e0cc4a2154202707e229716f6a4d610344cd..dffecb321ac57561f035931beba66ca15581ed08 100755
--- a/_travis/build_on_linux.sh
+++ b/_travis/build_on_linux.sh
@@ -26,4 +26,9 @@ set -e
     sudo dpkg -D=2 -i ../moose*.deb
     cd ~ && /usr/bin/python -c \
         "import moose; print moose.version(); print( moose.__file__ ); moose.test( timeout = 10 )"
+
+    # NOTE: Lauching gui would work on travis since DISPLAY is defined.
+    # However we can check if files are installed.
+    # TODO: Put some test for GUI.
+
 )
diff --git a/build_moose-core.sh.in b/build_moose-core.sh.in
deleted file mode 100755
index 84057cf781c49906e09bf59199a5f04ac132c7c2..0000000000000000000000000000000000000000
--- a/build_moose-core.sh.in
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-set -x 
-set -e
-
-# NOTICE: This file is parsed by cmake to create a shell script. Not all syntax
-# will play well with cmake. CMAKE replaces @FOO@ and ${FOO} with cmake variable
-# values.
-
-if [ -z "$MAKE" ]; then
-    MAKE=make
-fi
-
-echo "Building MOOSE"
-(
-    export GSL_ROOT_DIR=@GSL_ROOT_DIR@
-    export HDF5_ROOT=@HDF5_ROOT@
-    cd @PYMOOSE_BUILD_DIR@
-    cmake -DCMAKE_INSTALL_PREFIX=@PYMOOSE_INSTALL_DIR@ \
-        -DCMAKE_BUILD_TYPE=Release \
-        -DPYTHON_EXECUTABLE=@PYTHON_EXECUTABLE@ \
-        @CMAKE_PYMOOSE_ARGS@ \
-        @PYMOOSE_SOURCE_DIR@ 
-    $MAKE
-    ctest -output-on-failure || echo "Some tests failed"
-    $MAKE install
-)
-
diff --git a/cmake/build_moose-core.sh.in b/cmake/build_moose-core.sh.in
index 43d2ab2b31abef6a3f7c5b1e630efefa42cbcedf..269e28e5658347987d455beb4cc070a5cb64ff17 100755
--- a/cmake/build_moose-core.sh.in
+++ b/cmake/build_moose-core.sh.in
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+
 set -x 
 set -e
 
diff --git a/cmake/moose.in b/cmake/moose.in
deleted file mode 100755
index b8137171cb352eb21d82c4504ddab850bea976e3..0000000000000000000000000000000000000000
--- a/cmake/moose.in
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-(
-    cd @CMAKE_INSTALL_PREFIX@/lib/moose/gui && python mgui.py & 
-)
diff --git a/cmake/moosegui.in b/cmake/moosegui.in
new file mode 100755
index 0000000000000000000000000000000000000000..617784e22beccbf163f24cfe1be99f72373c36a4
--- /dev/null
+++ b/cmake/moosegui.in
@@ -0,0 +1,3 @@
+#!/bin/sh 
+
+cd @CMAKE_INSTALL_PREFIX@/lib/moose/gui && python mgui.py 
diff --git a/debian/changelog b/debian/changelog
index 7642b59979100c707d13debcbcae3ba611f59eb3..c0c7780432af2bfb26002bb751fff79cceaec304 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-moose (3.1.2ubuntu1) UNRELEASED; urgency=medium
+moose (3.2.git) UNRELEASED; urgency=medium
 
-  * Nightly build of chamcham (3.1.x) series. 
+    * Nightly build. 
 
- -- Dilawar Singh <dilawars@Gulgula>  Mon, 08 May 2017 13:40:08 +0530
+ -- Dilawar Singh <dilawars@ncbs.res.in>  Sat, 16 Dec 2017 10:17:08 +0530
 
 moose (3.0.2) unstable; urgency=low
 
diff --git a/debian/install b/debian/install
index dfe7ff616573806c4782f59694494930e0453b28..f3eed99f2351a925e2a381f52d1dff583b5b1979 100644
--- a/debian/install
+++ b/debian/install
@@ -1,3 +1,3 @@
 usr/lib/moose
 usr/lib/python*
-usr/bin/moose
+usr/bin/moosegui
diff --git a/moose-core/.travis/travis_build_osx.sh b/moose-core/.travis/travis_build_osx.sh
index e710a00eb9f3955b3d9b61f792e8ebb59ff12edb..f021ef26333f8ebbda5a115a72f0812e66c8e9e3 100755
--- a/moose-core/.travis/travis_build_osx.sh
+++ b/moose-core/.travis/travis_build_osx.sh
@@ -21,10 +21,14 @@ set -o nounset                              # Treat unset variables as an error
 set -e
 
 (
-    mkdir -p _GSL_BUILD && cd _GSL_BUILD && cmake -DQUIET_MODE=ON -DDEBUG=ON -DPYTHON_EXECUTABLE=`which python` ..
+    mkdir -p _GSL_BUILD && cd _GSL_BUILD \
+        && cmake -DQUIET_MODE=ON -DDEBUG=ON \
+        -DPYTHON_EXECUTABLE=`which python` ..
     make && ctest --output-on-failure
     cd .. # Now with boost.
-    mkdir -p _BOOST_BUILD && cd _BOOST_BUILD && cmake -DWITH_BOOST=ON -DDEBUG=ON -DPYTHON_EXECUTABLE=`which python` ..
+    mkdir -p _BOOST_BUILD && cd _BOOST_BUILD \
+        && cmake -DWITH_BOOST=ON -DDEBUG=ON \
+        -DPYTHON_EXECUTABLE=`which python` ..
     make && ctest --output-on-failure
     cd ..
 )
diff --git a/moose-core/.travis/travis_prepare_osx.sh b/moose-core/.travis/travis_prepare_osx.sh
index 61fdea5b0a4d2f23b16d19ee1d8b1348b69142e5..b7e0fe3f76c1be14ae51101905f2479755e6cd41 100755
--- a/moose-core/.travis/travis_prepare_osx.sh
+++ b/moose-core/.travis/travis_prepare_osx.sh
@@ -19,17 +19,19 @@
 
 set -o nounset                              # Treat unset variables as an error
 set +e
-rvm get head
-brew update
+#rvm get head
+#brew update
 #brew outdated cmake || brew install cmake
 brew install gsl
 brew install hdf5
-brew install homebrew/science/libsbml
+brew install python
+brew install numpy
 #brew outdated python || brew install python
 #brew outdated numpy || brew install homebrew/python/numpy
-#brew unlink numpy && brew link numpy || echo "Failed to link numpy"
+brew unlink numpy && brew link numpy || echo "Failed to link numpy"
 # Numpy caveats
 mkdir -p $HOME/Library/Python/2.7/lib/python/site-packages
 echo 'import sys; sys.path.insert(1, "/usr/local/lib/python2.7/site-packages")' >> $HOME/Library/Python/2.7/lib/python/site-packages/homebrew.pth
-pip install matplotlib
-
+# ensurepip
+#python -m ensurepip
+pip2 install matplotlib --user
diff --git a/moose-core/CMakeLists.txt b/moose-core/CMakeLists.txt
index 4b4fe8f1a63212e8957cc6b6567d54a03fbb0ac6..b9b807ff48d7e86759953e8f6269cba6860b9c85 100644
--- a/moose-core/CMakeLists.txt
+++ b/moose-core/CMakeLists.txt
@@ -407,11 +407,16 @@ execute_process(
 message( STATUS "Platform ${_platform_desc}" )
 
 
-set(EXTRA_ARGS "--prefix ${CMAKE_INSTALL_PREFIX}")
-
-if( ${_platform_desc} MATCHES ".*(Ubuntu|Debian).*" )
-    list( APPEND EXTRA_ARGS "--install-layout=deb" )
-endif( )
+# DISTUTILS_EXTRA_ARGS may come of top-level cmake script. On DEBIAN/UBUNTU, it
+# is most likely to be --install-layout=deb .
+set(EXTRA_ARGS "--prefix ${CMAKE_INSTALL_PREFIX} ${DISTUTILS_EXTRA_ARGS}")
+
+## NOTE: Disable it here. It must be handled by moose repository CMakeLists.txt
+## which is used in created packages. For normal user, it should install in
+## site-packages.
+#if( ${_platform_desc} MATCHES ".*(Ubuntu|Debian).*" )
+#    list( APPEND EXTRA_ARGS "--install-layout=deb" )
+#endif( )
 
 # If make is called with sudo, install in system directories. Otherwise use
 # --user to install in user home.
diff --git a/moose-core/basecode/Id.h b/moose-core/basecode/Id.h
index 04bb31523e660bf417281fb130cfa14d770cee90..9aed5e9beac5e6cf1b7ac6b57317d1c00da827db 100644
--- a/moose-core/basecode/Id.h
+++ b/moose-core/basecode/Id.h
@@ -174,4 +174,13 @@ private:
     static vector< Element* >& elements();
 };
 
+namespace std {
+	template <> class hash<Id>{
+			public :
+			size_t operator()(const Id &x ) const{
+			return hash<unsigned int>()( x.value() );
+		}
+	};
+}
+
 #endif // _ID_H
diff --git a/moose-core/basecode/header.h b/moose-core/basecode/header.h
index 629560048afea7b908aedbe70e5c3c2737dbfb87..595b7f26b6424a3619a3d06812e458c86b81658d 100644
--- a/moose-core/basecode/header.h
+++ b/moose-core/basecode/header.h
@@ -16,6 +16,7 @@
 #include <vector>
 #include <string>
 #include <map>
+#include <unordered_map>
 #include <iostream>
 #include <sstream>
 #include <typeinfo> // used in Conv.h to extract compiler independent typeid
diff --git a/moose-core/biophysics/CompartmentBase.cpp b/moose-core/biophysics/CompartmentBase.cpp
index 94ac948d7fbdaff6a4eae98cfe4b40914ad00f10..1528f54f6cde2ba2d9e54cb0dcf729848e357a5b 100644
--- a/moose-core/biophysics/CompartmentBase.cpp
+++ b/moose-core/biophysics/CompartmentBase.cpp
@@ -636,6 +636,15 @@ void CompartmentBase::displace( double dx, double dy, double dz )
 	z_ += dz;
 }
 
+static bool hasScaleFormula( const Eref& e ) {
+	vector< Id > kids;
+	Neutral::children( e, kids );
+	for ( vector< Id >::iterator j = kids.begin(); j != kids.end(); j++ )
+		if ( j->element()->getName() == "scaleFormula" )
+			return true;
+	return false;
+}
+
 void CompartmentBase::setGeomAndElec( const Eref& e,
 				double len, double dia )
 {
@@ -650,6 +659,8 @@ void CompartmentBase::setGeomAndElec( const Eref& e,
 		vector< ObjId > chans;
 		allChildren( e.objId(), ALLDATA, "ISA=ChanBase", chans );
 		for ( unsigned int i = 0; i < chans.size(); ++i ) {
+			if ( hasScaleFormula( chans[i].eref() ) )
+				continue; // Later we will eval the formula with len and dia
 			double gbar = Field< double >::get( chans[i], "Gbar" );
 			gbar *= len * dia / ( length_ * diameter_ );
 			Field< double >::set( chans[i], "Gbar", gbar );
diff --git a/moose-core/biophysics/Neuron.cpp b/moose-core/biophysics/Neuron.cpp
index 265635734f0cdc1e94456022614e5a7314321ff3..6a5e42d390dcae427fdc6031541a51becc962d89 100644
--- a/moose-core/biophysics/Neuron.cpp
+++ b/moose-core/biophysics/Neuron.cpp
@@ -1111,6 +1111,7 @@ void Neuron::buildElist( const Eref& e,
     ObjId oldCwe = shell->getCwe();
     shell->setCwe( e.objId() );
     wildcardFind( path, elist );
+	sort( elist.begin(), elist.end() );
     shell->setCwe( oldCwe );
     evalExprForElist( elist, expr, val );
 }
@@ -1285,6 +1286,8 @@ static void fillSegments( vector< SwcSegment >& segs,
                     comptType = 3; // generic dendrite
                 }
             }
+			// cout << "Seg[" << i << "].xy = " << int(x*1e6) << " " << int(y*1e6) << endl;
+
             segs.push_back(
                 SwcSegment( i, comptType, x, y, z, dia/2.0, paIndex ) );
         }
@@ -1347,6 +1350,7 @@ void Neuron::buildSegmentTree( const Eref& e )
 {
     vector< Id > kids;
     Neutral::children( e, kids );
+	sort( kids.begin(), kids.end() );
 
     soma_ = fillSegIndex( kids, segIndex_ );
     if ( kids.size() == 0 || soma_ == Id() )
diff --git a/moose-core/ksolve/ZombieEnz.cpp b/moose-core/ksolve/ZombieEnz.cpp
index 8e56b9c7a67c0a7489664d5d73477878073a610b..361ac111f64eefa17f2bfda8c5eb68c06304f747 100644
--- a/moose-core/ksolve/ZombieEnz.cpp
+++ b/moose-core/ksolve/ZombieEnz.cpp
@@ -224,22 +224,28 @@ void ZombieEnz::setSolver( Id stoich, Id enz )
 	bool isOK = true;
 	unsigned int numReactants;
 	numReactants = enz.element()->getNeighbors( enzMols, enzFinfo );
-	isOK &= ( numReactants == 1 );
+	bool hasEnz = ( numReactants == 1 );
 	vector< Id > subs;
 	numReactants = enz.element()->getNeighbors( subs, subFinfo );
-	isOK &= ( numReactants > 0 );
+	bool hasSubs = ( numReactants > 0 );
 	numReactants = enz.element()->getNeighbors( cplxMols, cplxFinfo );
-	isOK &= ( numReactants == 1 );
+	bool hasCplx = ( numReactants == 1 );
 	vector< Id > prds;
 	numReactants = enz.element()->getNeighbors( prds, prdFinfo );
-	isOK &= ( numReactants > 0 );
+	bool hasPrds = ( numReactants > 0 );
 	assert( stoich.element()->cinfo()->isA( "Stoich" ) );
 	stoich_ = reinterpret_cast< Stoich* >( stoich.eref().data() );
 
-	if ( isOK ) {
+	if ( hasEnz && hasSubs && hasCplx && hasPrds ) {
 		stoich_->installEnzyme( enz, enzMols[0], cplxMols[0], subs, prds );
 	} else {
 		stoich_->installDummyEnzyme( enz, Id() );
-		cout << "Warning: ZombieEnz:setSolver: Dangling Enz, missing a substrate or product\n";
+		string msg = "";
+		if ( !hasEnz ) msg = msg + " enzyme";
+		if ( !hasCplx ) msg = msg + " enzyme-substrate complex";
+		if ( !hasSubs ) msg = msg + " substrates";
+		if ( !hasPrds ) msg = msg + " products";
+		cout << "Warning: ZombieEnz:setSolver: Dangling Enz '" <<
+			enz.path() << "':\nMissing " << msg << endl;
 	}
 }
diff --git a/moose-core/mesh/NeuroMesh.cpp b/moose-core/mesh/NeuroMesh.cpp
index 968c6c833e5aa29cc871b11609fe7a54c7005f0d..2cf28411d06d8df1ed5d2b0edf922279e0eb2245 100644
--- a/moose-core/mesh/NeuroMesh.cpp
+++ b/moose-core/mesh/NeuroMesh.cpp
@@ -648,6 +648,7 @@ void NeuroMesh::updateShaftParents()
 // Uses all compartments, and if they have spines on them adds those too.
 void NeuroMesh::setSubTree( const Eref& e, vector< ObjId > compts )
 {
+    sort( compts.begin(), compts.end() );
     if ( separateSpines_ )
     {
         NeuroNode::buildSpinyTree( compts, nodes_, shaft_, head_, parent_);
diff --git a/moose-core/mesh/NeuroNode.cpp b/moose-core/mesh/NeuroNode.cpp
index 6afac30e72f6d9ee32f9dc000c3f3a6a94db4e04..9e86634acaf067e232023a23daba1e53f2035476 100644
--- a/moose-core/mesh/NeuroNode.cpp
+++ b/moose-core/mesh/NeuroNode.cpp
@@ -427,7 +427,7 @@ static bool checkForSpine( unsigned int dendIndex, Id compt,
  *
  */
 static void spinyTraverse( unsigned int dendIndex,
-	vector< Id >& dend, const map< Id, unsigned int >& dendMap,
+	vector< Id >& dend, const unordered_map< Id, unsigned int >& dendMap,
 	vector< int >& seen, unsigned int numSeen,
 	vector< Id >& shaftId, vector< Id >& headId,
 	vector< int >& dendParent, vector< unsigned int >& spineParent
@@ -436,7 +436,7 @@ static void spinyTraverse( unsigned int dendIndex,
 	vector< Id > conn = findAllConnectedCompartments( dend[dendIndex] );
 	seen[ dendIndex ] = numSeen;
 	for ( vector< Id >::iterator i = conn.begin(); i != conn.end(); ++i ) {
-		map< Id, unsigned int >::const_iterator idLookup =
+		unordered_map< Id, unsigned int >::const_iterator idLookup =
 				dendMap.find( *i );
 		if ( idLookup != dendMap.end() ) {
 			if ( !seen[ idLookup->second ] ) {
@@ -451,6 +451,32 @@ static void spinyTraverse( unsigned int dendIndex,
 	}
 }
 
+// Takes all 3 arrays, gets an array of indices that sorts them by shaftId,
+// and then uses it to sort them all.
+// Based on a post by quantdev on StackOverflow.
+static void sortByShaftIds( vector< Id >& shaftId, vector< Id >& headId,
+	vector< unsigned int >& spineParent )
+{
+	size_t sortedIndex(0);
+	vector<int> y(shaftId.size());
+	generate(begin(y), end(y), [&]{ return sortedIndex++; });
+	sort(  begin(y), end(y),
+		[&](int i1, int i2) { return shaftId[i1] < shaftId[i2]; } );
+
+	assert( sortedIndex == shaftId.size() );
+	assert( sortedIndex == headId.size() );
+	assert( sortedIndex == spineParent.size() );
+
+	auto a = shaftId;
+	auto b = headId;
+	auto c = spineParent;
+	for ( size_t i = 0; i < sortedIndex; ++i) {
+		shaftId[i] = a[y[i]];
+		headId[i] = b[y[i]];
+		spineParent[i] = c[y[i]];
+	}
+}
+
 /**
  * This function takes a list of elements and builds a tree.
  * Info on any attached spines are placed in the
@@ -469,12 +495,13 @@ void NeuroNode::buildSpinyTree(
 {
 	nodes.clear();
 	sort( elist.begin(), elist.end() );
-	map< Id, unsigned int > dendMap;
+	unordered_map< Id, unsigned int > dendMap;
 	vector< Id > dend;
 	for ( vector< ObjId >::iterator
 		i = elist.begin(); i != elist.end(); ++i ) {
 		if ( isPartOfDend( *i ) ) {
 			dendMap[ *i ] = dend.size();
+			//cout << "st: dendMap[" << *i << "] = " << dend.size() << endl;
 			dend.push_back( *i );
 		}
 	}
@@ -487,6 +514,9 @@ void NeuroNode::buildSpinyTree(
 			shaftId, headId,
 			dendParent, spineParent );
 	}
+	// Here I sort by shaftIds. I have 4 parallel arrays, so I get the
+	// Index order of the whole lot that will sort the shaftIds.
+	sortByShaftIds( shaftId, headId, spineParent );
 	if ( numSeen == 0 )
 		return;
 	for ( unsigned int i = 0; i < dend.size(); ++i )
@@ -501,10 +531,10 @@ void NeuroNode::buildSpinyTree(
 }
 
 void NeuroNode::setParentAndChildren( unsigned int index, int dendParent,
-	vector< NeuroNode >& nodes, const map< Id, unsigned int >& dendMap )
+	vector< NeuroNode >& nodes, const unordered_map< Id, unsigned int >& dendMap )
 {
 	parent_ = dendParent;
-	const map< Id, unsigned int >::const_iterator dendLookup =
+	const unordered_map< Id, unsigned int >::const_iterator dendLookup =
 			dendMap.find( nodes[dendParent].elecCompt_ );
 	if ( dendLookup != dendMap.end() ) {
 		assert( dendLookup->second < nodes.size() );
diff --git a/moose-core/mesh/NeuroNode.h b/moose-core/mesh/NeuroNode.h
index bb6b5aace1df1c705203947577433e5115be34e6..9c784fcbaabd9429193faffa25617ec3e50f3f7a 100644
--- a/moose-core/mesh/NeuroNode.h
+++ b/moose-core/mesh/NeuroNode.h
@@ -165,7 +165,7 @@ class NeuroNode: public CylBase
 					vector< unsigned int >& spineParent );
 		void setParentAndChildren( unsigned int index, int dendParent,
 				vector< NeuroNode >& nodes,
-				const map< Id, unsigned int >& dendMap );
+				const unordered_map< Id, unsigned int >& dendMap );
 
 		/**
 		 * Trims off all spines from tree. Does so by identifying a set of
diff --git a/moose-core/mesh/SpineMesh.cpp b/moose-core/mesh/SpineMesh.cpp
index a09c3ccde82a1c4121a65edafc3a58bc1c443695..4fca087264fe7e29ee46db92010529ffd8df98a6 100644
--- a/moose-core/mesh/SpineMesh.cpp
+++ b/moose-core/mesh/SpineMesh.cpp
@@ -260,6 +260,7 @@ void SpineMesh::handleSpineList(
 		vector< unsigned int > index( head.size(), 0 );
 		for ( unsigned int i = 0; i < head.size(); ++i ) {
 			spines_[i] = SpineEntry( shaft[i], head[i], parentVoxel[i] );
+			// cout << i << "	" << head[i] << ", pa = " << parentVoxel[i] << endl;
 			// ret = spines_[i].psdCoords();
 			// assert( ret.size() == 8 );
 			// psdCoords.insert( psdCoords.end(), ret.begin(), ret.end() );
diff --git a/moose-core/python/rdesigneur/rdesigneur.py b/moose-core/python/rdesigneur/rdesigneur.py
index 375fe76dec4b290b0e68c85c65370df6cef148cb..8665281d89c7954d9828930c5e492c18c59e5930 100644
--- a/moose-core/python/rdesigneur/rdesigneur.py
+++ b/moose-core/python/rdesigneur/rdesigneur.py
@@ -527,9 +527,14 @@ class rdesigneur:
             cc = moose.element( self.modelPath + '/chem/' + chemCompt)
             voxelVec = []
             temp = [ self._makeUniqueNameStr( i ) for i in comptList ]
+            #print( temp )
+            #print( "#####################" )
             comptSet = set( temp )
             #em = [ moose.element(i) for i in cc.elecComptMap ]
-            em = [ self._makeUniqueNameStr(i) for i in cc.elecComptMap ]
+            em = sorted( [ self._makeUniqueNameStr(i[0]) for i in cc.elecComptMap ] )
+            #print( em )
+            #print( "=================================================" )
+
             voxelVec = [i for i in range(len( em ) ) if em[i] in comptSet ]
             # Here we collapse the voxelVec into objects to plot.
             allObj = moose.vec( self.modelPath + '/chem/' + plotSpec[2] )
@@ -574,6 +579,7 @@ class rdesigneur:
             assert( plotField == plotField2 )
             plotObj3 = plotObj + plotObj2
             numPlots = sum( q != dummy for q in plotObj3 )
+            #print( "PlotList: {0}: numobj={1}, field ={2}, nd={3}, ns={4}".format( pair, numPlots, plotField, len( dendCompts ), len( spineCompts ) ) )
             if numPlots > 0:
                 tabname = graphs.path + '/plot' + str(k)
                 scale = knownFields[i[3]][2]
@@ -911,7 +917,6 @@ class rdesigneur:
     ################################################################
     # Utility function for setting up clocks.
     def _configureClocks( self ):
-        t0 = time.time()
         if self.turnOffElec:
             elecDt = 1e6
             elecPlotDt = 1e6
@@ -920,21 +925,16 @@ class rdesigneur:
             elecPlotDt = self.elecPlotDt
         diffDt = self.diffDt
         chemDt = self.chemDt
-        print( "t1 = {}".format( time.time() - t0 ) )
         for i in range( 0, 9 ):
             moose.setClock( i, elecDt )
         moose.setClock( 8, elecPlotDt )
         moose.setClock( 10, diffDt )
-        print( "t2 = {}".format( time.time() - t0 ) )
         for i in range( 11, 18 ):
             moose.setClock( i, chemDt )
         moose.setClock( 18, self.chemPlotDt )
-        print( "t3 = {}".format( time.time() - t0 ) )
         hsolve = moose.HSolve( self.elecid.path + '/hsolve' )
         hsolve.dt = elecDt
-        print( "t4 = {}".format( time.time() - t0 ) )
         hsolve.target = self.soma.path
-        print( "t5 = {}".format( time.time() - t0 ) )
         sys.stdout.flush()
     ################################################################
     ################################################################
diff --git a/moose-core/python/setup.cmake.py b/moose-core/python/setup.cmake.py
index 6ba579883d70c713eb21b00068573435048b75a5..54bcc4257a3364dfa1d2dc5089ecf2449ec2e3c2 100644
--- a/moose-core/python/setup.cmake.py
+++ b/moose-core/python/setup.cmake.py
@@ -18,33 +18,11 @@ __status__           = "Development"
 
 import os
 import sys
-import site
-
-# if uid is zero then install in root paths. Else install it in user path.
-
-#print( '[INFO] Overwriting --prefix ' )
-#try:
-#    prefixLoc = sys.argv.index( '--prefix' )
-#    del sys.argv[ prefixLoc ]
-#    del sys.argv[ prefixLoc ]
-#except Exception as e:
-#    pass
-#
-#uid = os.getuid( )
-#if uid == 0:
-#    # Here comes the root.
-#    print( '   called by sudo' )
-#    sys.argv += [ '--prefix', '/usr' ]
-#else:
-#    sys.argv += [ '--prefix', site.getuserbase( ) ]
-#
-#print( sys.argv )
 
 from distutils.core import setup
-
 script_dir = os.path.dirname( os.path.abspath( __file__ ) )
-
 version = '3.2.git'
+
 try:
     with open( os.path.join( script_dir, '..', 'VERSION'), 'r' ) as f:
         version = f.read( )
diff --git a/moose-gui/plugins/kkit.py b/moose-gui/plugins/kkit.py
index b6f7fb5a4a249931a336f7a2e576ab4d6b87bea0..01c6d465389dbd74e6ab269d7ef21930da350362 100644
--- a/moose-gui/plugins/kkit.py
+++ b/moose-gui/plugins/kkit.py
@@ -448,6 +448,8 @@ class  KineticsWidget(EditorWidgetBase):
                 autoCoordinates(self.meshEntry,self.srcdesConnection)
         
         self.size = QtCore.QSize(1000 ,550)
+
+	'''
         if self.xmax-self.xmin != 0:
             self.xratio = (self.size.width()-10)/(self.xmax-self.xmin)
         else: self.xratio = self.size.width()-10
@@ -462,7 +464,7 @@ class  KineticsWidget(EditorWidgetBase):
             self.xratio = 1
         if self.yratio == 0:
             self.yratio = 1
-
+	'''
     def sizeHint(self):
         return QtCore.QSize(800,400)