LILY-220: cleanup & small change in getting queryset