Fix new lines being injected into raw base64 data

and remove unnecessary conversion
Remove uncalled method