completely refactored HTML template to follow above code style.