Convert if/else to use ternary operator
Fix warning URI.escape is obsolete
Dynamically define URI predicate method aliases