Modified default PHP error reporting and fixed bugs in index.php file.