Added support for before and after filters.