Improved tests

This working PR will provide improvements to the test suite.