lots of changes

See previous commit for the message I thought I was applying to all these
changes.