diff --git a/moose-core/Makefile b/moose-core/Makefile
deleted file mode 100644
index 5dda459827e9ab9c719b762b9e19946bd0ab0daf..0000000000000000000000000000000000000000
--- a/moose-core/Makefile
+++ /dev/null
@@ -1,512 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment,
-#** also known as GENESIS 3 base code.
-#**           copyright (C) 2003- 2006 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-#######################################################################
-# NOTE:
-# This Makefile is compatible with _GNU Make_.
-# This does not work with nmake or borland make.
-# You may have to specify some variables when calling gnu make as
-# described in the comments below. The defaults should work on most
-# Unix clones.
-########################################################################
-
-# Linux compilation:
-# We recommend two levels of compilation: either full debug, with gdb,
-# unit tests and all the rest, or an optimized version for production
-# simulations, without any unit tests or assertions. If you want some
-# intermediate levels, edit the flags.
-######################################################################
-#
-#     ADDITIONAL COMMANDLINE VARIABLES FOR MAKE
-#
-######################################################################
-# The variable BUILD determines if it should be optimized (release)
-# or a debug version (default).
-# make can be run with a command line parameter like below:
-# make clean BUILD=debug
-# make BUILD=debug
-# another option is to define BUILD as an environment variable:
-# export BUILD=debug
-# make clean
-# make
-#
-# There are some more variables which just need to be defined for
-# controlling the compilation and the value does not matter. These are:
-#
-# USE_GSL - use GNU Scientific Library for integration in kinetic simulations
-#
-# USE_READLINE - use the readline library which provides command history and
-# 		better command line editing capabilities
-#
-# GENERATE_WRAPPERS - useful for python interface developers. The binary created
-# 		with this option looks for a directory named 'generated' in the
-# 		working directory and creates a wrapper class ( one .h file
-# 		and a .cpp file ) and partial code for the swig interface file
-# 		(pymoose.i). These files with some modification can be used for
-# 		generating the python interface using swig.
-#
-# USE_MPI - compile with support for parallel computing through MPICH library
-
-
-# Default values for flags. The operator ?= assigns the given value only if the
-# variable is not already defined.
-
-USE_HDF5?=1
-USE_CUDA?=0
-USE_NEUROKIT?=0
-PYTHON?=2
-# BUILD (= debug, release)
-ifndef BUILD
-BUILD=release
-endif
-
-#If using mac uncomment the following lines
-# PLATFORM=mac
-#export PLATFORM
-
-# Get the processor architecture - i686 or x86_64
-# All these should be taken care of in a script, not in the
-# Makefile. But we are
-ifndef MACHINE
-MACHINE=i686
-endif
-# We are assuming all non-win32 systems to be POSIX compliant
-# and thus have the command uname for getting Unix system name
-ifneq ($(OSTYPE),win32)
-MACHINE=$(shell uname -m)
-PLATFORM := $(shell uname -s)
-endif
-
-USE_NUMPY=1
-# Debug mode:
-
-ifeq ($(BUILD),debug)
-CXXFLAGS = -g -O0 -fpermissive -fno-strict-aliasing -fPIC -fno-inline-functions -Wall -Wno-long-long -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER
-USE_GSL = true
-endif
-# Optimized mode:
-ifeq ($(BUILD),release)
-CXXFLAGS  = -O3 -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER
-USE_GSL = true
-endif
-# Profiling mode:
-ifeq ($(BUILD),profile)
-CXXFLAGS  = -O3 -pg  -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER
-USE_GSL = true
-endif
-# Profiling mode with gperftoools
-ifeq ($(BUILD),gperf)
-CXXFLAGS  = -O3 -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER
-LDFLAGS += -lprofiler -ltcmalloc
-USE_GSL = true
-endif
-# Threading mode:
-ifeq ($(BUILD),thread)
-CXXFLAGS  = -O3 -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER
-USE_GSL = true
-endif
-
-# MPI mode:
-ifeq ($(BUILD),mpi)
-CXXFLAGS = -g -fpermissive -fno-strict-aliasing -fPIC -fno-inline-functions -Wall -Wno-long-long -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER
-USE_MPI = 1
-USE_GSL = true
-endif
-
-# optimized MPI mode:
-ifeq ($(BUILD),ompi)
-CXXFLAGS  = -O3 -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER
-USE_MPI = 1
-USE_GSL = true
-endif
-
-# optimised mode but with unit tests.
-ifeq ($(BUILD),odebug)
-CXXFLAGS = -O3 -Wall -Wno-long-long -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER
-USE_GSL = true
-endif
-
-# including SMOLDYN
-ifdef USE_SMOLDYN
-CXXFLAGS = -g -Wall -Wno-long-long -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER
-USE_GSL = true
-endif
-
-# Use a strict compilation
-ifeq ($(BUILD),developer)
-    CXXFLAGS=-g \
-	     -Wall -Werror -Wno-unused-variable -Wno-unused-function \
-	     -DDO_UNIT_TESTS -DDEVELOPER -DDEBUG
-    USE_GSL = true
-endif
-##########################################################################
-#
-# MAC OS X compilation, Debug mode:
-ifeq ($(PLATFORM),Darwin)
-CXXFLAGS += -DMACOSX # GCC compiler also sets __APPLE__ for Mac OS X which can be used instead
-CXXFLAGS += -Wno-deprecated -force_cpusubtype_ALL -mmacosx-version-min=10.4
-endif
-# Use the options below for compiling on GCC4.1
-# GNU C++ 4.1 and newer might need -ffriend-injection
-#
-#CXXFLAGS  =	-g -Wall -pedantic -DDO_UNIT_TESTS -ffriend-injection -DUSE_GENESIS_PARSER
-
-# Insert the svn revision no. into the code as a preprocessor macro.
-# Only for release versions we want to pass SVN=0 to make.
-# No more SVN so pass zero
-SVN=0
-ifndef SVN
-SVN?=1
-endif
-empty :=
-space := $(empty) $(empty)
-ifneq ($(SVN),0)
-# Some versions of svnrevision return "Unversioned directory" which causes confusion to gcc
-SVN_REVISION := $(shell svnversion)
-SVN_REVISION := $(subst $(space),_,$(SVN_REVISION))
-# SVN_REVISION := $(subst :,_,$(SVN_REVISION))
-ifneq ($(SVN_REVISION),export)
-CXXFLAGS+=-DSVN_REVISION=\"$(SVN_REVISION)\"
-endif
-endif
-
-
-# Libraries are defined below.
-SUBLIBS =
-# Notice that pthread is no more included
-LIBS =	-L/usr/lib -L/usr/local/lib
-
-#LIBS = 	-lm
-
-# For 64 bit Linux systems add paths to 64 bit libraries
-ifeq ($(PLATFORM),Linux)
-CXXFLAGS += -DLINUX
-ifeq ($(MACHINE),x86_64)
-LIBS+= -L/lib64 -L/usr/lib64
-endif
-endif
-
-##########################################################################
-#
-# Developer options (Don't try these unless you are writing new code!)
-##########################################################################
-# For parallel (MPI) version:
-ifdef USE_MUSIC
-USE_MPI = 1		# Automatically enable MPI if USE_MUSIC is on
-CXXFLAGS += -DUSE_MUSIC
-LIBS += -lmusic
-endif
-
-# The -DMPICH_IGNORE_CXX_SEEK flag is because of a bug in the
-# MPI-2 standard. Enabled by default because it use crops up
-# often enough. You won't need if if you are not using MPICH, or
-# if your version of MPICH has fixed the issue.
-ifdef USE_MPI
-# CXXFLAGS += -DUSE_MPI
-CXXFLAGS += -DUSE_MPI -DMPICH_IGNORE_CXX_SEEK
-endif
-
-#use this for readline library
-#CXXFLAGS = -g -Wall -pedantic -DDO_UNIT_TESTS -DUSE_GENESIS_PARSER -DUSE_READLINE
-
-
-# To use GSL, pass USE_GSL=true ( anything on the right will do) in make command line
-ifdef USE_GSL
-LIBS+= $(shell gsl-config --libs)
-#LIBS+= -L/usr/lib -Wl,--no-as-needed -lgsl -lgslcblas -lm
-#LIBS+= -L/usr/lib -lgsl -lgslcblas -lm
-CXXFLAGS+= -DUSE_GSL
-else
-LIBS+= -lm
-endif
-
-#Saeed
-# To use CUDA, pass USE_CUDA=1 in make command line
-ifeq ($(USE_CUDA),1)
-LIBS+= -L/usr/local/cuda/lib64 -LhsolveCuda/cudaLibrary  -lcuda -lcudart -lm -lmooseCudaLibrary
-HCUDA_DIR = hsolveCuda
-HCUDA_LIB = hsolveCuda/_hsolveCuda.o
-endif
-
-# To disable numpy pass USE_NUMPY=0
-ifeq ($(USE_NUMPY),1)
-CXXFLAGS+=-DUSE_NUMPY
-endif
-
-# To compile examples, pass EXAMPLES=true ( anything on the right will do) in make command line
-ifdef EXAMPLES
-EXAMPLES_DIR = examples
-EXAMPLES_LIB = examples/_trials.o
-endif
-
-# To use Smoldyn, pass USE_SMOLDYN=true ( anything on the right will do) in make command line
-ifdef USE_SMOLDYN
-#LIBS+= -L/usr/local/lib -lsmoldyn
-CXXFLAGS+= -DUSE_SMOLDYN
-SMOLDYN_DIR = smol
-SMOLDYN_LIB = smol/_smol.o /usr/local/lib/libsmoldyn.a
-LIBS += -lsmoldyn
-endif
-
-# To compile with readline support pass USE_READLINE=true in make command line
-ifdef USE_READLINE
-LIBS+= -lreadline
-CXXFLAGS+= -DUSE_READLINE
-endif
-
-# To compile with curses support (terminal aware printing) pass USE_CURSES=true in make command line
-ifdef USE_CURSES
-LIBS += -lcurses
-CXXFLAGS+= -DUSE_CURSES
-endif
-
-ifdef USE_MUSIC
-	MUSIC_DIR = music
-	MUSIC_LIB = music/music.o
-endif
-
-# Here we automagically change compilers to deal with MPI.
-ifdef USE_MPI
-	CXX = mpicxx
-#	CXX = /usr/local/mvapich2/bin/mpicxx
-#	PARALLEL_DIR = parallel
-#	PARALLEL_LIB = parallel/parallel.o
-else
-	CXX = g++
-#	CXX = CC	# Choose between Solaris CC and g++ on a Solaris machine
-endif
-
-ifeq ($(USE_HDF5),1)
-	CXXFLAGS+= -DUSE_HDF5  -DH5_NO_DEPRECATED_SYMBOLS -I/usr/local/hdf5/include -I/usr/include/hdf5/serial
-	LIBS+= -lhdf5 -lhdf5_hl -L/usr/local/hdf5/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial/
-endif
-
-LD = ld
-
-SUBDIR = \
-	basecode \
-	msg \
-	shell \
-	randnum\
-	scheduling\
-	mpi \
-	builtins\
-	utility \
-	external/muparser \
-	biophysics \
-	synapse \
-	intfire \
-	kinetics \
-	ksolve \
-	mesh \
-	hsolve \
-	diffusion \
-	device \
-	signeur \
-	benchmarks \
-	$(SMOLDYN_DIR) \
-	$(SBML_DIR) \
-	$(HCUDA_DIR) \
-	$(EXAMPLES_DIR) \
-
-# Used for 'make clean'
-CLEANSUBDIR = $(SUBDIR) $(PARALLEL_DIR) pymoose
-
-OBJLIBS =	\
-	basecode/_basecode.o \
-	msg/_msg.o \
-	shell/_shell.o \
-	randnum/_randnum.o \
-	scheduling/_scheduling.o \
-	mpi/_mpi.o \
-	builtins/_builtins.o \
-	utility/_utility.o \
-	external/muparser/_muparser.o \
-	biophysics/_biophysics.o \
-	synapse/_synapse.o \
-	intfire/_intfire.o \
-	kinetics/_kinetics.o \
-	ksolve/_ksolve.o \
-	hsolve/_hsolve.o \
-	mesh/_mesh.o \
-	diffusion/_diffusion.o \
-	device/_device.o \
-	signeur/_signeur.o \
-	benchmarks/_benchmarks.o \
-	$(SMOLDYN_LIB) \
-	$(SBML_LIB) \
-	$(HCUDA_LIB) \
-	$(EXAMPLES_LIB) \
-
-
-ifeq ($(USE_NEUROKIT),1)
-	NEUROKIT_COMMAND = cd ./python/moogli; python setup.py build;  cd ../../; cp ./python/moogli/build/*/_moogli.so ./python/moogli/;
-# else
-# 	NEUROKIT_COMMAND = ""
-endif
-
-
-export CXX
-export CXXFLAGS
-export LD
-export LIBS
-export USE_GSL
-#export USE_SBML
-
-all: moose pymoose
-
-neurokit: ./python/moogli/setup.py
-	$(NEUROKIT_COMMAND)
-
-moose: libs $(OBJLIBS) $(PARALLEL_LIB)
-	$(CXX) $(CXXFLAGS) $(OBJLIBS) $(PARALLEL_LIB) $(LIBS) -o moose
-	@echo "Moose compilation finished"
-
-libmoose.so: libs
-	$(CXX) -G $(LIBS) -o libmoose.so
-	@echo "Created dynamic library"
-
-# Get the python version
-ifneq ($(OSTYPE),win32)
-ifeq ($(PYTHON),3)
-PYTHON_VERSION := $(subst ., ,$(lastword $(shell python3 --version 2>&1)))
-PYTHON_CFLAGS := $(shell python3-config --cflags)
-PYTHON_LDFLAGS := $(shell python3-config --ldflags)
-else # Python 2.x
-PYTHON_VERSION := $(subst ., ,$(lastword $(shell python --version 2>&1)))
-ifneq ($(BUILD),debug)
-PYTHON_CFLAGS := $(shell python-config --cflags)
-PYTHON_LDFLAGS := $(shell python-config --ldflags)
-else
-PYTHON_CFLAGS := $(shell python-config --includes) \
-    -fno-strict-aliasing -fwrapv \
-    -Wstrict-prototypes  \
-    -Wformat -Wformat-security -Werror=format-security \
-    -fstack-protector --param=ssp-buffer-size=4
-
-PYTHON_LDFLAGS := -L/usr/lib/$(INSTALLED_PYTHON) \
-    -Xlinker -export-dynamic -Wl,-O0 -Wl,-Bsymbolic-functions
-endif # ifneq ($(BUILD),debug)
-endif # ifeq ($(PYTHON),3)
-PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION})
-PYTHON_VERSION_MINOR := $(word 2,${PYTHON_VERSION})
-INSTALLED_PYTHON := python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
-endif
-
-# For developer build and strict checking
-ifeq ($(BUILD),developer)
-    PYTHON_CFLAGS := $(PYTHON_CFLAGS) -Wall -Werror -Wno-unused-function -Wno-unused-variable
-endif  # ifeq(${BUILD},developer)
-
-ifndef PYTHON_CFLAGS
-PYTHON_CFLAGS := -I/usr/include/$(INSTALLED_PYTHON) -fno-strict-aliasing \
-    -fwrapv \
-     -fstack-protector \
-    #-Wstrict-prototypes \ # This option is obsolete for g++-4.8
-    --param=ssp-buffer-size=4 \
-    -Wformat -Wformat-security -Werror=format-security
-
-PYTHON_LDFLAGS := -L/usr/lib/$(INSTALLED_PYTHON)  -Xlinker -export-dynamic -Wl,-O0 -Wl,-Bsymbolic-functions
-endif
-# There are some unix/gcc specific paths here. Should be cleaned up in future.
-pymoose: python/moose/_moose.so
-pymoose: CXXFLAGS += -DPYMOOSE $(PYTHON_CFLAGS)
-# fix: add include dir for numpy headers required by pymoose/moosemodule.cpp
-pymoose: CXXFLAGS += -I$(shell /usr/bin/python -c 'from numpy import get_include; print get_include()')
-pymoose: OBJLIBS += pymoose/_pymoose.o
-pymoose: LDFLAGS += $(PYTHON_LDFLAGS)
-export CXXFLAGS
-python/moose/_moose.so: libs $(OBJLIBS)
-	$(MAKE) -C pymoose
-	$(CXX) -shared $(LDFLAGS) $(CXXFLAGS) -o $@ $(OBJLIBS) $(LIBS)
-	@echo "pymoose module built."
-
-# This will generate an object file without main
-libs:
-	@for i in $(SUBDIR) $(PARALLEL_DIR); do \
-	    $(MAKE) -C $$i || exit $$?; \
-	done
-	@echo "All Libs compiled"
-
-clean:
-	@(for i in $(CLEANSUBDIR) ; do $(MAKE) -C $$i clean;  done)
-	-rm -rf moose  core.* DOCS/html python/moose/*.so python/moose/*.pyc
-
-############ INSTALL (works for sudo make install and deb packaging using dpkg-buildpackage)
-## get the default python module install location
-## no need to know this, the default for public modules is /usr/share/pyshared
-pydir_cmd := python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
-pydistpkg_dir := $(shell $(pydir_cmd))
-## /usr/share/pyshared/ is a directory which is independent of python version,
-## but modules need to be registered with update-python-modules, giving a list of files
-## debhelper (dpkg-buildpackage) will also copy to this location and do the registration.
-## For make install, I stick to the default python .../dist-packages directory.
-pydistpkg_dirB := /usr/share/pyshared/
-
-username=$(shell basename $(HOME))
-
-install_prefix=/usr
-## Note that $(DESTDIR) is provided by dpkg-buildpackage to specify the local install for deb packaging
-## if doing sudo make install, $(DESTDIR) will be undefined and will cause no trouble
-install:
-	## discard symbols from object files
-	strip python/moose/_moose.so
-
-	## delete older .../share/moose, - before rm means ignore errors (eg not found)
-	-rm -rf $(DESTDIR)$(install_prefix)/share/moose
-	## -p creates parent directories also if they don't exist
-	mkdir -p $(DESTDIR)$(install_prefix)/share/moose
-	## copy filtering out the .svn (hidden) files
-	rsync -r --exclude=.svn Demos/* $(DESTDIR)$(install_prefix)/share/moose/Demos
-	rsync -r --exclude=.svn gui/* $(DESTDIR)$(install_prefix)/share/moose/gui
-	test -d $(DESTDIR)$(install_prefix)/share/doc || mkdir -p $(DESTDIR)$(install_prefix)/share/doc
-	rsync -r --exclude=.svn Docs/* $(DESTDIR)$(install_prefix)/share/doc/moose
-	# rsync -r --exclude=.svn Demos/* $(DESTDIR)$(install_prefix)/share/moose/
-	## pymoose module goes to python's dist-packages
-	## delete older .../dist-packages/moose, - before rm means ignore errors (eg not found)
-	-rm -rf $(DESTDIR)$(pydistpkg_dir)/moose
-	-rm -rf $(DESTDIR)$(pydistpkg_dirB)/moose
-	## make directory in case non-existent (needed for deb pkg building)
-	mkdir -p $(DESTDIR)$(pydistpkg_dir)
-	rsync -r --exclude=.svn --exclude=moose_py3k.py python/* $(DESTDIR)$(pydistpkg_dir)/
-
-	## shell command moosegui for the moose GUI.
-	chmod a+x $(DESTDIR)$(install_prefix)/share/moose/gui/MooseGUI.py
-	## -rm instructs make to ignore errors from make eg. file not found
-	-rm -f $(DESTDIR)$(install_prefix)/bin/moosegui
-	mkdir -p $(DESTDIR)$(install_prefix)/bin
-	ln -s $(DESTDIR)$(install_prefix)/share/moose/gui/MooseGUI.py $(DESTDIR)$(install_prefix)/bin/moosegui
-
-	## byte compile the module, gui, Demos (since, later running as user cannot create .pyc in root-owned dirs)
-	python -c "import compileall; compileall.compile_dir('$(DESTDIR)$(pydistpkg_dir)/moose',force=1)"
-	python -c "import compileall; compileall.compile_dir('$(DESTDIR)$(install_prefix)/share/moose/gui',force=1)"
-	python -c "import compileall; compileall.compile_dir('$(DESTDIR)$(install_prefix)/share/moose/Demos',force=1)"
-
-        ## see standards.freedesktop.org for specifications for where to put menu entries and icons
-        ## copy the .desktop files to /usr/share/applications for link to show up in main menu
-	mkdir -p $(DESTDIR)$(install_prefix)/share/applications
-	cp gui/MooseGUI.desktop $(DESTDIR)$(install_prefix)/share/applications/
-	cp gui/MooseSquidAxon.desktop $(DESTDIR)$(install_prefix)/share/applications/
-        ## copy the .desktop files to the desktop too to get icons
-	cp gui/MooseGUI.desktop $$HOME/Desktop/
-	chmod a+x $$HOME/Desktop/MooseGUI.desktop
-	chown $(username) $(HOME)/Desktop/MooseGUI.desktop
-	chgrp $(username) $(HOME)/Desktop/MooseGUI.desktop
-	cp gui/MooseSquidAxon.desktop $$HOME/Desktop/
-	chmod a+x $$HOME/Desktop/MooseSquidAxon.desktop
-	chgrp $(username) $(HOME)/Desktop/MooseSquidAxon.desktop
-	chown $(username) $(HOME)/Desktop/MooseSquidAxon.desktop
-        ## copy icon to /usr/share/icons/hicolor/<size>/apps (hicolor is the fallback theme)
-	mkdir -p $(DESTDIR)$(install_prefix)/share/icons/hicolor/scalable/apps
-	cp gui/icons/moose_icon.png $(DESTDIR)$(install_prefix)/share/icons/hicolor/scalable/apps/
-	cp gui/icons/squid.png $(DESTDIR)$(install_prefix)/share/icons/hicolor/scalable/apps/
-        ## need to update the icon cache to show the icon
-	update-icon-caches $(DESTDIR)$(install_prefix)/share/icons/hicolor/
-
-.PHONY: install
diff --git a/moose-core/basecode/Makefile b/moose-core/basecode/Makefile
deleted file mode 100644
index 0639a32c38bce0311fda0e32251dbd5b44eab69a..0000000000000000000000000000000000000000
--- a/moose-core/basecode/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment,
-#** also known as GENESIS 3 base code.
-#**           copyright (C) 2004 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-# $Id: $
-#
-# $Log: $
-#
-
-TARGET = _basecode.o
-
-
-#  CXXFLAGS += -I.. -I../kinetics -I../biophysics
-
-OBJ = \
-	consts.o	\
-	Element.o	\
-	DataElement.o	\
-	GlobalDataElement.o	\
-	LocalDataElement.o	\
-	Eref.o	\
-	Finfo.o	\
-	DestFinfo.o	\
-	Cinfo.o	\
-	SrcFinfo.o \
-	ValueFinfo.o \
-	SharedFinfo.o \
-	FieldElementFinfo.o \
-	FieldElement.o \
-	Id.o \
-	ObjId.o \
-	global.o \
-	SetGet.o \
-	OpFuncBase.o \
-	EpFunc.o \
-	HopFunc.o \
-	SparseMatrix.o \
-	doubleEq.o \
-	testAsync.o	\
-	main.o	\
-
-HEADERS = \
-	header.h \
-	Cinfo.h \
-	Conv.h \
-	Dinfo.h \
-	MsgDigest.h \
-	Element.h \
-	DataElement.h \
-	GlobalDataElement.h \
-	LocalDataElement.h \
-	Eref.h \
-	global.h \
-	Finfo.h \
-	DestFinfo.h \
-	Id.h \
-	ObjId.h \
-	../msg/Msg.h \
-	OpFuncBase.h \
-	OpFunc.h \
-	EpFunc.h \
-	HopFunc.h \
-	ProcInfo.h \
-	SrcFinfo.h \
-	ValueFinfo.h \
-	LookupValueFinfo.h \
-	LookupElementValueFinfo.h \
-	SharedFinfo.h \
-	FieldElementFinfo.h \
-	FieldElement.h \
-	MsgFuncBinding.h \
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS) ../shell/Shell.h
-Element.o:	FuncOrder.h
-testAsync.o:	SparseMatrix.h SetGet.h ../scheduling/Clock.h ../biophysics/IntFire.h ../synapse/SynEvent.h ../synapse/SynHandlerBase.h ../synapse/SimpleSynHandler.h ../synapse/Synapse.h ../randnum/RNG.h
-SparseMsg.o:	SparseMatrix.h
-SetGet.o:	SetGet.h ../shell/Neutral.h
-HopFunc.o:	HopFunc.h ../mpi/PostMaster.h
-global.o:       global.h ../randnum/RNG.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) -I../msg -I.. $< -c
-
-.PHONY: pymoose
-
-pymoose: CXXFLAGS += -DPYMOOSE
-
-$(TARGET): $(OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ)
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/benchmarks/Makefile b/moose-core/benchmarks/Makefile
deleted file mode 100644
index 0eb5aef3628e1e1c1d3186dab04ebbb7b861de48..0000000000000000000000000000000000000000
--- a/moose-core/benchmarks/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _benchmarks.o
-
-OBJ = \
-	benchmarks.o	\
-	kineticMarks.o	\
-
-HEADERS = \
-	../basecode/header.h \
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-kineticMarks.o:	../shell/Shell.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode -I../msg $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/biophysics/Makefile b/moose-core/biophysics/Makefile
deleted file mode 100644
index 6659630cea1751622c725f27a6a9142bf277384f..0000000000000000000000000000000000000000
--- a/moose-core/biophysics/Makefile
+++ /dev/null
@@ -1,123 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _biophysics.o
-
-OBJ = \
-	IntFire.o	\
-	SpikeGen.o	\
-	RandSpike.o	\
-	CompartmentDataHolder.o	\
-	CompartmentBase.o	\
-	Compartment.o	\
-	SymCompartment.o	\
-	GapJunction.o	\
-	ChanBase.o	\
-	ChanCommon.o	\
-	HHChannelBase.o	\
-	HHChannel.o	\
-	HHGate.o	\
-	HHGate2D.o	\
-	HHChannel2D.o	\
-	CaConcBase.o	\
-	CaConc.o	\
-	MgBlock.o	\
-	Nernst.o	\
-	Neuron.o	\
-	Spine.o	\
-	ReadCell.o	\
-	SwcSegment.o	\
-	ReadSwc.o	\
-	SynChan.o	\
-	NMDAChan.o	\
-	testBiophysics.o	\
-	IzhikevichNrn.o	\
-	DifShellBase.o \
-	DifShell.o	\
-	DifBufferBase.o	\
-	DifBuffer.o	\
-	Leakage.o	\
-	VectorTable.o	\
-	MarkovRateTable.o	\
-	MarkovChannel.o	\
-	MarkovGslSolver.o	\
-	MatrixOps.o	\
-	MarkovSolverBase.o	\
-	MarkovSolver.o	\
-	VClamp.o	\
-
-
-	# MMpump.o  \
-	# LeakyIaF.o	\
-	# GapJunction.o	\
-	# Nernst.o	\
-	# GHK.o		\
-	# NMDAChan.o	\
-
-# GSL_LIBS = -L/usr/lib -lgsl
-
-HEADERS = \
-	../basecode/header.h \
-	../utility/numutil.h \
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-IntFire.o:	IntFire.h
-SpikeGen.o: SpikeGen.h
-RandSpike.o: RandSpike.h ../randnum/randnum.h
-CompartmentDataHolder.o: CompartmentDataHolder.h
-CompartmentBase.o: CompartmentBase.h CompartmentDataHolder.h
-Compartment.o: CompartmentBase.h Compartment.h
-SymCompartment.o: CompartmentBase.h Compartment.h SymCompartment.h
-ChanBase.o: ChanBase.h
-ChanCommon.o: ChanBase.h ChanCommon.h
-SynChan.o: SynChan.h ChanBase.h ChanCommon.h
-NMDAChan.o: NMDAChan.h SynChan.h ChanBase.h ChanCommon.h
-Leakage.o: Leakage.h ChanBase.h ChanCommon.h
-GapJunction.o: GapJunction.h
-HHChannelBase.o: ChanBase.h HHChannelBase.h HHGate.h
-HHChannel.o: ChanBase.h HHChannel.h HHGate.h
-HHGate.o: HHGate.h
-HHChannel2D.o: ChanBase.h HHChannel2D.h HHGate2D.h
-HHGate2D.o: HHGate2D.h
-CaConcBase.o:	CaConcBase.h
-CaConc.o:	CaConcBase.h CaConc.h
-MgBlock.o:	MgBlock.h ChanBase.h
-Nernst.o:	Nernst.h
-Neuron.o:	Neuron.h SwcSegment.h Spine.h
-Spine.o:	Neuron.h SwcSegment.h Spine.h
-ReadCell.o: CompartmentBase.h Compartment.h SymCompartment.h ReadCell.h ../shell/Shell.h ../utility/utility.h
-SwcSegment.o: SwcSegment.h ../utility/Vec.h
-ReadSwc.o: CompartmentBase.h Compartment.h SymCompartment.h SwcSegment.h ReadSwc.h ../shell/Shell.h ../utility/Vec.h
-IzhikevichNrn.o: IzhikevichNrn.h
-DifShellBase.o: DifShellBase.h
-DifShell.o: DifShellBase.h DifShell.h 
-DifBufferBase.o: DifBufferBase.h
-DifBuffer.o:  DifBufferBase.h DifBuffer.h
-MMPump.o: MMPump.h
-testBiophysics.o: IntFire.h CompartmentBase.h Compartment.h HHChannel.h HHGate.h 
-VectorTable.o : VectorTable.h
-MarkovGslSolver.o : MarkovGslSolver.h 
-MatrixOps.o : MatrixOps.h
-MarkovRateTable.o : VectorTable.h ../builtins/Interpol2D.h MarkovRateTable.h 
-MarkovSolverBase.o : MarkovSolver.h MatrixOps.h MarkovRateTable.h
-MarkovSolver.o : MarkovSolverBase.h MarkovSolver.h
-MarkovChannel.o : VectorTable.h ../builtins/Interpol2D.h MarkovRateTable.h ChanBase.h MarkovChannel.h 
-VClamp.o: VClamp.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../external/muparser/include -I .. -I../basecode -I../msg $< -c
-
-$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS)
-
-clean:
-	rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/biophysics/ReadSwc.cpp b/moose-core/biophysics/ReadSwc.cpp
index 9894e0472bf64628f75971fc76ae95f6d2c3ddf6..6f6f5a2a3a9325533123cef054ee6302edf83585 100644
--- a/moose-core/biophysics/ReadSwc.cpp
+++ b/moose-core/biophysics/ReadSwc.cpp
@@ -52,7 +52,11 @@ ReadSwc::ReadSwc( const string& fname )
 		cleanZeroLength();
 		parseBranches();
 	}
-	cout << "ReadSwc: " << fname << "	: NumSegs = " << segs_.size() << 
+	if ( verbose || !valid || (badSegs > 0) )
+		cout << "ReadSwc: " << fname << 
+			"	: " << (valid ? "OK" : "FAILED" )<<
+			", # Branches = " << branches_.size() << 
+			". # Segs = " << segs_.size() << 
 			", bad = " << badSegs <<
 			", Validated = " << valid << 
 			", numBranches = " << branches_.size() << 
diff --git a/moose-core/builtins/Makefile b/moose-core/builtins/Makefile
deleted file mode 100644
index 7ff1cebed8784468dcd0aec5a15ea65db4f1220f..0000000000000000000000000000000000000000
--- a/moose-core/builtins/Makefile
+++ /dev/null
@@ -1,68 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _builtins.o
-
-OBJ = \
-      Arith.o	\
-      Group.o	\
-      Mstring.o	\
-      Func.o \
-      Function.o	\
-      Variable.o	\
-      InputVariable.o	\
-      TableBase.o	\
-      Table.o	\
-      Interpol.o	\
-      StimulusTable.o	\
-      TimeTable.o	\
-      Stats.o	\
-      SpikeStats.o	\
-      Interpol2D.o \
-      HDF5WriterBase.o	\
-      HDF5DataWriter.o	\
-      StreamerBase.o \
-      Streamer.o \
-      NSDFWriter.o	\
-      testNSDF.o	\
-      testBuiltins.o	\
-
-HEADERS = \
-	  ../basecode/header.h \
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-Arith.o:	Arith.h
-Group.o:	Group.h
-Mstring.o:		Mstring.h
-Func.o:	Func.h
-Function.o: Function.h
-Variable.o: Variable.h
-TableBase.o:		TableBase.h
-Table.o:		TableBase.h Table.h
-Interpol.o:		TableBase.h Interpol.h
-StimulusTable.o:		TableBase.h StimulusTable.h
-TimeTable.o:	TimeTable.h TableBase.h
-Stats.o:	Stats.h
-SpikeStats.o:	Stats.h SpikeStats.h
-Interpol2D.o:	Interpol2D.h
-HDF5WriterBase.o: HDF5WriterBase.h
-HDF5DataWriter.o: HDF5DataWriter.h HDF5WriterBase.h
-testBuiltins.o:	Group.h Arith.h Stats.h ../msg/DiagonalMsg.h ../basecode/SetGet.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I..  -I../scheduling -I../basecode -I../msg -I../external/muparser/include $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/device/Makefile b/moose-core/device/Makefile
deleted file mode 100644
index 159d88056dade350936d92f016e3221df7d2e321..0000000000000000000000000000000000000000
--- a/moose-core/device/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-TARGET = _device.o
-
-OBJ = PulseGen.o	\
-	DiffAmp.o	\
-	PIDController.o	\
-	RC.o	
-
-HEADERS = \
-	../basecode/header.h 	\
-
-default: $(TARGET)
-
-$(OBJ): $(HEADERS)
-PulseGen.o: PulseGen.h
-DiffAmp.o: DiffAmp.h
-PIDController.o: PIDController.h
-RC.o: RC.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c
-
-$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS)
-
-clean:
-	rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/diffusion/Makefile b/moose-core/diffusion/Makefile
deleted file mode 100644
index 458a5ba9e8026e4675a8e9b2ce525da713047389..0000000000000000000000000000000000000000
--- a/moose-core/diffusion/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _diffusion.o
-
-OBJ = \
-	FastMatrixElim.o	\
-	DiffPoolVec.o	\
-	Dsolve.o	\
-	testDiffusion.o	\
-
-HEADERS = \
-	../basecode/header.h \
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-FastMatrixElim.o: ../basecode/SparseMatrix.h FastMatrixElim.h
-Dsolve.o:	../basecode/SparseMatrix.h ../kinetics/PoolBase.h ../kinetics/lookupVolumeFromMesh.h ../mesh/ChemCompt.h ../ksolve/XferInfo.h ../ksolve/ZombiePoolInterface.h 
-DiffPoolVec.o: DiffPoolVec.h ../ksolve/ZombiePoolInterface.h
-testDiffusion.o:	Dsolve.h ../ksolve/ZombiePoolInterface.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(GSL_FLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode -I../ksolve $< -c
-
-$(TARGET):		$(OBJ) $(GSL_OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(GSL_OBJ) $(GSL_LIBS) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/examples/Makefile b/moose-core/examples/Makefile
deleted file mode 100644
index 1e7f10aba87a81427787ebda1f04f6ab3a10f31b..0000000000000000000000000000000000000000
--- a/moose-core/examples/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _trials.o
-
-OBJ = \
-	Example.o	\
-	Ex.o	\
-
-HEADERS = \
-	../basecode/header.h \
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-Example.o: Example.h ../basecode/ElementValueFinfo.h
-Ex.o: Ex.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/external/muparser/Makefile b/moose-core/external/muparser/Makefile
deleted file mode 100644
index 6b8bb423a78aec4c2840cea4ff9d2181a6bdffb4..0000000000000000000000000000000000000000
--- a/moose-core/external/muparser/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# Makefile for including muParser into moose.
-# Author: Subhasis Ray
-#
-TARGET = _muparser.o
-
-OBJ = \
-    src/muParserBase.o \
-    src/muParserBytecode.o \
-    src/muParserCallback.o \
-    src/muParser.o  \
-    src/muParserDLL.o \
-    src/muParserError.o \
-    src/muParserInt.o \
-    src/muParserTokenReader.o \
-
-HEADERS = \
-	include/muParser.h	\
-	include/muParserBase.h	\
-	include/muParserBytecode.h	\
-	include/muParserCallback.h	\
-	include/muParserDef.h	\
-	include/muParserError.h	\
-	include/muParserFixes.h	\
-	include/muParserStack.h	\
-	include/muParserToken.h	\
-	include/muParserTokenReader.h		\
-	include/muParserTemplateMagic.h	\
-
-
-default: $(TARGET)
-
-$(OBJ): $(HEADERS)
-
-%.o: %.cpp
-	$(CXX) $(CXXFLAGS) -I. -I../../ -Iinclude $< -c -o $@
-
-$(TARGET):	$(OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ)
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
-
diff --git a/moose-core/external/tinyxml/Makefile b/moose-core/external/tinyxml/Makefile
deleted file mode 100644
index 45639837dea61df6d90bf23b3e5a7ee081d3a4d3..0000000000000000000000000000000000000000
--- a/moose-core/external/tinyxml/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# Makefile for including muParser into moose.
-# Author: Subhasis Ray
-#
-TARGET = _tinyxml2.o
-
-OBJ = \
-	tinyxml2.o
-
-HEADERS = \
-	tinyxml2.h	\
-
-
-default: $(TARGET)
-
-$(OBJ): $(HEADERS)
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) -I. $< -c
-
-$(TARGET):	$(OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ)
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
-
diff --git a/moose-core/hsolve/Makefile b/moose-core/hsolve/Makefile
deleted file mode 100644
index da4e33a3a96c04e163d07ea2c2c454f08f9787cd..0000000000000000000000000000000000000000
--- a/moose-core/hsolve/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment,
-#** also known as GENESIS 3 base code.
-#**           copyright (C) 2004 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU General Public License version 2
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _hsolve.o
-
-OBJ = \
-	HSolveStruct.o \
-	HinesMatrix.o \
-	HSolvePassive.o \
-	RateLookup.o \
-	HSolveActive.o \
-	HSolveActiveSetup.o \
-	HSolveInterface.o \
-	HSolve.o \
-	HSolveUtils.o \
-	testHSolve.o \
-	ZombieCompartment.o \
-	ZombieCaConc.o \
-	ZombieHHChannel.o \
-
-HEADERS = \
-	../basecode/header.h
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-HSolveStruct.o:	HSolveStruct.h
-HinesMatrix.o:	HinesMatrix.h TestHSolve.h
-HSolvePassive.o:	HSolvePassive.h HinesMatrix.h HSolveStruct.h HSolveUtils.h TestHSolve.h ../biophysics/Compartment.h
-RateLookup.o:	RateLookup.h
-HSolveActive.o:	HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h
-HSolveActiveSetup.o:	HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h HSolveUtils.h ../biophysics/HHChannelBase.h ../biophysics/HHChannel.h ../biophysics/ChanBase.h ../biophysics/ChanCommon.h ../biophysics/HHGate.h ../biophysics/CaConc.h
-HSolveInterface.o:	HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h
-HSolve.o:	../biophysics/Compartment.h ZombieCompartment.h ../biophysics/CaConc.h ZombieCaConc.h ../biophysics/HHGate.h ../biophysics/ChanBase.h ../biophysics/ChanCommon.h ../biophysics/HHChannelBase.h ../biophysics/HHChannel.h ZombieHHChannel.h HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h ../basecode/ElementValueFinfo.h
-ZombieCompartment.o:	../biophysics/CompartmentBase.h ZombieCompartment.h ../biophysics/Compartment.h HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h ../basecode/ElementValueFinfo.h
-ZombieCaConc.o:	ZombieCaConc.h ../biophysics/CaConc.h HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h ../basecode/ElementValueFinfo.h
-ZombieHHChannel.o:	ZombieHHChannel.h ../biophysics/HHChannelBase.h ../biophysics/HHChannel.h ../biophysics/ChanBase.h ../biophysics/ChanCommon.h ../biophysics/HHGate.h HSolve.h HSolveActive.h RateLookup.h HSolvePassive.h HinesMatrix.h HSolveStruct.h ../basecode/ElementValueFinfo.h
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I.. -I../basecode -I../msg $< -c
-
-$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS)
-
-clean:
-	rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/intfire/Makefile b/moose-core/intfire/Makefile
deleted file mode 100644
index 22261ff9da1a87687e980907a90c5b0172697c0d..0000000000000000000000000000000000000000
--- a/moose-core/intfire/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _intfire.o
-
-OBJ = \
-	IntFireBase.o	\
-	LIF.o \
-	QIF.o \
-	ExIF.o \
-	AdExIF.o \
-	AdThreshIF.o \
-	IzhIF.o \
-	testIntFire.o \
-
-# GSL_LIBS = -L/usr/lib -lgsl
-
-HEADERS = \
-	../basecode/header.h \
-	../utility/numutil.h \
-	IntFireBase.h \
-	../biophysics/CompartmentBase.h \
-	../biophysics/Compartment.h
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-LIF.o:	LIF.h
-QIF.o:	QIF.h
-ExIF.o:	ExIF.h
-AdExIF.o:	AdExIF.h
-AdThreshIF.o:	AdThreshIF.h
-IzhIF.o:	IzhIF.h
-testIntFire.o:	LIF.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c
-
-$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS)
-
-clean:
-	rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/kinetics/Makefile b/moose-core/kinetics/Makefile
deleted file mode 100644
index 9b1f6375d239b8b1ad2ba39eaac061ad0db25d7f..0000000000000000000000000000000000000000
--- a/moose-core/kinetics/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _kinetics.o
-
-OBJ = \
-	PoolBase.o	\
-	Pool.o	\
-	BufPool.o	\
-	ReacBase.o	\
-	Reac.o	\
-	EnzBase.o	\
-	CplxEnzBase.o	\
-	Enz.o	\
-	MMenz.o	\
-	Species.o	\
-	ReadKkit.o	\
-	WriteKkit.o	\
-	ReadCspace.o	\
-	lookupVolumeFromMesh.o	\
-	testKinetics.o	\
-
-HEADERS = \
-	../basecode/header.h \
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-Pool.o:	PoolBase.h Pool.h lookupVolumeFromMesh.h
-BufPool.o:	PoolBase.h Pool.h BufPool.h lookupVolumeFromMesh.h
-ReacBase.o:	ReacBase.h lookupVolumeFromMesh.h
-Reac.o:	ReacBase.h Reac.h lookupVolumeFromMesh.h
-EnzBase.o:	EnzBase.h lookupVolumeFromMesh.h
-CplxEnzBase.o:	EnzBase.h CplxEnzBase.h lookupVolumeFromMesh.h
-Enz.o:	EnzBase.h CplxEnzBase.h Enz.h lookupVolumeFromMesh.h
-MMenz.o:	EnzBase.h MMenz.h  lookupVolumeFromMesh.h
-Boundary.o:	Boundary.h
-Species.o:	Species.h
-ReadKkit.o:	lookupVolumeFromMesh.h ReadKkit.h PoolBase.h Pool.h ../shell/Shell.h 
-WriteKkit.o:	lookupVolumeFromMesh.h PoolBase.h
-ReadCspace.o:	lookupVolumeFromMesh.h ReadCspace.h ../shell/Shell.h
-lookupVolumeFromMesh.o: lookupVolumeFromMesh.h
-testKinetics.o:	ReadKkit.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode -I../msg $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/ksolve/Makefile b/moose-core/ksolve/Makefile
deleted file mode 100644
index 49b51df4a418ed42d20c7aa9c64bcd06d63c0806..0000000000000000000000000000000000000000
--- a/moose-core/ksolve/Makefile
+++ /dev/null
@@ -1,100 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _ksolve.o
-
-OBJ = \
-	KinSparseMatrix.o	\
-	ZombiePool.o \
-	ZombieBufPool.o \
-	ZombieReac.o \
-	ZombieEnz.o \
-	ZombieMMenz.o \
-	ZombieFunction.o \
-	VoxelPoolsBase.o \
-	VoxelPools.o \
-	GssaVoxelPools.o \
-	RateTerm.o \
-	FuncTerm.o \
-	Stoich.o \
-	Ksolve.o \
-	SteadyStateGsl.o \
-	Gsolve.o \
-	ZombiePoolInterface.o \
-	testKsolve.o \
-
-HEADERS = \
-	../basecode/header.h \
-	../basecode/SparseMatrix.h \
-	../basecode/ElementValueFinfo.h \
-	RateTerm.h \
-	../external/muparser/include/muParser.h \
-	FuncTerm.h \
-	KinSparseMatrix.h \
-	XferInfo.h \
-	ZombiePoolInterface.h \
-	Stoich.h \
-	../kinetics/Pool.h \
-	../kinetics/lookupVolumeFromMesh.h \
-
-
-# The GSL library (GNU Scientific Library) provides a range of
-# numerical functions, which allow us to use various advanced integration
-# methods. The GslIntegrator accesses these. This library is licenced
-# under the GPL, so only GPL-compliant uses of MOOSE will be able to
-# use it. Should be fine for academic use.
-# Optional: Comment out the following three items if not using GSL
-ifeq ($(USE_GSL),1)
-GSL_OBJ = \
-
-
-GSL_LIBS = -L/usr/lib -lgsl -lgslcblas
-GSL_FLAGS = -DUSE_GSL
-endif
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-KinSparseMatrix.o:	KinSparseMatrix.h ../basecode/SparseMatrix.h
-ZombiePool.o:	../kinetics/PoolBase.h ZombiePoolInterface.h ZombiePool.h ../kinetics/lookupVolumeFromMesh.h
-ZombieBufPool.o:	../kinetics/PoolBase.h ZombiePoolInterface.h ZombiePool.h ZombieBufPool.h ../kinetics/lookupVolumeFromMesh.h
-ZombieBufPool.o:	../kinetics/PoolBase.h ZombiePoolInterface.h ZombiePool.h
-VoxelPoolsBase.o:	VoxelPoolsBase.h ../randnum/RNG.h
-VoxelPools.o:	VoxelPoolsBase.h VoxelPools.h OdeSystem.h RateTerm.h Stoich.h
-GssaVoxelPools.o:	VoxelPoolsBase.h GssaVoxelPools.h ../basecode/SparseMatrix.h \
-    ../randnum/RNG.h KinSparseMatrix.h GssaSystem.h RateTerm.h Stoich.h
-RateTerm.o:		RateTerm.h
-FuncTerm.o:		FuncTerm.h
-Stoich.o:		RateTerm.h FuncTerm.h FuncRateTerm.h Stoich.h ../kinetics/PoolBase.h ../kinetics/ReacBase.h ../kinetics/EnzBase.h ../kinetics/CplxEnzBase.h ../basecode/SparseMatrix.h KinSparseMatrix.h ../scheduling/Clock.h ZombiePoolInterface.h
-ZombieReac.o:		RateTerm.h FuncTerm.h Stoich.h ../kinetics/ReacBase.h ../kinetics/lookupVolumeFromMesh.h ../basecode/SparseMatrix.h KinSparseMatrix.h ZombieReac.h
-ZombieEnz.o:		RateTerm.h FuncTerm.h Stoich.h ../kinetics/EnzBase.h ../kinetics/CplxEnzBase.h ../kinetics/lookupVolumeFromMesh.h ../basecode/SparseMatrix.h KinSparseMatrix.h ZombieEnz.h
-ZombieMMenz.o:		RateTerm.h FuncTerm.h Stoich.h ../kinetics/EnzBase.h ../kinetics/lookupVolumeFromMesh.h ../basecode/SparseMatrix.h KinSparseMatrix.h ZombieMMenz.h
-ZombieFunction.o:		RateTerm.h FuncTerm.h Stoich.h ../builtins/Function.h ZombieFunction.h
-Ksolve.o:		RateTerm.h Stoich.h Ksolve.h VoxelPoolsBase.h VoxelPools.h OdeSystem.h ZombiePoolInterface.h
-SteadyStateGsl.o:	SteadyStateGsl.h ../basecode/SparseMatrix.h KinSparseMatrix.h RateTerm.h FuncTerm.h Stoich.h ../randnum/randnum.h
-Gsolve.o:		RateTerm.h FuncTerm.h FuncRateTerm.h Stoich.h Gsolve.h VoxelPoolsBase.h VoxelPools.h GssaSystem.h ZombiePoolInterface.h ../basecode/SparseMatrix.h KinSparseMatrix.h
-ZombiePoolInterface.o:	VoxelPoolsBase.h ZombiePoolInterface.h ../mesh/VoxelJunction.h Stoich.h ../shell/Shell.h
-testKsolve.o:	../shell/Shell.h
-
-#KineticHub.o:	KineticHub.h
-
-ifeq ($(USE_GSL),1)
-#Optional: Comment out the following two items if not using GSL.
-$(GSL_OBJ) : $(HEADERS)
-#StateScanner.o:	StateScanner.h
-endif # !USE_GSL
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(GSL_FLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode -I../msg -I../kinetics -I../mesh -I../external/muparser/include -I../builtins $< -c
-
-$(TARGET):		$(OBJ) $(GSL_OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(GSL_OBJ) $(GSL_LIBS) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/mesh/Makefile b/moose-core/mesh/Makefile
deleted file mode 100644
index 9e211655654da3faa2c5d294e44000b7ddcde74a..0000000000000000000000000000000000000000
--- a/moose-core/mesh/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _mesh.o
-
-OBJ = \
-	ChemCompt.o	\
-	MeshCompt.o	\
-	MeshEntry.o	\
-	CubeMesh.o	\
-	CylBase.o	\
-	CylMesh.o	\
-	NeuroNode.o	\
-	NeuroMesh.o	\
-	SpineEntry.o	\
-	SpineMesh.o	\
-	PsdMesh.o	\
-	testMesh.o	\
-
-HEADERS = \
-	../basecode/header.h \
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-MeshEntry.o:	MeshEntry.h
-Boundary.o:	Boundary.h
-ChemCompt.o:	VoxelJunction.h ChemCompt.h MeshEntry.h Boundary.h
-MeshCompt.o:	VoxelJunction.h ChemCompt.h MeshCompt.h MeshEntry.h Boundary.h
-CylBase.o:	../utility/Vec.h CylBase.h
-CylMesh.o:	../utility/Vec.h VoxelJunction.h ChemCompt.h CylBase.h CylMesh.h MeshEntry.h Boundary.h
-CubeMesh.o:	VoxelJunction.h ChemCompt.h CubeMesh.h MeshEntry.h Boundary.h
-NeuroNode.o: CylBase.h NeuroNode.h
-NeuroMesh.o: ../basecode/SparseMatrix.h ChemCompt.h CylBase.h NeuroNode.h NeuroMesh.h
-SpineMesh.o: ../basecode/SparseMatrix.h VoxelJunction.h ChemCompt.h CylBase.h NeuroNode.h NeuroMesh.h ../utility/Vec.h SpineEntry.h SpineMesh.h
-SpineEntry.o: VoxelJunction.h ChemCompt.h CylBase.h ../utility/Vec.h SpineEntry.h
-PsdMesh.o: ../basecode/SparseMatrix.h VoxelJunction.h ChemCompt.h CylBase.h ../utility/Vec.h SpineEntry.h SpineMesh.h
-testMesh.o:	../basecode/SparseMatrix.h CylBase.h NeuroNode.h MeshEntry.h ChemCompt.h CylMesh.h Boundary.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I.. -I../basecode $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
-
diff --git a/moose-core/mpi/Makefile b/moose-core/mpi/Makefile
deleted file mode 100644
index a127fb78de6ffe176ee224b266771deb17c782a3..0000000000000000000000000000000000000000
--- a/moose-core/mpi/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2013 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _mpi.o
-
-OBJ = \
-	PostMaster.o	\
-	testMpi.o \
-
-HEADERS = \
-	../basecode/header.h \
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-Postmaster.o:	PostMaster.h
-testMpi.o:	PostMaster.h 
-
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/msg/Makefile b/moose-core/msg/Makefile
deleted file mode 100644
index 1a373925f150d72886420d1b1fbd243d038334b0..0000000000000000000000000000000000000000
--- a/moose-core/msg/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _msg.o
-
-OBJ = \
-	Msg.o	\
-	DiagonalMsg.o	\
-	OneToAllMsg.o	\
-	OneToOneMsg.o	\
-	SingleMsg.o	\
-	SparseMsg.o	\
-	OneToOneDataIndexMsg.o	\
-	testMsg.o	\
-
-HEADERS = \
-	../basecode/header.h \
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-DiagonalMsg.o:	DiagonalMsg.h
-OneToAll.o:	OneToAll.h
-OneToOne.o:	OneToOne.h
-OneToOneDataIndex.o:	OneToOneDataIndex.h
-SingleMsg.o:	SingleMsg.h
-SparseMsg.o:	SparseMsg.h
-testMsg.o: DiagonalMsg.h OneToAllMsg.h OneToOneMsg.h SingleMsg.h SparseMsg.h OneToOneDataIndexMsg.h ../basecode/SetGet.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/msg/SparseMsg.cpp b/moose-core/msg/SparseMsg.cpp
index 44f79d135eac65ea8109b40d370e3d816af26c8e..65051f64d1e6f24b8c0cf60444bf9e75c937b62f 100644
--- a/moose-core/msg/SparseMsg.cpp
+++ b/moose-core/msg/SparseMsg.cpp
@@ -215,11 +215,14 @@ void SparseMsg::updateAfterFill()
 {
 	unsigned int startData = e2_->localDataStart();
 	unsigned int endData = startData + e2_->numLocalData();
-	for ( unsigned int i = 0; i < matrix_.nRows(); ++ i ) {
-		const unsigned int* colIndex;
-		const unsigned int* entry;
-		unsigned int num = matrix_.getRow( i, &entry, &colIndex );
+	SparseMatrix< unsigned int > temp( matrix_);
+	temp.transpose();
+	for ( unsigned int i = 0; i < temp.nRows(); ++ i ) {
 		if ( i >= startData && i < endData ) {
+			const unsigned int* colIndex;
+			const unsigned int* entry;
+			// SparseMatrix::getRow returns # of entries.
+			unsigned int num = temp.getRow( i, &entry, &colIndex );
 			e2_->resizeField( i - startData, num );
 		}
 	}
diff --git a/moose-core/pymoose/Makefile b/moose-core/pymoose/Makefile
deleted file mode 100644
index 1c8abeca9e00a0b2bd0c0b36cf9fb222ebfbdd5d..0000000000000000000000000000000000000000
--- a/moose-core/pymoose/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# Makefile
-# 
-# Author: Subhasis Ray
-# Created: 2011-03-10 12:10:32 (+0530)
-TARGET = _pymoose.o
-# CXXFLAGS += -I../basecode -I../msg -I../shell
-CXXFLAGS += -DQUIET_MODE
-NUMPY_WARNING_FLAG = -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION
-.PHONY: clean
-
-HEADERS = moosemodule.h ../basecode/global.h PyRun.h
-
-OBJ = moosemodule.o mfield.o vec.o melement.o test_moosemodule.o PyRun.o
-
-$(TARGET): $(OBJ) $(HEADERS) ../basecode/main.cpp ../utility/_utility.o ../basecode/_basecode.o
-	$(LD) -r -o $(TARGET) $(OBJ) $(LDFLAGS)
-
-.cpp.o: $(HEADERS)
-	$(CXX) $(CXXFLAGS) $(NUMPY_WARNING_FLAG) -I.. -I../basecode $< -c
-clean: 
-	-rm -f *.o
-
diff --git a/moose-core/pymoose/mfield.cpp b/moose-core/pymoose/mfield.cpp
index 7e73f2650e979d17ef72952699f4274121f3358c..7995427f2a9e40e0171c4af41e6936ce2ca02607 100644
--- a/moose-core/pymoose/mfield.cpp
+++ b/moose-core/pymoose/mfield.cpp
@@ -316,7 +316,7 @@ PyObject * moose_DestField_call(PyObject * self, PyObject * args,
         PyObject * arg = PyTuple_GetItem(args, ii);
         Py_INCREF(arg);
         PyTuple_SetItem(newargs, ii+1, arg);
-        Py_DECREF(arg);
+        // Py_DECREF(arg);
     }
     // Call ObjId._setDestField with the new arguments
     PyObject * ret = moose_ObjId_setDestField(((_Field*)self)->owner, newargs);
diff --git a/moose-core/python/moose/SBML/readSBML.py b/moose-core/python/moose/SBML/readSBML.py
index 5747765be0fa07ee7de5ca40547e1ad4b162590a..7f3d8535843986d1d0620b02a63fa8e1487d95fb 100644
--- a/moose-core/python/moose/SBML/readSBML.py
+++ b/moose-core/python/moose/SBML/readSBML.py
@@ -459,6 +459,8 @@ def createReaction(model, specInfoMap, modelAnnotaInfo, globparameterIdValue):
     for ritem in range(0, model.getNumReactions()):
         reactionCreated = False
         groupName = ""
+        rName = ""
+        rId = ""
         reac = model.getReaction(ritem)
         if (reac.isSetId()):
             rId = reac.getId()
diff --git a/moose-core/python/moose/SBML/writeSBML.py b/moose-core/python/moose/SBML/writeSBML.py
index 7bf1727e3d0533fb0f69b6c1ef72fbdcdc4248c6..3f39cc3bffa8d1e6941c05dcbf5c6aa814e1053c 100644
--- a/moose-core/python/moose/SBML/writeSBML.py
+++ b/moose-core/python/moose/SBML/writeSBML.py
@@ -20,8 +20,7 @@ Last-Updated: Wed Jan 11 15:20:00 2017(+0530)
 '''
 import sys
 import re
-from collections import Counter
-
+#from collections import Counter
 import moose
 from .validation import validateModel
 from moose.chemUtil.chemConnectUtil import *
@@ -421,11 +420,13 @@ def parmUnit(rct_order, cremodel_):
     return unit_stream
 
 
+def Counter(items):
+    return dict((i, items.count(i)) for i in items)
+
 def getSubprd(cremodel_, mobjEnz, type, neighborslist):
     if type == "sub":
         reacSub = neighborslist
         reacSubCou = Counter(reacSub)
-
         # print " reacSubCou ",reacSubCou,"()",len(reacSubCou)
         noofSub = len(reacSubCou)
         rate_law = " "
diff --git a/moose-core/python/moose/chemUtil/chemConnectUtil.py b/moose-core/python/moose/chemUtil/chemConnectUtil.py
index 93d8be9d1442970c5ac748184f6743ba6810fc6b..a89516833e5a3899552942174108174d6363d608 100644
--- a/moose-core/python/moose/chemUtil/chemConnectUtil.py
+++ b/moose-core/python/moose/chemUtil/chemConnectUtil.py
@@ -1,6 +1,6 @@
 import moose
 import numpy as np
-from collections import Counter
+#from collections import Counter
 
 def xyPosition(objInfo,xory):
     try:
@@ -177,5 +177,6 @@ def countitems(mitems,objtype):
     items = []
     items = moose.element(mitems).neighbors[objtype]
     uniqItems = set(items)
-    countuniqItems = Counter(items)
+    #countuniqItems = Counter(items)
+    countuniqItems = dict((i, items.count(i)) for i in items)
     return(uniqItems,countuniqItems)
\ No newline at end of file
diff --git a/moose-core/python/moose/genesis/writeKkit.py b/moose-core/python/moose/genesis/writeKkit.py
index ba71603148d5e5096a41e14499027a7a11b442c2..11b14c951280e4ddf4e700ae14b07f961bca34fd 100644
--- a/moose-core/python/moose/genesis/writeKkit.py
+++ b/moose-core/python/moose/genesis/writeKkit.py
@@ -41,75 +41,86 @@ def mooseWriteKkit( modelpath, filename, sceneitems={}):
     if filename.rfind('.') != -1:
         filename = filename[:filename.rfind('.')]
     else:
-        filename = filename[:len(filename)]
-    filename = filename+'.g'
-    global NA
-    NA = 6.0221415e23
-    global cmin,cmax,xmin,xmax,ymin,ymax
-    cmin, xmin, ymin = 0, 0, 0
-    cmax, xmax, ymax = 1, 1, 1
-    
-    compt = moose.wildcardFind(modelpath+'/##[ISA=ChemCompt]')
-    maxVol = estimateDefaultVol(compt)
-    positionInfoExist = True
-    if compt:
-        if bool(sceneitems):
-            cmin,cmax,xmin1,xmax1,ymin1,ymax1 = findMinMax(sceneitems)
-        elif not bool(sceneitems):
-            srcdesConnection = {}
-            setupItem(modelpath,srcdesConnection)
-            meshEntry,xmin,xmax,ymin,ymax,positionInfoExist,sceneitems = setupMeshObj(modelpath)
-            if not positionInfoExist:
-                #cmin,cmax,sceneitems = autoCoordinates(meshEntry,srcdesConnection)
-                sceneitems = autoCoordinates(meshEntry,srcdesConnection)
-
-        if not positionInfoExist:        
-            # if position are not from kkit, then zoom factor is applied while
-            # writing to genesis. Like if position is from pyqtSceneItem or auto-coordinates
-            cmin,cmax,xmin1,xmax1,ymin1,ymax1 = findMinMax(sceneitems)
-            for k,v in list(sceneitems.items()):
-                anno = moose.element(k.path+'/info')
-                x1 = calPrime(v['x'])
-                y1 = calPrime(v['y'])
-                sceneitems[k]['x'] = x1
-                sceneitems[k]['y'] = y1
-
-        f = open(filename, 'w')
-        writeHeader (f,maxVol)
-
-        gtId_vol = writeCompartment(modelpath,compt,f)
-        writePool(modelpath,f,gtId_vol,sceneitems)
-        reacList = writeReac(modelpath,f,sceneitems)
-        enzList = writeEnz(modelpath,f,sceneitems)
-        writeSumtotal(modelpath,f)
-        f.write("simundump xgraph /graphs/conc1 0 0 99 0.001 0.999 0\n"
-                "simundump xgraph /graphs/conc2 0 0 100 0 1 0\n")
-        tgraphs = moose.wildcardFind(modelpath+'/##[ISA=Table2]')
-        first, second = " ", " "
-        if tgraphs:
-            first,second = writeplot(tgraphs,f)
-        if first:
-            f.write(first)
-        f.write("simundump xgraph /moregraphs/conc3 0 0 100 0 1 0\n"
-                "simundump xgraph /moregraphs/conc4 0 0 100 0 1 0\n")
-        if second:
-            f.write(second)
-        f.write("simundump xcoredraw /edit/draw 0 -6 4 -2 6\n"
-                "simundump xtree /edit/draw/tree 0 \\\n"
-                "  /kinetics/#[],/kinetics/#[]/#[],/kinetics/#[]/#[]/#[][TYPE!=proto],/kinetics/#[]/#[]/#[][TYPE!=linkinfo]/##[] \"edit_elm.D <v>; drag_from_edit.w <d> <S> <x> <y> <z>\" auto 0.6\n"
-                "simundump xtext /file/notes 0 1\n")
-        storeReacMsg(reacList,f)
-        storeEnzMsg(enzList,f)
-        if tgraphs:
-            storePlotMsgs(tgraphs,f)
-        writeFooter1(f)
-        writeNotes(modelpath,f)
-        writeFooter2(f)
-        print('Written to file '+filename)
-        return True
-    else:
-        print(("Warning: writeKkit:: No model found on " , modelpath))
-        return False
+        error = " "
+        ignoreColor= ["mistyrose","antiquewhite","aliceblue","azure","bisque","black","blanchedalmond","blue","cornsilk","darkolivegreen","darkslategray","dimgray","floralwhite","gainsboro","ghostwhite","honeydew","ivory","lavender","lavenderblush","lemonchiffon","lightcyan","lightgoldenrodyellow","lightgray","lightyellow","linen","mediumblue","mintcream","navy","oldlace","papayawhip","saddlebrown","seashell","snow","wheat","white","whitesmoke","aquamarine","lightsalmon","moccasin","limegreen","snow","sienna","beige","dimgrey","lightsage"]
+        matplotcolor = {}
+        for name,hexno in matplotlib.colors.cnames.items():
+            matplotcolor[name]=hexno
+
+        if filename.rfind('.') != -1:
+            filename = filename[:filename.rfind('.')]
+        else:
+            filename = filename[:len(filename)]
+        filename = filename+'.g'
+        global NA
+        NA = 6.0221415e23
+        global cmin,cmax,xmin,xmax,ymin,ymax
+        cmin, xmin, ymin = 0, 0, 0
+        cmax, xmax, ymax = 1, 1, 1
+        
+        compt = moose.wildcardFind(modelpath+'/##[ISA=ChemCompt]')
+        maxVol = estimateDefaultVol(compt)
+        positionInfoExist = True
+        if compt:
+            if bool(sceneitems):
+                cmin,cmax,xmin1,xmax1,ymin1,ymax1 = findMinMax(sceneitems)
+            elif not bool(sceneitems):
+                srcdesConnection = {}
+                setupItem(modelpath,srcdesConnection)
+                meshEntry,xmin,xmax,ymin,ymax,positionInfoExist,sceneitems = setupMeshObj(modelpath)
+                if not positionInfoExist:
+                    #cmin,cmax,sceneitems = autoCoordinates(meshEntry,srcdesConnection)
+                    sceneitems = autoCoordinates(meshEntry,srcdesConnection)
+
+            if not positionInfoExist:        
+                # if position are not from kkit, then zoom factor is applied while
+                # writing to genesis. Like if position is from pyqtSceneItem or auto-coordinates
+                cmin,cmax,xmin1,xmax1,ymin1,ymax1 = findMinMax(sceneitems)
+                for k,v in list(sceneitems.items()):
+                    anno = moose.element(k.path+'/info')
+                    # x1 = calPrime(v['x'])
+                    # y1 = calPrime(v['y'])
+                    # sceneitems[k]['x'] = x1
+                    # sceneitems[k]['y'] = y1
+
+            f = open(filename, 'w')
+            writeHeader (f,maxVol)
+
+            gtId_vol = writeCompartment(modelpath,compt,f)
+            writePool(modelpath,f,gtId_vol,sceneitems)
+            error = ""            
+            reacList = writeReac(modelpath,f,sceneitems)
+            enzList = writeEnz(modelpath,f,sceneitems)
+            error = writeSumtotal(modelpath,f,error)
+            error = writeStimulus(modelpath,f,error)
+            f.write("simundump xgraph /graphs/conc1 0 0 99 0.001 0.999 0\n"
+                    "simundump xgraph /graphs/conc2 0 0 100 0 1 0\n")
+            tgraphs = moose.wildcardFind(modelpath+'/##[ISA=Table2]')
+            first, second = " ", " "
+            if tgraphs:
+                first,second = writeplot(tgraphs,f)
+            if first:
+                f.write(first)
+            f.write("simundump xgraph /moregraphs/conc3 0 0 100 0 1 0\n"
+                    "simundump xgraph /moregraphs/conc4 0 0 100 0 1 0\n")
+            if second:
+                f.write(second)
+            f.write("simundump xcoredraw /edit/draw 0 -6 4 -2 6\n"
+                    "simundump xtree /edit/draw/tree 0 \\\n"
+                    "  /kinetics/#[],/kinetics/#[]/#[],/kinetics/#[]/#[]/#[][TYPE!=proto],/kinetics/#[]/#[]/#[][TYPE!=linkinfo]/##[] \"edit_elm.D <v>; drag_from_edit.w <d> <S> <x> <y> <z>\" auto 0.6\n"
+                    "simundump xtext /file/notes 0 1\n")
+            storeReacMsg(reacList,f)
+            storeEnzMsg(enzList,f)
+            if tgraphs:
+                storePlotMsgs(tgraphs,f)
+            writeFooter1(f)
+            writeNotes(modelpath,f)
+            writeFooter2(f)
+            print('Written to file '+filename)
+            return error,True
+        else:
+            print(("Warning: writeKkit:: No model found on " , modelpath))
+            return False
 
 def findMinMax(sceneitems):
     cmin = 0.0
@@ -322,15 +333,45 @@ def trimPath(mobj):
         s = splitpath.replace("_dash_",'-')
         return s
 
-def writeSumtotal( modelpath,f):
+def writeSumtotal( modelpath,f, error):
     funclist = moose.wildcardFind(modelpath+'/##[ISA=Function]')
+    s = ""
     for func in funclist:
+        fInfound  = True
+        fOutfound = True
         funcInputs = moose.element(func.path+'/x[0]')
-        s = ""
-        for funcInput in funcInputs.neighbors["input"]:
-            s = s+ "addmsg /kinetics/" + trimPath(funcInput)+ " /kinetics/" + trimPath(moose.element(func.parent)) + " SUMTOTAL n nInit\n"
-        f.write(s)
+        if not len(funcInputs.neighbors["input"]):
+            fInfound = False
+            error = error +'\n/'+ (moose.element(func)).parent.name+ '/'+moose.element(func).name + ' function doesn\'t have input which is not allowed in genesis. \n This function is not written down into genesis file\n'
+
+        if not len(func.neighbors["valueOut"]):
+            error = error +'Function'+func.path+' has not been connected to any output, this function is not written to genesis file'
+            fOutfound = False
+        else:
+            for srcfunc in func.neighbors["valueOut"]:
+                if srcfunc.className in ["ZombiePool","ZombieBufPool","Pool","BufPool"]:
+                    functionOut = moose.element(srcfunc)
+                else:
+                    error = error +'Function output connected to '+srcfunc.name+ ' which is a '+ srcfunc.className+' which is not allowed in genesis, this function '+(moose.element(func)).path+' is not written to file'
+                    fOutfound = False
+
+        if fInfound and fOutfound:
+            srcPool = []
+            for funcInput in funcInputs.neighbors["input"]:
+                if funcInput not in srcPool:
+                    srcPool.append(funcInput)
+                    s = "addmsg /kinetics/" + trimPath(funcInput)+ " /kinetics/"+ trimPath(functionOut)+ " SUMTOTAL n nInit\n"
+                    f.write(s)
+                else:
+                    error = error + '\n Genesis doesn\'t allow same moluecule connect to function mutiple times. \n Pool \''+ moose.element(funcInput).name + '\' connected to '+ (moose.element(func)).path
+    return error
+
+def writeStimulus(modelpath,f,error):
+    
+    if len(moose.wildcardFind(modelpath+'/##[ISA=StimulusTable]')):
+        error = error +'\n StimulusTable is not written into genesis. This is in Todo List'
 
+    return error
 def storePlotMsgs( tgraphs,f):
     s = ""
     if tgraphs:
diff --git a/moose-core/python/moose/merge/merge.py b/moose-core/python/moose/merge/merge.py
index f76ca494b3daffccc1fa6318dd9783564c3a09d1..224431d431935a0592064b731ecdc685aa648dff 100644
--- a/moose-core/python/moose/merge/merge.py
+++ b/moose-core/python/moose/merge/merge.py
@@ -30,9 +30,40 @@ import mtypes
 
 from moose.chemUtil.chemConnectUtil import *
 from moose.chemUtil.graphUtils import *
+from moose.genesis import mooseWriteKkit
 
 def mergeChemModel(A,B):
     """ Merges two model or the path """
+    A = src
+    B = des
+    loadedA = False
+    loadedB = False
+    modelA = moose.element('/')
+    modelB = moose.element('/')
+
+    if os.path.isfile(A):
+        modelA,loadedA = loadModels(A)
+
+    elif moose.exists(A):
+        modelA = A
+        loadedA = True
+    else:
+        print ("%s path or file doesnot exists. Mergering will exist" % (A))
+        exit(0)
+
+    if os.path.isfile(B):
+        modelB,loadedB = loadModels(B)
+    elif moose.exists(B):
+        modelB = B
+        loadedB = True
+    else:
+        print ("%s path or file doesnot exists. Mergering will exist " % (B))
+        exit(0)
+
+    if loadedA and loadedB:
+        ## yet deleteSolver is called to make sure all the moose object are off from solver
+        deleteSolver(modelA) 
+        deleteSolver(modelB)
 
     modelA,loadedA = loadModels(A)
     modelB,loadedB = loadModels(B)
@@ -84,14 +115,19 @@ def mergeChemModel(A,B):
             funcNotallowed = []
             funcNotallowed = functionMerge(dictComptA,dictComptB,key)
             
-            poolListina = updatePoolList(dictComptA)
-            R_Duplicated,R_Notcopiedyet,R_Daggling = reacMerge(dictComptA,dictComptB,key,poolListina)
-
-            poolListina = updatePoolList(dictComptA)
-            E_Duplicated,E_Notcopiedyet,E_Daggling = enzymeMerge(dictComptA,dictComptB,key,poolListina)
-        
-        print("\n Model is merged to %s" %modelA)
-        
+            poolListinb = updatePoolList(dictComptB)
+            R_Duplicated,R_Notcopiedyet,R_Daggling = reacMerge(dictComptB,dictComptA,key,poolListinb)
+            
+            poolListinb = updatePoolList(dictComptB)
+            E_Duplicated,E_Notcopiedyet,E_Daggling = enzymeMerge(dictComptB,dictComptA,key,poolListinb)
+        spath, sfile = os.path.split(src)
+        dpath, dfile = os.path.split(des)
+        print("\nThe content of %s (src) model is merged to %s (des)." %(sfile, dfile))
+        # Here any error or warning during Merge is written it down
+        if funcExist:
+            print( "\nIn model \"%s\" pool already has connection from a function, these function from model \"%s\" is not allowed to connect to same pool,\n since no two function are allowed to connect to same pool:"%(dfile, sfile))
+            for fl in list(funcExist):
+                print("\t [Pool]:  %s [Function]:  %s \n" %(str(fl.parent.name), str(fl.path)))
         if funcNotallowed:
             print( "\nPool already connected to a function, this function is not to connect to same pool, since no two function are allowed to connect to same pool:")
             for fl in list(funcNotallowed):
@@ -133,8 +169,34 @@ def mergeChemModel(A,B):
             if E_Daggling:
                 print ("Enzyme:")
                 for ed in list(E_Daggling):
-                    print ("%s " %str(ed.name))             
-
+                    print ("%s " %str(ed.name))
+        ## Model is saved
+        print ("\n ")
+        savemodel = raw_input("Do you want to save the model?  \"YES\" \"NO\" ")
+        if savemodel.lower() == 'yes' or savemodel.lower() == 'y':
+            mergeto = raw_input("Enter File name ")
+            if mergeto and mergeto.strip():
+                filenameto = 'merge.g'
+            else:
+                if str(mergeto).rfind('.') != -1:
+                    mergeto = mergeto[:str(mergeto).rfind('.')]
+                if str(mergeto).rfind('/'):
+                    mergeto = mergeto+'merge'
+                
+                filenameto = mergeto+'.g'
+            
+            error,written = moose.mooseWriteKkit(modelB, filenameto)
+            if written == False:
+                print('Could not save the Model, check the files')
+            else:
+                if error == "":
+                    print(" \n The merged model is saved into \'%s\' " %(filenameto))
+                else:
+                    print('Model is saved but these are not written\n %s' %(error))
+        else:
+            print ('\nMerged model is available under moose.element(\'%s\')' %(modelB))
+            print ('  If you are in python terminal you could save \n   >moose.mooseWriteKkit(\'%s\',\'filename.g\')' %(modelB))
+        
 def functionMerge(comptA,comptB,key):
     funcNotallowed = []
     comptApath = moose.element(comptA[key]).path
@@ -233,7 +295,9 @@ def loadModels(filename):
         modeltype = mtypes.getType(filename)
         subtype = mtypes.getSubtype(filename, modeltype)
         if subtype == 'kkit' or modeltype == "cspace":
-            moose.loadModel(filename,modelpath)
+            if moose.exists(modelpath):
+                moose.delete(modelpath)
+            moose.loadModel(filepath,modelpath)
             loaded = True    
     
         elif subtype == 'sbml':
@@ -603,7 +667,40 @@ def mooseIsInstance(element, classNames):
 
 
 if __name__ == "__main__":
-
-    modelA = '/home/harsha/genesis_files/gfile/acc92.g'
-    modelB = '/home/harsha/genesis_files/gfile/acc50.g'
-    mergered = mergeChemModel(modelA,modelB)
+    try:
+        sys.argv[1]
+    except IndexError:
+        print("Source filename or path not given")
+        exit(0)
+    else:
+        src = sys.argv[1]
+        if not os.path.exists(src):
+            print("Filename or path does not exist",src)
+        else:
+            try:
+                sys.argv[2]
+            except IndexError:
+                print("Destination filename or path not given")
+                exit(0)
+            else:
+                des = sys.argv[2]
+                if not os.path.exists(src):
+                    print("Filename or path does not exist",des)
+                    exit(0)
+                else:
+                    mergered = mergeChemModel(src,des)
+                '''
+                try:
+                    sys.argv[3]
+                except IndexError:
+                    print ("Merge to save not specified")
+                    mergeto = "merge"
+                else:
+                    mergeto = sys.argv[3]
+                    if str(mergeto).rfind('.') != -1:
+                        mergeto = mergeto[:str(mergeto).rfind('.')]
+                    if str(mergeto).rfind('/'):
+                        mergeto = mergeto+'merge'
+                    
+                    mergered = mergeChemModel(src,des,mergeto)
+                '''
diff --git a/moose-core/python/moose/plot_utils.py b/moose-core/python/moose/plot_utils.py
index b2740954dc10103f0c6e6f266ce08cb4cedeb315..c7c7a977acb07952362c14430e6857e1b2487802 100644
--- a/moose-core/python/moose/plot_utils.py
+++ b/moose-core/python/moose/plot_utils.py
@@ -300,7 +300,13 @@ def plot_records(data_dict, xvec = None, **kwargs):
     subplot = kwargs.get('subplot', False)
     filters = [ x.lower() for x in kwargs.get('filter', [])]
 
-    plt.figure(figsize=(10, 1.5*len(data_dict)))
+    ax = kwargs.get( 'ax', None )
+    if ax is None:
+        plt.figure(figsize=(10, 1.5*len(data_dict)))
+        if not subplot:
+            ax = plt.subplot( 1, 1, 1 )
+            kwargs[ 'ax' ] = ax
+
     for i, k in enumerate(data_dict):
         pu.info("+ Plotting for %s" % k)
         plotThis = False
@@ -315,8 +321,9 @@ def plot_records(data_dict, xvec = None, **kwargs):
                 yvec = data_dict[k]
                 plotVector(yvec, xvec, label=k, **kwargs)
             else:
-                plt.subplot(len(data_dict), 1, i)
-                yvec = data_dict[k]
+                ax = plt.subplot(len(data_dict), 1, i+1)
+                kwargs[ 'ax' ] = ax
+                yvec = data_dict[k].vector
                 plotVector(yvec, xvec, label=k, **kwargs)
     if subplot:
         try:
diff --git a/moose-core/python/rdesigneur/rmoogli.py b/moose-core/python/rdesigneur/rmoogli.py
index 7f8fa883b372bea23ec50fc754653e93c3f5995c..8a475a09a85544dcb3f82890747da8e64ab916b0 100644
--- a/moose-core/python/rdesigneur/rmoogli.py
+++ b/moose-core/python/rdesigneur/rmoogli.py
@@ -65,7 +65,9 @@ def interlude( view ):
     view.mooGroup.set("color", val, view.mapper)
     view.yaw( rotation )
     #print moogliDt, len( val ), runtime
-    if moose.element("/clock").currentTime >= runtime:
+    currt = moose.element("/clock").currentTime
+    view.timecb.set_title( 'T = {:.3f} s'.format( currt ) )
+    if currt >= runtime:
         view.stop()
 
 # This func is used for later viewers, that don't handle advancing time.
@@ -146,13 +148,34 @@ def makeMoogli( rd, mooObj, moogliEntry, fieldInfo ):
                                      moogliEntry[5],
                                      moogliEntry[6]))
     cb.set_num_labels(3)
+
+    # Use the text title on a colorbar to display the current time!!
+    # Spectacularly ugly hack, but I was unable to find other ways to put
+    # text in a predefined place in a moogli view.
+    timecb = moogli.widgets.ColorBar( id="timecb",
+        title = "T = 0 s",
+        text_color=moogli.colors.BLACK,
+        position=moogli.geometry.Vec3f(0.1, -0.01, 0.0),
+        size=moogli.geometry.Vec3f(0.01, 0.02, 0.0),
+        text_font="/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf",
+        orientation=0.0,
+        text_character_size=16,
+        label_formatting_precision=1,
+        colormap=moogli.colors.MatplotlibColorMap(matplotlib.cm.rainbow),
+        color_resolution=2,
+        scalar_range=moogli.geometry.Vec2f( 0.0, 1.0 )
+    )
+    timecb.set_num_labels( 0 )
+
     view.attach_color_bar(cb)
+    view.attach_color_bar(timecb)
     view.rd = rd
     view.mooObj = displayObj
     view.mooGroup = updateGroup
     view.mooField = mooField
     view.mooScale = fieldInfo[2]
     view.mapper = mapper
+    view.timecb = timecb
     viewer.attach_view(view)
     return viewer
 
diff --git a/moose-core/randnum/Makefile b/moose-core/randnum/Makefile
deleted file mode 100644
index 259bbb4c7882c99a7c45a5970251d0a9f49ac921..0000000000000000000000000000000000000000
--- a/moose-core/randnum/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-CXXFLAGS += -I..
-# the line below are for easy inclusion of libxml++
-#CXXFLAGS += $(shell pkg-config libxml++-2.6 --CXXFLAGS) 
-
-TARGET = _randnum.o
-
-OBJ = \
-	mt19937ar.o	\
-	RandGenerator.o	\
-	UniformRng.o	\
-	Uniform.o	\
-	Exponential.o	\
-	ExponentialRng.o	\
-	Binomial.o	\
-	Normal.o	\
-	Poisson.o	\
-	Gamma.o		\
-	PoissonRng.o	\
-	NormalRng.o	\
-	BinomialRng.o	\
-	GammaRng.o	\
-
-HEADERS = \
-	../basecode/header.h	\
-	randnum.h	\
-	Probability.h	\
-	RandGenerator.h	\
-	UniformRng.h	\
-	Uniform.h	\
-	Exponential.h	\
-	ExponentialRng.h	\
-	Binomial.h	\
-	Gamma.h		\
-	Poisson.h	\
-	PoissonRng.h	\
-	Normal.h	\
-	NormalRng.h	\
-	BinomialRng.h	\
-	GammaRng.h	\
-
-default: $(TARGET)
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $< -c
-#	$(CXX) $(CXXFLAGS) $(shell pkg-config libxml++-2.6 --CXXFLAGS) $< -c
-
-$(TARGET): $(OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ)
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/scheduling/Makefile b/moose-core/scheduling/Makefile
deleted file mode 100644
index 2061a090a4a12a018e047a11c1db4c2416c0b4e9..0000000000000000000000000000000000000000
--- a/moose-core/scheduling/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2009 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _scheduling.o
-
-OBJ = \
-	Clock.o	\
-	testScheduling.o \
-
-HEADERS = \
-	../basecode/header.h \
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-Clock.o:	Clock.h
-testScheduling.o:	Clock.h 
-
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/shell/Makefile b/moose-core/shell/Makefile
deleted file mode 100644
index 543301438d3e165da180a7ee2109b498a1bd4023..0000000000000000000000000000000000000000
--- a/moose-core/shell/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _shell.o
-
-OBJ = \
-	Shell.o	\
-	ShellCopy.o	\
-	ShellThreads.o	\
-	LoadModels.o \
-	SaveModels.o \
-	Neutral.o	\
-	Wildcard.o	\
-	testShell.o	\
-
-HEADERS = \
-	../basecode/header.h \
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-#Shell.o:	Shell.h Neutral.h ../scheduling/Clock.h ../sbml/MooseSbmlWriter.h ../sbml/MooseSbmlReader.h
-Shell.o:	Shell.h Neutral.h ../scheduling/Clock.h
-ShellCopy.o:	Shell.h Neutral.h ../scheduling/Clock.h
-ShellSetGet.o:	Shell.h
-ShellThreads.o:	Shell.h Neutral.h ../scheduling/Clock.h
-LoadModels.o:	Shell.h Neutral.h ../biophysics/SwcSegment.h ../biophysics/ReadSwc.h
-SaveModels.o:	Shell.h Neutral.h
-Neutral.o:	Neutral.h ../basecode/ElementValueFinfo.h
-Wildcard.o:	Wildcard.h Shell.h Neutral.h ../basecode/ElementValueFinfo.h
-testShell.o:	Wildcard.h Shell.h Neutral.h ../builtins/Arith.h ../basecode/SparseMatrix.h ../msg/SparseMsg.h ../msg/SingleMsg.h ../basecode/SetGet.h ../basecode/HopFunc.h ../basecode/OpFuncBase.h ../basecode/OpFunc.h
-
-#../kinetics/ReadKkit.h ../biophysics/ReadCell.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I.. -I../basecode -I../msg $< -c
-
-$(TARGET):		$(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) 
-
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/signeur/Makefile b/moose-core/signeur/Makefile
deleted file mode 100644
index ad8c507467241ca0853937796d8b21b8e10b9b8f..0000000000000000000000000000000000000000
--- a/moose-core/signeur/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           Copyright (C) 2003-2012 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-CXXFLAGS += -I..
-# the line below are for easy inclusion of libxml++
-#CXXFLAGS += $(shell pkg-config libxml++-2.6 --cflags) 
-
-TARGET = _signeur.o
-
-OBJ = \
-	Adaptor.o	\
-	testSigNeur.o
-
-
-HEADERS = \
-	../basecode/header.h \
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-Adaptor.o:	Adaptor.h
-testSigNeur.o:	Adaptor.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) -I.. -I../basecode $< -c
-
-$(TARGET): $(OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) 
-clean:
-	-rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/synapse/Makefile b/moose-core/synapse/Makefile
deleted file mode 100644
index bbf82b990c89bb574aab8b2fd4ff27857a97a6d1..0000000000000000000000000000000000000000
--- a/moose-core/synapse/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           copyright (C) 2007 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-TARGET = _synapse.o
-
-OBJ = \
-	SynHandlerBase.o	\
-	SimpleSynHandler.o	\
-	STDPSynHandler.o	\
-	GraupnerBrunel2012CaPlasticitySynHandler.o	\
-	Synapse.o	\
-	STDPSynapse.o	\
-	RollingMatrix.o	\
-	SeqSynHandler.o \
-	testSynapse.o	\
-
-# GSL_LIBS = -L/usr/lib -lgsl
-
-HEADERS = \
-	../basecode/header.h \
-	../utility/numutil.h \
-
-
-default: $(TARGET)
-
-$(OBJ)	: $(HEADERS)
-SynHandlerBase.o:	SynHandlerBase.h Synapse.h 
-SimpleSynHandler.o:	SynHandlerBase.h Synapse.h SimpleSynHandler.h SynEvent.h
-STDPSynHandler.o:	SynHandlerBase.h STDPSynapse.h STDPSynHandler.h SynEvent.h
-GraupnerBrunel2012CaPlasticitySynHandler.o:	SynHandlerBase.h Synapse.h GraupnerBrunel2012CaPlasticitySynHandler.h SynEvent.h
-Synapse.o:	Synapse.h SynHandlerBase.h
-STDPSynapse.o:	STDPSynapse.h SynHandlerBase.h
-RollingMatrix.o:	RollingMatrix.h
-SeqSynHandler.o:	SynHandlerBase.h Synapse.h SimpleSynHandler.h SeqSynHandler.h RollingMatrix.h SynEvent.h
-testSynapse.o: SynHandlerBase.h Synapse.h SimpleSynHandler.h SeqSynHandler.h RollingMatrix.h SynEvent.h
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) $(SMOLDYN_FLAGS) -I. -I../basecode -I../msg -I .. -I../external/muparser/include $< -c
-
-$(TARGET): $(OBJ) $(SMOLDYN_OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) $(SMOLDYN_OBJ) $(SMOLDYN_LIB_PATH) $(SMOLDYN_LIBS) $(GSL_LIBS)
-
-clean:
-	rm -f *.o $(TARGET) core core.*
diff --git a/moose-core/synapse/SeqSynHandler.cpp b/moose-core/synapse/SeqSynHandler.cpp
index 51a231ed50906b42e5efcf78e349102244abd57b..7cdf6bc98d02fb54903294d77509018201d79ff6 100644
--- a/moose-core/synapse/SeqSynHandler.cpp
+++ b/moose-core/synapse/SeqSynHandler.cpp
@@ -105,6 +105,19 @@ const Cinfo* SeqSynHandler::initCinfo()
 			&SeqSynHandler::setWeightScale,
 			&SeqSynHandler::getWeightScale
 	);
+
+	static ValueFinfo< SeqSynHandler, double > sequencePower(
+			"sequencePower",
+			"Exponent for the outcome of the sequential calculations. "
+			"This is needed because linear summation of terms in the kernel"
+			"means that a brief stong sequence match is no better than lots"
+			"of successive low matches. In other words, 12345 is no better"
+			"than 11111. Using an exponent lets us select the former."
+			"Defaults to 1.0.",
+			&SeqSynHandler::setSequencePower,
+			&SeqSynHandler::getSequencePower
+	);
+
 	static ReadOnlyValueFinfo< SeqSynHandler, vector< double > > 
 			weightScaleVec(
 			"weightScaleVec",
@@ -128,10 +141,14 @@ const Cinfo* SeqSynHandler::initCinfo()
 		&kernelWidth,				// Field
 		&seqDt,						// Field
 		&historyTime,				// Field
-		&responseScale,				// Field
-		&seqActivation,				// Field
-		&weightScale,				// Field
-		&weightScaleVec,			// Field
+		&sequenceScale,				// Field
+		&baseScale,					// Field
+		&synapseOrder,				// Field
+		&synapseOrderOption,		// Field
+		&seqActivation,				// ReadOnlyField
+		&plasticityScale,			// Field
+		&sequencePower,				// Field
+		&weightScaleVec,			// ReadOnlyField
 		&kernel,					// ReadOnlyField
 		&history					// ReadOnlyField
 	};
@@ -160,9 +177,12 @@ SeqSynHandler::SeqSynHandler()
 		kernelWidth_( 5 ),
 		historyTime_( 2.0 ), 
 		seqDt_ ( 1.0 ), 
-		responseScale_( 1.0 ),
-		weightScale_( 0.0 ),
-		seqActivation_( 0.0 )
+		baseScale_( 0.0 ),
+		sequenceScale_( 1.0 ),
+		plasticityScale_( 0.0 ),
+		sequencePower_( 1.0 ),
+		seqActivation_( 0.0 ),
+		synapseOrderOption_( -1 ) // sequential ordering
 { 
 	int numHistory = static_cast< int >( 1.0 + floor( historyTime_ * (1.0 - 1e-6 ) / seqDt_ ) );
 	history_.resize( numHistory, 0 );
@@ -315,7 +335,17 @@ vector< double >SeqSynHandler::getWeightScaleVec() const
 	return weightScaleVec_;
 }
 
-void SeqSynHandler::setWeightScale( double v )
+double SeqSynHandler::getSequencePower() const
+{
+	return sequencePower_;
+}
+
+void SeqSynHandler::setSequencePower( double v )
+{
+	sequencePower_ = v;
+}
+
+vector< double >SeqSynHandler::getWeightScaleVec() const
 {
 	weightScale_ = v;
 }
@@ -394,7 +424,7 @@ void SeqSynHandler::vProcess( const Eref& e, ProcPtr p )
 				seqActivation_ = 0.0;
 				for ( vector< double >::iterator y = correlVec.begin(); 
 								y != correlVec.end(); ++y )
-					seqActivation_ += *y;
+					seqActivation_ += pow( *y, sequencePower_ );
 	
 				// We'll use the seqActivation_ to send a special msg.
 				seqActivation_ *= responseScale_;
diff --git a/moose-core/synapse/SeqSynHandler.h b/moose-core/synapse/SeqSynHandler.h
index 55fd01181bcf868b610c0192456fc04f5c05b71d..15e1472f5248c8c83876c5dd144faf65eff47172 100644
--- a/moose-core/synapse/SeqSynHandler.h
+++ b/moose-core/synapse/SeqSynHandler.h
@@ -58,8 +58,10 @@ class SeqSynHandler: public SynHandlerBase
 		void setResponseScale( double v );
  		double getResponseScale() const;
  		double getSeqActivation() const; // summed activation of syn chan
-		void setWeightScale( double v );
- 		double getWeightScale() const;
+		void setPlasticityScale( double v );
+ 		double getPlasticityScale() const;
+		void setSequencePower( double v );
+ 		double getSequencePower() const;
  		vector< double > getWeightScaleVec() const;
  		vector< double > getKernel() const;
  		vector< double > getHistory() const;
@@ -92,6 +94,15 @@ class SeqSynHandler: public SynHandlerBase
 		// Scaling factor for weight changes in each synapse from response
 		double weightScale_;
 
+		/**
+		 * Exponent to use for the outcome of the sequential calculations.
+		 * This is needed because linear summation of terms in the kernel
+		 * means that a brief stong sequence match is no better than lots
+		 * of successive low matches. In other words, 12345 is no better
+		 * than 11111.
+		 */
+		double sequencePower_;
+
 		///////////////////////////////////////////
 		// Some readonly fields
 		double seqActivation_; // global activation if sequence recognized
diff --git a/moose-core/utility/Makefile b/moose-core/utility/Makefile
deleted file mode 100644
index 87af0b7dc6bf3ae2edd3e7517cc15831d4e4679c..0000000000000000000000000000000000000000
--- a/moose-core/utility/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-#/**********************************************************************
-#** This program is part of 'MOOSE', the
-#** Messaging Object Oriented Simulation Environment.
-#**           Copyright (C) 2003-2012 Upinder S. Bhalla. and NCBS
-#** It is made available under the terms of the
-#** GNU Lesser General Public License version 2.1
-#** See the file COPYING.LIB for the full notice.
-#**********************************************************************/
-
-CXXFLAGS += -I..
-# the line below are for easy inclusion of libxml++
-#CXXFLAGS += $(shell pkg-config libxml++-2.6 --cflags) 
-
-TARGET = _utility.o
-
-OBJ = \
-	strutil.o	\
-	types.o 	\
-	setupenv.o	\
-	numutil.o	\
-	Annotator.o	\
-	cnpy.o 		\
-	Vec.o	\
-
-
-HEADERS = \
-	strutil.h 	\
-	numutil.h	\
-	../basecode/header.h \
-	cnpy.hpp 	\
-
-default: $(TARGET)
-
-strutil.o: strutil.h
-Annotator.o: Annotator.h
-Vec.o: Vec.h ../basecode/doubleEq.h
-cnpy.o : cnpy.hpp
-
-.cpp.o:
-	$(CXX) $(CXXFLAGS) -I.. -I../basecode $< -c
-
-$(TARGET): $(OBJ) $(HEADERS)
-	$(LD) -r -o $(TARGET) $(OBJ) 
-clean:
-	-rm -f *.o $(TARGET) core core.*