Chnages to allow indexing of categories.