Amend htmlmin configuration so it doesn't mess up <script> tags

When htmlmin removes comments inside CDATA sections, it messes
up <script> tags; as we're minifying JS elsewhere anyway,
just leave comments in inline script elements alone.
Lazily load the majority of the HTML
Remove a couple of global variables
Small tweaks to graphics and remove unused images