Refactor QueryBuilder(FIXED)