Allow replace chars to be provided and formatting fixes