Refactored HTML to use layout template