Remove redundant code from index