Updating to use array_key_exists, removing uneeded code from index.php