scaffold index functions
cleanup, rename map functions
indexing functionality