New predicates handling. Tests added.
Merge result