Minor fixes an unit tests enhancements.