fix broken search.php and improve formatting