Architectural changes to decouple Filter from other classes via the Factory design pattern