Remove unused code from index