Added in sort by indices, removed my crazy input sort by.