Some code changes to index