Cosmetic fixes

Most of these changes are cosmetic, but some fixes should be actually useful (e.g. replacing `@` with `file_exists` and path fix in `index.php`).