Used backported Base64 implementation, and enhanced speed in escape() method.