DSL + query framework refactoring part 2