Updates to tests, and some cosmetic work.