Update of code.  Lot of stuff here.