Refactor dino filtering