Changed MessageType to enum