Removed traceable dependencies from query code and made separate classes
and package for it