Refactored HTML composers to remove duplication.