Test cleanup and better test coverage

For various reasons, several of the tests were not being run.  This fixes that.