Added function to get a filter by its name.
Refactored so it is easier to migrate to Metrics classes.