ids query/filter, some package cleanup