Fixed most things.  Some bugs persist.