Rename intermediate to index to match convention