add code to delete index after finished
some optimizations
Merge branch 'master' of github.com:wc3/QA