code: public QueryTreeElement removeQuery(String query_id) {
  		for (QueryTreeElement query : queries) {
  			if (query.getID().equals(query_id)) {
  				queries.remove(query);
  				return query;
  			}
  		}
  		return null;
  	}
docs: Removes a query from the group and returns the removed query, or null if
  the query was not found in this group.