fixing removing queries logic
#37 selectively adding attributes to new queries
#37 new internal method _queryId to enhance the lookup of new ids