Refactored HTML rendering some
More tweaks to HTML rendering