fixed double base64 encoding

I have fixed double base64 encoding. Also I have fixed few typos and excluded '1' from valid characters.