Speed up index, add new tests