Implemented the "send" command (at least to the point of generating the message) as well as some refactoring.