Add new test scripts and generally improve code coverage of tests.