Refractor the indexing tests a little