improve shutdown and remove index naming

* Improve shutdown
* Remove index naming 
* remove index type declartion