fix message type determination; remove table of message classes