Refactor QueryVectorization