Removed some odd replace calls from the encode/decode mapping.