several changes to support CHANNEL_ and ROOM_. Not finished yet