Adds queryBuilder and tests.