refactored htmlreport for clearer code
added diffcounter wrapper