Unit test

Improved unit tests.