Improvements and fixes on unittest tools