Teaching is more than a single job. Every veteran educator knows, that you are doing multiple jobs at once each day. This is difficult even when students are attentive and well-behaved. And, to their credit, most young people are sweet souls and want to succeed. However, it is equally true that it only takes one unruly child to derail an entire class.
As a 25 year veteran educator I have found that it is best to get ahead of my students when it comes to behavior. I let them know up front that I expect the girls to behave as ladies and the boys as gentlemen, manners and all. For this approach to be successful, you must develop a classroom atmosphere of mutual respect, kindness, and professionalism. This goes both ways and it is the teacher's responsibility to set the tone. That is why I encourage the use of character lessons at the beginning of each class. To do this, simply devote 3-5 minutes at the bell to welcome students and make small talk. Let them know you are glad to see them. Then read a short character or moral story to them. Next, spend a minute or two discussing the meaning of the story and allow students to provide input or ask questions. What you will find is that very soon, they will not allow you to begin class without this "Character Thought". My students ask on a daily basis, "Can we just do this the entire class period?" Our young people crave goodness and wisdom. I find that they thoughtfully behave and enjoy acting in ways they have learned to be "good" and "wise". So how does this help with classroom management? By using this technique, I have had very few discipline issues over the years. In fact, I probably only have to write up 1-2 students each school year. Some years, I have not had to write any discipline referrals. I have found that students are willing and more able to discuss differences and allow gentle and wise correction when I have engaged them in character lessons ahead of time.
A final word of warning. They will test you to see if you believe what you are telling them. You must speak the truth to them. You must be kind, respectful, and wise yourself. If you are, most students will respect you and follow your lead.
Best Wishes!