Got rid of all the memleaks.  We can now merge with master.