Simplified filtering. Better handling of functions in controllers