In 29b Rambam finishes his description of the beliefs of the Sabians and discusses the dangers of magical thinking and of interpreting literally the metaphorical parts of the Torah. In 30 Rambam discusses how the Torah leads us away from these beliefs and toward belief in god. In 31 Rambam emphasizes why it is so important to understand that every commandment has a logical reason.