use minimal base64 library for base64 encoding
removed a little deprecated code