Small index.php refactor