Make code nicer

* Move index infomation to a hashtable
* Make sure all indexes are created at driver startup