Minor cleanup, better test coverage.