Some fix and optimisations. Mostly on HTML Report #6