Tidying the send and receive scripts.
Updated crypto tests to work with the new version of crypto.
Tidying up.