moved JavaScript code in stats.xul to a separate file and fixed warnings issued by JSHint
replaced use of innerHTML with textContent