added base64 encoding, and minified updated script

Hi, I added some methods to enable base64 encoding and decoding. The code that I actually changed is significantly less than what's shown in the diff, mainly because Intellij auto-formatted the file. I also updated the minified version based on my updates.