Removing some repeated lines in index