big speed optimizations when updating large indexes, and a bunch more test coverage