extending ErrorCode to express unknow frame type.
cleaning up flags and streamid.
designing encoder.