Simplified some redundant HTML into a PHP function call that creates it.