Allow predicates/functions in classes. Unit tests.