HM: Removed prints and unused code
HM: Unite queries in filterQueries