Always have something to occupy the students' time. From the moment the students are in the classroom until the bell rings, there should be some classroom activity occurring.
Most students tend to pose discipline problems when they have free time on their hands.
My cooperating teacher has had some trouble the past two days because she allowed them extended class time to prepare for a test. The students did not take advantage of this time and chose instead to talk excessively and disrupt the class. Class time will run much more smoothly if teachers always have something extra planned. One idea is to simply have a supply of higher order thinking questions to throw at them if there is extra time at the end of class. Just keeping them thinking will make for better classroom management.