Add html coverage generation
Improve test coverage of core api to a respectable level.