all: Move filter handling outwards from elf