Cleaned up some code.  Removed unused bits.