Fixes incorrect memset args.
Refactors send and receive to use with guile.