Updating and refactoring tests to get 100% coverage.