base64 refactored.  Some conversions renamed.