Fixed duplicates

Removed duplicate code in index