Refactored Encode.url and hex/hexu.