Added some unit tests.
Added namespaces to unit tests.
Fixes in code.