clean up refactored query doc retriever