Fixed the test files and corrected a few issues with sending messages for multiple output targets. Added inline code documentation.