Cleaner code for index.php