REFACTORED: new key exchange into send message
FIXED: inconsistent use of strings.