Starting rework of index (maybe broken commit)