Finished index stuff

Finished coding for v2.0