incorrect channel closing issue fixed. "flags" field removed from the
channel description. new "valid" field added to the channel description.
some useless macros removed