moved all the code for document search into indexSearch class and the gui is rearranged a bit