adding unit tests\nmisc fixes.