indexing, cleanup