Finish some HTML refactoring