Overhauled index.php