Don't hold on to the filter after printing it
Ensure filter is always a list
Move filter parsing logic to a more testable place