Add lots of new tests to improve code coverage