Unit tests implemented.
Prepared new build with fixes found during unit tests.