cleanup startup
refactor indexing layer