serialize payloads before base64 encoding so they can be arrays. remove stray code. fix status checking