938. The Walls and the Schach
134:2 There are many detailed laws regarding the walls of the succah. Since not everyone is knowledgeable in the matter, it is necessary to make the walls complete and strong enough that the wind does not move them (even if there is no danger of the walls falling - Mishnah Brurah 630:48), nor should the wind be able to blow out the candles in the succah. If one does not have the necessary means for four complete walls, it is better to make three whole walls than four partial walls. If one is able to, it would be a mitzvah to build his succah with a roof that opens and closes on hinges so that it may be closed when it rains. When the rain stops, he simply opens the roof. In this way, the schach remains dry and one can fulfill the mitzvah of succah properly.
134:3 The schach also involves many laws. We typically cover the succah with tree branches or reeds, which grow from the ground and are then detached. Since these are not able to become ritually impure and they are not tied together, there is no concern about using such materials as schach.