HTML code refactor