Updated index.php, corrected errors