Reestructured extras.php code.