Reformatted to comply with gjslinter.
Removed extraneous objects and integrated code from different repositories. Currently it looks like the sending code is more or less done. Having a hard time testing the saving functionality but I have some more ideas. Asynchronous JS?