Cleaned up some duplicate code and added support for channel broadcast