Modified QueryHelper & Queries to support new location hierarchy scheme