Coverage reporting

Adds test coverage reporting.
Patches test coverage.