Unify base64 encoding + update a few methods