New indexing for partitions and some other changes