Use Stream.filter and Enum.map with explicit inline functions

It's longer code, but it's a bit more explicit what the different
functions are doing. I found giving names to the parameters makes it
more readable without having to jump back and forth to reference the
@allery_flags list.