New index.php, updated helper functions