Added url encoding/decoding