miscellaneous fixes

Another branch for miscellaneous fixes and updates. Feel free to push any minor changes to this branch. We can merge the batch before the end of the week.