Preliminary work to implement $filter handling