base64 updated with docstrings and unicode support