Merge pull request #881 from narfbg/develop-core-codeigniter

Improve index.php & system/core/CodeIgniter.php