Made some minor changes to the send and receive methods for readability