Improved framework for unit testing