Fix typo which avoids the coverage html output
Code cleanup and test case improvements