(refactor) Polished url encoding.