Added in all the index analysis code. Runs, but not in a separate
thread. Need to fix this tomorrow.