changed to pass message class to channel handler, fixes crash when registering message

remove pointless newlines
add second constructor

remove more whitespace