Fixed problem when subfunction was a filter
Added {class} syntax for @before