Move index path creation into util