Changed filtering rarity threshold to be a parameter