adding send, listen and relay commands, and cleaning up the code (not much...)