Refactors the directory filter interface

Also moves Search to its own filter interface, for better consistency