cleanup index
add tests and linting