Fixed some things that didn't go exactly as I wanted in the merge.  Untested.