Base filter script.