Finish SMPredicate implementation, add more tests