Updated index.php for new system