got rid of repeated base64 library
background methods still failed but looks nicer! (only one return call)
Refactored and got the asynchronous responses to work correctly for
useful error reporting
Got asynchronous  responses to work correctly for more useful error reporting