Feature/improve unittesting

This branch brings up the unittest code coverage to 40%.