Made the message types an enum.