Tag index

Just starting on this, not for merging yet, but feedback welcome.
Very minor: It might be aesthetically more pleasing if `t *testing` was the first parameter in this function too.