code clean up and use of window.btoa (convert inbound firebase table IO) and window.atob (outbound conversion from firebase).