Starting to define chunk indexing code