Clean up HTML template

See diff comments for more information.