more HTML refactoring