Cleanup HTML pages. Improvements and a few fixes to get consistent behavior across browsers including Safari/iOS.