Clean up code.  Use new Mavericks apis for base64 handling.