Fixed a bug in the build index process, removed some debugging, and still debugging relevancemodel