Fixes for SSL, Base64 plus minor housekeeping