Modify return procedures, add boolean OR, and fix URL encoding