Query4 & some base class and methods added.