Implemented customizable write and close method
Removed error checking for close method, not all messengers can be closed
Renamed send --> write
Fixed reference to send function in test peer