Improved unit testing