Moving the indexing into setlib