New Query class to create limits for a query, restructure searching