Update index and make it more configurable