fix warnings
remove trailing whitespace
add support for messages with multiple channels