Fix filter replacement functionality. Add cli arg handling for filter replacement.