Move predicates to its own file and namespace