Add code coverage support
Improve tests
Improve conditional