Switch to using network to share data between Emacs

Also, add tests and clean up separation between parent and child Emacs.