All of *Predicate implemented

Plus some code refactoring