Created QueryKernel
Refactoring