Added local constants and variables
Added some changes of predicate logic