Improve exists/foldr