Made base64 conversion more efficient.