Assorted updates/refactorings.